GET tags/{tag}

Gets information about a specified tag.

Path

/api/1.1/tags/{tag}

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 parameters

This request has the following parameters:

Request parameters

Name

Parameter type

Description

tag

Path

Name of the tag.

Request body

This request has an empty body.

Request example

The following is an example of a GET tags/{tag} request.

GET https://192.0.2.57/api/1.1/tags/WIN-TROJAN

Accept: application/json

Authorization: Basic AWxhZGRpbjpvcGVuc2VzYW23

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 with a tag object.

[

{

"name": "%TAG_NAME%",

"weight": %TAG_WEIGHT%

}

]

Tag object properties are described in the following table.

Tag object properties

Property

Value

Description

name

string

Name of the tag.

weight

integer

Significance of the tag, from 0 (lowest significance) to 5 (highest significance).

Response example

The following is an example of a response to the GET tags/{tag} request.

НТТР/1.1 200 ОК

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

Content-Type: application/json

Content-Length: 150

[

{

"name": "WIN-TROJAN",

"weight": 5

}

]

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 tag info",

"reason": "Tag doesn't exist"

}

]

Error object properties are described in the following table.

Error object properties

Property

Value

Description

status

string

Error description.

reason

string

The reason of the error.

This property may be missing.

Error response example

The following is an example of an error response to the GET tags/{tag} request.

НТТР/1.1 404 Tag doesn't exist

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

Content-Type: application/json

Content-Length: 150

[

{

"status": "An error occurred while getting tag info",

"reason": "Tag doesn't exist"

}

]

Page top