POST suppliers

Adds a new supplier.

The added supplier is a REST API supplier and can be managed with REST API methods. The new supplier is enabled by default.

Path

/api/%API_VERSION%/suppliers

Method

POST

Request headers

This request has the following headers.

Request headers

Name

Value

Description

Authorization

string (base 64)

Authentication string.

Accept

application/json

Response content type.

Content-Type

application/json

Request content type.

You can also specify the utf-8 charset type. For example: Content-Type: application/json; charset=utf-8

Content-Length

integer

Request body size, in bytes.

The maximum body size for this request is 128 MB (134217728).

Request body

This request body contains a JSON array with a supplier object. Only one supplier object must be specified.

[

{

"name":"%SUPPLIER_NAME%",

"confidence": %SUPPLIER_CONFIDENCE%,

"retention": %SUPPLIER_RETENTION%,

"vendor": "%SUPPLIER_VENDOR%"

}

]

Supplier object properties are described in the following table.

Supplier object properties

Property

Value

Mandatory

Description

name

string

Yes

Name of the supplier.

The name of the supplier must contain only Latin letters, digits, hyphens ("-"), and underscores ("_"). The space symbol (" ") cannot be used in the supplier name.

Do not use FalsePositive or InternalTI as the supplier name, since they are reserved for the built-in supplier names of Kaspersky CyberTrace.

confidence

integer

Yes

Confidence level for indicators from this supplier.

The range of values for this parameter is from 0 to 100.

retention

integer

Yes

Retention period for indicators, in minutes.

This parameter determines the timeout after which indicators from this supplier are not used in matching. The timeout is calculated from the last update of the indicator.

vendor

string

No

Supplier vendor name.

Request example

The following is an example of a POST suppliers request.

POST https://192.0.2.57/api/1.1/suppliers

Accept: application/json

Content-Type: application/json

Authorization: Basic dXNlcjpwYXNzd29yZA==

Content-Length: 91

[

{"name":"ExampleSupplier", "confidence": 90, "retention": 5000, "vendor": "ExampleVendor"}

]

Response headers

The response has the following headers.

Response headers

Name

Value

Description

Content-Type

application/json

Response content type.

Content-Length

integer

Response body size, in bytes.

Response body

The response body contains a JSON object with a status of the operation.

[

{

"status": "Supplier successfully created"

}

]

Status object properties are described in the following table.

Status object properties

Property

Value

Description

status

string

Status of the operation.

Response example

The following is an example of a POST suppliers request response.

НТТР/1.1 201 ОК

Date:Mon, 23 Dec 2019 09:56:10 UTC

Content-Type: application/json

Content-Length: 41

[{"status": "Supplier successfully created"}]

Error responses

For more information about possible response statuses, see section "Response statuses".

An error response contains a JSON object with the error description.

[

{

"status": "An error occurred while creating some suppliers",

"reason": "%REASON%"

}

]

Error object properties are described in the following table.

Error object properties

Property

Value

Description

status

string

Error description.

reason

string

Cause of the error.

Error response example

The following is an example of a POST suppliers error response.

ННТТР/1.1 400 Bad Request

Date:Mon, 23 Dec 2019 09:56:10 UTC

Content-Type: application/json

Content-Length: 92

 

[{"status": "An error occurred while creating some suppliers", "reason": "Incorrect supplier name"}]

Page top