Skip to content
Authenticity

Delete Scans

PATCH https://api.copyleaks.com/v3.1/scans/delete

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.

Content-Type: application/json
Authorization: Bearer YOUR_LOGIN_TOKEN

The request body is a JSON object containing the scans to delete.

scans array<object> required

The list of scans to delete.

<= 10000 items

Example: [ {"id": "Your-scan-id-1"}, {"id": "Your-scan-id-2"} ]

purge boolean default: "false"

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.

completionWebhook string

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

headers array[array] default: "null"

Adds user specific headers to the request. This is needed in case the webhook endpoint requires any custom headers.

Example: [ [ "header-key", "header-value" ], ... ]

202 Accepted

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).

400 Bad Request

Bad Request.

Example Response

A typical response from this endpoint:

{
"scans[0].id": [
"The id field is required."
]
}
PATCH https://api.copyleaks.com/v3.1/scans/delete
Content-Type: application/json
Authorization: Bearer YOUR_LOGIN_TOKEN
{
"scans": [
{
"id": "Your-scan-id-1"
},
{
"id": "Your-scan-id-2"
}
],
"purge": false
}