Update Signature
Updates an existing signature.
Required Permissions
Requires the MEMBER role or higher.
HTTP Request
PUT /api/sonar/signatures/:guid
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
-d signature="sig-edit" \
-d capecs="CAPEC-3" \
-X PUT \
https://HOSTNAME/api/sonar/signatures/fbad71f7-230d-443e-b6b2-bd4e968c8f5b
Request Parameters
| Key | Required | Type | Description | Note |
|---|---|---|---|---|
| guid | O | String | Signature identifier | 36-character GUID |
| signature | O | String | Signature code | Min 1, max 255 characters |
| description | X | String | Signature description | Maximum 2000 characters |
| app_code | X | String | App code | Min 1, max 50 characters |
| capecs | O | String list | CAPEC ID list | Comma-separated CAPEC IDs |
Success Response
{}
Error Responses
Signature not found
HTTP status code 500
{
"error_code": "illegal-state",
"error_msg": "signature not found: fbad71f7-230d-443e-b6b2-bd4e968c8f53"
}
Required argument is missing
HTTP status code 400
{
"error_code": "null-argument",
"error_msg": "signature should be not null"
}
Invalid GUID format
HTTP status code 400
{
"error_code": "invalid-param-type",
"error_msg": "guid should be guid type."
}
Signature code exceeds maximum length
HTTP status code 400
{
"error_code": "invalid-argument",
"error_msg": "'signature' must be shorter than or equal to 255 characters."
}
Invalid CAPEC ID format
HTTP status code 400
{
"error_code": "invalid-argument",
"error_msg": "invalid capec format: invalid-capec-id"
}
No permission
HTTP status code 500
{
"error_code": "illegal-state",
"error_msg": "no-permission"
}