Remove Cursor
Deletes the server cursor of a specified query ID.
Required Permissions
Requires the MEMBER role or higher, and you can only delete queries you ran. A Cluster Administrator can also delete queries run by other accounts.
HTTP Request
DELETE /api/sonar/cursors/:id
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
-X DELETE https://HOSTNAME/api/sonar/cursors/109
Request Parameters
Path Parameters
| Key | Type | Description | Note |
|---|---|---|---|
| id | 32-bit integer | Logpresso query ID |
Success Response
{
"status": "ok"
}
Error Responses
Query does not exist
HTTP status code 403 . If the cursor does not exist or if the query is executed by a different account, you can not delete the cursor.
{
"error_code": "invalid-query-id",
"error_msg": "cannot access query 42"
}
Query ID is not an integer
HTTP status code 400
{
"error_code": "invalid-param-type",
"error_msg": "query id should be integer type"
}