Remove Stream Queries
Deletes the specified stream queries in batch. This operation requires administrator privileges.
Required Permissions
Requires the ADMIN role or higher.
HTTP Request
DELETE /api/sonar/stream-queries
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
-d "guids=5f16966b-7b1f-4b39-a84d-738da537a305" \
-X DELETE "https://HOSTNAME/api/sonar/stream-queries"
Request Parameters
| Key | Required | Type | Description | Note |
|---|---|---|---|---|
| guids | O | String list | Stream query GUID list | Comma (,) separated GUID list |
Success Response
All Successful
{
"failures": []
}
Partial Failure
{
"failures": [
{
"id": "5f16966b-7b1f-4b39-a84d-738da537a305",
"reason": "stream query not found: 5f16966b-7b1f-4b39-a84d-738da537a305"
}
]
}
- failures (array): List of stream queries that failed to delete
- id (string): Stream query GUID
- reason (string): Failure reason
Error Responses
Missing Required Parameters
HTTP status code 400
{
"error_code": "null-argument",
"error_msg": "guids should be not null"
}
guids value is not in GUID format
HTTP status code 400
{
"error_code": "invalid-param-type",
"error_msg": "guids should be guid type."
}
No administrator privileges
HTTP status code 500
{
"error_code": "illegal-state",
"error_msg": "no-permission"
}