Delete Scans
Delete scans from Copyleaks API. Only completed scans can be deleted. All of the scan results, metadata and information will be removed.
The delete is performed in the background, the deletion process can take few minutes.
Request
Section titled “Request”Headers
Section titled “Headers”Content-Type: application/jsonAuthorization: Bearer YOUR_LOGIN_TOKEN
Request Body
Section titled “Request Body”The request body is a JSON object containing the scans to delete.
The list of scans to delete.
<= 10000
items
Example: [ {"id": "Your-scan-id-1"}, {"id": "Your-scan-id-2"} ]
Deleting and purging a scan through the API will remove all traces of the scan from Copyleaks servers, including Shared Data Hubs and Private Cloud Hubs. Once purged, the scan will be permanently deleted and will not be available for future scans.
Allows you to register to a webhook that will be fired once the removal has been completed. Make sure that your endpoint is listening to a POST method (no body parameters were supplied).
Example: https://yoursite.com/webhook/deleted
Adds user specific headers to the request. This is needed in case the webhook endpoint requires any custom headers.
Example: [ [ "header-key", "header-value" ], ... ]
Responses
Section titled “Responses”The request was placed for removal. Note that this process is asynchronous. This means that the actual removal will take place once one of our servers will be free. In order to get notified after the command execution, register to webhook notification (completionWebhook).
Bad Request.
Example Response
A typical response from this endpoint:
{ "scans[0].id": [ "The id field is required." ]}
Authorization has been denied for this request.
Example Response
A typical response from this endpoint:
{ "type": "https://tools.ietf.org/html/rfc9110#section-15.5.2", "title": "Unauthorized", "status": 401, "traceId": "00-ef0db7690ced98431ac97782051edc77-2c4194d74ae6c08b-00"}
Examples
Section titled “Examples”PATCH https://api.copyleaks.com/v3.1/scans/deleteContent-Type: application/jsonAuthorization: Bearer YOUR_LOGIN_TOKEN
{ "scans": [ { "id": "Your-scan-id-1" }, { "id": "Your-scan-id-2" } ], "purge": false}
curl --request PATCH \ --url https://api.copyleaks.com/v3.1/scans/delete \ --header 'Authorization: Bearer YOUR_LOGIN_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "scans": [ { "id": "Your-scan-id-1" }, { "id": "Your-scan-id-2" } ], "purge": false }'