Remove Patterns

Deletes the specified patterns.

HTTP Request

DELETE /api/sonar/pattern-groups/:guid/patterns
Request using cURL
curl -H "Authorization: Bearer <API_KEY>" \
     -X DELETE \
     "https://HOSTNAME/api/sonar/pattern-groups/638cfeb2-e259-46af-961a-1eeb65ea35f0/pattern?ids=10"
Request Parameters
KeyRequiredTypeDescriptionNote
guidOStringPattern group GUID36 characters
idsOList (of 32-bit integers)Pattern ID listComma-separated list

Success Response

{
    "failures": []
}

Error Responses

Pattern group identifier is not in valid GUID format

HTTP status code 400

{
    "error_code": "invalid-param-type",
    "error_msg": "guid should be guid type."
}
Pattern identifiers list is not a 32-bit integer list

HTTP status code 400

{
    "error_code": "invalid-argument",
    "error_msg": "'ids' parameter should be int_list type"
}
Pattern is not found

HTTP status code 200

{
    "failures": [
        {
            "id": "6",
            "reason": "pattern-not-found"
        }
    ]
}
No privileges to delete a pattern

HTTP status code 500

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