PATCH /v3.1/education/delete

Delete the specific process from the server.

Only completed processes can be deleted. All of the process results and information will be deleted.

The delete is prefromed in the background, the deleteion process can take few minutes.

Request

Body Parameters

Name Description

scans Required

The list of scans to delete

Object array

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

purge

Delete all trace of the scan from Copyleaks server, including from internal database. A purged process will not be available as a result for previous scans.

Boolean

Default value: false

Request Example

curl -XPATCH -H 'Authorization: Bearer YOUR-LOGIN-TOKEN' -H "Content-type: application/json" -d '{
    "scans": [
        {
            "id": "Your-scan-id-1"
        },
        {
            "id": "Your-scan-id-2"
        }
    ],
    "purge": false
}' 'https://api.copyleaks.com/v3.1/education/delete'
PATCH https://api.copyleaks.com/v3.1/education/delete

Content-Type: application/json;
Authorization: Bearer YOUR-LOGIN-TOKEN;

{
    "scans": [
        {
            "id": "Your-scan-id-1"
        },
        {
            "id": "Your-scan-id-2"
        }
    ],
    "purge": false
}
import requests

headers = {
    'Authorization': 'Bearer YOUR-LOGIN-TOKEN',
    'Content-Type': 'application/json',
}

data = '{\n    "scans": [\n        {\n            "id": "Your-scan-id-1"\n        },\n        {\n            "id": "Your-scan-id-2"\n        }\n    ],\n    "purge": false\n}'

response = requests.patch('https://copyleaks.com/v3.1/education/delete', headers=headers, data=data)
using (var httpClient = new HttpClient())
{
    using (var request = new HttpRequestMessage(new HttpMethod("PATCH"), "https://copyleaks.com/v3.1/education/delete"))
    {
        request.Headers.TryAddWithoutValidation("Authorization", "Bearer YOUR-LOGIN-TOKEN"); 

        request.Content = new StringContent("{\n    \"scans\": [\n        {\n            \"id\": \"Your-scan-id-1\"\n        },\n        {\n            \"id\": \"Your-scan-id-2\"\n        }\n    ],\n    \"purge\": false\n}", Encoding.UTF8, "application/json"); 

        var response = await httpClient.SendAsync(request);
    }
}
var request = require('request');

var headers = {
    'Authorization': 'Bearer YOUR-LOGIN-TOKEN',
    'Content-Type': 'application/json'
};

var dataString = '{
    "scans": [
        {
            "id": "Your-scan-id-1"
        },
        {
            "id": "Your-scan-id-2"
        }
    ],
    "purge": false
}';

var options = {
    url: 'https://copyleaks.com/v3.1/education/delete',
    method: 'PATCH',
    headers: headers,
    body: dataString
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}

request(options, callback);
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
    'Authorization' => 'Bearer YOUR-LOGIN-TOKEN',
    'Content-Type' => 'application/json'
);
$data = '{
    "scans": [
        {
            "id": "Your-scan-id-1"
        },
        {
            "id": "Your-scan-id-2"
        }
    ],
    "purge": false
}';
$response = Requests::patch('https://copyleaks.com/v3.1/education/delete', $headers, $data);

Responses

Status Code Description Example
202

The command was accepted.

400

Bad request.

{
  "scans": ["The scans is required."]
}
401

Authorization has been denied for this request

Older versions