Get the IPv4 or IPv6 prefix of the CIDR given.
POST {{baseUrl}}/v1/asn/prefix
What
Obtain the IPv4 or IPv6 prefix and the Autonomous System 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.
- asn
: the URI to query the full details of the ASN.
- object_type
: the type of the prefix. The allowed values are: IPv4 or IPv6.
- maintainer
: the information about the maintainer of this prefix in the registry.
- description
: the description of the prefix as registered in the registry.
- registry_date
: the date of registration of the prefix in the registry. The format is YYYY-MM-DD.
- registry_status
: the URI of the status of the prefix as stored in the registry.
- 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.
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"=>"sed velit ea"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"object_type":"eiusmod dolore ad non elit","mantainer":"dolore","description":"eiusmod eu sed","self":"adipisicing ex ea","asn":"nisi dolor ut","registry_date":"37670844","registry_status":"laborum Ut elit minim","score":-6518786,"risk":"HIGH"}