PATCH /v3/businesses/delete

Delete the specific process from the server.

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

Request

Body Parameters

Name Description

id Required

The list of scan Ids to delete

String array

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

Request Example

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

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

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

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

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

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

        request.Content = new StringContent("{\n  \"id\": [\n    \"Your-scan-id-1\",\n    \"Your-scan-id-2\"\n  ]\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 = '{
  "id": [
    "Your-scan-id-1",
    "Your-scan-id-2"
  ]
}';

var options = {
    url: 'https://api.copyleaks.com/v3/businesses/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 = '{
  "id": [
    "Your-scan-id-1",
    "Your-scan-id-2"
  ]
}';
$response = Requests::patch('https://api.copyleaks.com/v3/businesses/delete', $headers, $data);

Responses

Status Code Description Example
200

The command was executed.

If an error occurred, see error description under the failures section.

{
  "failures": [
    {
      "id": "string",
      "description": "string"
    }
  ]
}
400

Bad request.

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

Authorization has been denied for this request