Get the IPv4 or IPv6 prefix of the CIDR given.
POST {{baseUrl}}/v1/datacenter/prefix
What
Obtain the IPv4 or IPv6 prefix and the Datacenter information of the CIDR passed in the body as a POST method. This endpoint works around the problem of passing '/' addresses in the URI.
Parameters
The endpoint accepts only the following parameter in the body as a JSON object:
- prefix
: (Mandatory) The CIDR v4 or v6 to be queried.
Result
- The result is a JSON object with the following structure:
self
: the URI to individual IPv4 prefix.datacenter_id
: the URI to query the full details of the Datacenter.score
: The risk score of the prefix. It ranges from 0 to 99.risk
: The risk of the prefix. The allowed values are: LOW, MEDIUM, HIGH. It's a human readable representation of the score.min_score
: The minimum risk score of the prefix. It ranges from 0 to 99.max_score
: The maximum risk score of the prefix. It ranges from 0 to 99.ip_abuse_total
: The total number of IPs that have been reported as abuse in the range.
Errors
The endpoint will return the following errors:
- a 404 Not Found
error if the prefix information was not found.
- a 422 Unprocessable Entity
error if the CIDR is malformed.
It will also return the API Global errors described in the API description.
Request Body
{"prefix"=>"dolor iru"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"datacenter":"cillum mollit cupidatat deserunt in","self":"proident do","min_score":0,"max_score":0,"ip_abuse_total":0,"score":78259508,"risk":"LOW"}