Remove Cursor
Deletes the server cursor of a specified query ID.
Required Permissions
Requires the MEMBER role or higher.
HTTP Request
DELETE /api/sonar/cursors/:id
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
-X DELETE https://HOSTNAME/api/sonar/cursors/12345
Request Parameter
| Key | Required | Type | Description | Note |
|---|---|---|---|---|
| id | O | 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"
}