Content only available in english
RecordM - How to fast delete instances using cURL
Why
Deleting instances in RecordM can be a relatively expensive operation. It must obey Level 4 permissions, it must log the operation in LogM, it must post messages to IM.
Sometimes we just need to get rid of a lot of data in the most efficient way.
There is a special operation, accessible only by direct API, that removes instances without all the added side-effects. It's especially useful for purging older data.
Example
bash
curl -sS \
-H 'Content-type: application/json' \
-H 'Cookie: cobtoken=<token-for-user-with-needed-permissions>' \
https://server.cultofbits.com/recordm/recordm/instances/bulk \
-XPOST -d '{"definitionId": <definition_id>, "action": "fast_delete", "query": "<query>" }'Notes
- You need a token for the user that has the needed permissions
- the
<query>must be a valid query_string query (you can test it in the normal search UI)
