PATCH /v3/businesses/start

Start scanning all the files you submitted for a price-check.

Request

Body Parameters

Name Description

trigger Required

A list of scans that you submitted for a check-credits scan and that you would like to submit for a full scan.

String array

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

errorHandling

When set to ignore (ignore = 1) the trigger scans will start running even if some of them are in error mode, when set to cancel (cancel = 0) the request will be cancelled if any error was found.

Integer

Default Value: 0

Possible Values:
0: Cancel
1: Ignore

Request Example

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

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

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

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

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

response = requests.patch('https://api.copyleaks.com/v3/businesses/start', headers=headers, data=data)

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

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

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

Responses

Status Code Description Example
200

The command was executed.

{
  "success": [
    "Your-scan-id"
  ],
  "failed": []
}
400

Bad request.

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

Authorization has been denied for this request