Notice
This guide is for the original release of AQtive Guard. For the current AQG SaaS platform, go to the AQtive Guard User Guide.
Tutorial 4: Delete the trace↑
You can delete traces either individually, or in bulk.
Delete a single trace↑
Traces can be deleted using the GraphQL deleteTrace mutation.
curl \
--header 'API-KEY: <Cryptosense API Key>' \
--header 'Content-Type: application/json' \
--data-raw '{"query": "mutation { deleteTrace(input: {traceId: "<trace ID>"}){ clientMutationId }}"}' \
https://analyzer.cryptosense.com/api/v2
Delete multiple traces↑
It’s possible to send multiple mutations in a single GraphQL query. Combined with the
previous example, this enables bulk deletion of traces in the AQtive Guard API. Here is an example of deleting two traces with a single curl call:
curl \
--header 'API-KEY: <Cryptosense API Key>' \
--header 'Content-Type: application/json' \
--data-raw '{"query": "mutation { d0: deleteTrace(input: {traceId: "<trace ID 1>"}){ clientMutationId } d1: deleteTrace(input {traceId: "<trace ID 2>"}){ clientMutationId }}"}' \
https://analyzer.cryptosense.com/api/v2
The d0 and d1 names here can be changed to any valid GraphQL query label. The
return value will contain the response for each individual deletion request.
Note
One failed delete does not impact the others.
In the example above, if d0 succeeded and d1 failed, the return value would be: