PATCH /v3/education/batch/start

This method will start the scan for all the content you included in the specific batch. Using this method, there is no need to start the scan process separately for each one of the processes.

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 and also compare them against one another.

String array

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

include

Include your documents from previous scans to compare against.

These files will not be scanned, only compared against.

The include list of scans must be available on the Copyleaks servers.

String array

Example: [ "Your-scan-id-3" ]

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"
  ],
  "include": [
    "Your-scan-id-3"
  ],
  "errorHandling": 0
}' 'https://api.copyleaks.com/v3/education/start'
PATCH https://api.copyleaks.com/v3/education/start

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

{
  "trigger": [
    "Your-scan-id-1",
    "Your-scan-id-2"
  ],
  "include": [
    "Your-scan-id-3"
  ],
  "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  "include": [\n    "Your-scan-id-3"\n  ],\n  "errorHandling": 0\n}'

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

using (var httpClient = new HttpClient())
{
    using (var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.copyleaks.com/v3/education/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  \"include\": [\n    \"Your-scan-id-3\"\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"
  ],
  "include": [
    "Your-scan-id-3"
  ],
  "errorHandling": 0
}';

var options = {
    url: 'https://api.copyleaks.com/v3/education/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"
  ],
  "include": [
    "Your-scan-id-3"
  ],
  "errorHandling": 0
}';
$response = Requests::patch('https://api.copyleaks.com/v3/education/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