Update Response Target

Updates the specified response target configuration.

Required Permissions

Requires the ADMIN role or higher.

HTTP Request

PUT /api/sonar/response-targets/:guid
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
     -d name="Firewall response target" \
     -d description="Blocks attacker IPs on the perimeter firewall" \
     -d model_type="bluemax-ngf" \
     -d profile_guid="66666666-7777-8888-9999-000000000000" \
     -d 'configs={}' \
     -d ip_blacklist_guid="4dc14f3d-ebf8-4032-8a7a-ef9ec6cd3dd2" \
     -X PUT \
     https://HOSTNAME/api/sonar/response-targets/a1b2c3d4-e5f6-7890-abcd-ef1234567890
Request Parameters
Path Parameters
KeyTypeDescriptionNote
guidStringResponse target configuration GUID36-character GUID
Request Body Parameters
KeyRequiredTypeDescriptionNote
nameYesStringResponse target nameMinimum 1, maximum 50 characters
descriptionNoStringDescriptionMaximum 2,000 characters
model_typeYesStringResponse model type codeValue provided by an installed app that supports response targets
profile_guidYesStringConnect profile GUID36-character GUID
configsYesString key/valueModel-specific configuration valuesJSON object
ip_blacklist_guidYesStringAddress group GUID to register the blocked IP addresses in36-character GUID
Note
Updating a response target does not support partial updates. You must resend name, model_type, profile_guid, configs, and ip_blacklist_guid together; omitting any of them returns a missing required parameter error.

Success Response

{}

Error Responses

Required parameter is missing

HTTP status code 400

{
  "error_code": "null-argument",
  "error_msg": "name should be not null"
}
guid is not in valid GUID format

HTTP status code 400

{
  "error_code": "invalid-param-type",
  "error_msg": "guid should be guid type."
}
Response model is not found

HTTP status code 500

{
  "error_code": "response-model-not-found",
  "error_msg": null
}
Address group does not exist

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "address group not found: 4dc14f3d-ebf8-4032-8a7a-ef9ec6cd3dd2"
}
Connect profile does not exist

HTTP status code 500

{
  "error_code": "profile-not-found",
  "error_msg": null
}
Specified response target configuration does not exist

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "target-not-found"
}
Response target name already exists

The duplicate check only runs when you change name to a different value from the existing one. This error does not occur if you leave name unchanged.

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "duplicated response target name: Firewall response target"
}
configs value is too large

HTTP status code 400

{
  "error_code": "invalid-argument",
  "error_msg": "too long response target configs (> 65535)"
}
No permission

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "no-permission"
}