GET suppliers

Gets a list of suppliers and their statuses.

Only suppliers that were created with the REST API, FalsePositive, and InternalTI suppliers are returned.

Path

/api/%API_VERSION%/suppliers

Method

GET

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.

Request body

This request has an empty body.

Request example

The following is an example of a GET suppliers request.

GET https://192.0.2.57/api/1.1/suppliers

 

Accept: application/json

Authorization: Basic dXNlcjpwYXNzd29yZA==

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 array of supplier status objects.

[

{

"name":"%SUPPLIER_NAME_1%",

"status": "%SUPPLIER_STATUS%"

},

...

{

"name":"%SUPPLIER_NAME_N%",

"status": "%SUPPLIER_STATUS%"

}

]

Supplier status object properties are described in the following table.

Supplier status object properties

Property

Value

Description

name

string

Name of the supplier.

status

string

Status of the supplier.

This value is enabled if the supplier is enabled.

This value is disabled if the supplier is disabled.

Response example

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

НТТР/1.1 200 ОК

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

Content-Type: application/json

Content-Length: 99

[

{"name":"ExampleSupplier", "status":"enabled"}, {"name":"AnotherExampleSupplier", "status":"disabled"}

]

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 getting a list of suppliers",

}

]

Error object properties are described in the following table.

Error object properties

Property

Value

Description

status

string

Error description.

Error response example

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

НТТР/1.1 500 Internal Server Error

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

Content-Type: application/json

Content-Length: 63

[{"status": "An error occurred while getting a list of suppliers"}]

Page top