Simple API
NOTE: this API is deprecated and will be removed in future APIv3.
The Simple API allows to fetch the last 10 or 100 results for given category of data and only for the last 30-days. You have to provide a unique value for the asset, which can be, depending on the API, an IP address, a domain or a hostname (FQDN), a string (match against the data field) or a datamd5 value. You can just pass the asset value and not a full ONYPHE Query Language search. This API has very limited value, that’s why it will be deprecated.
The available endpoints are:
- /simple/geoloc/{IP}: you have to give a valid IPv4 or IPv6 address (example: 8.8.8.8);
- /simple/inetnum/{IP}: you have to give a valid IPv4 or IPv6 address (example: 8.8.8.8);
- /simple/pastries/{IP}: you have to give a valid IPv4 or IPv6 address (example: 8.8.8.8);
- /simple/resolver/{IP}: you have to give a valid IPv4 or IPv6 address (example: 8.8.8.8);
- /simple/sniffer/{IP}: you have to give a valid IPv4 or IPv6 address (example: 8.8.8.8);
- /simple/synscan/{IP}: you have to give a valid IPv4 or IPv6 address (example: 8.8.8.8);
- /simple/threatlist/{IP}: you have to give a valid IPv4 or IPv6 address (example: 8.8.8.8);
- /simple/datashot/{IP}: you have to give a valid IPv4 or IPv6 address (example: 8.8.8.8);
- /simple/topsite/{IP}: you have to give a valid IPv4 or IPv6 address (example: 8.8.8.8);
- /simple/vulnscan/{IP}: you have to give a valid IPv4 or IPv6 address (example: 8.8.8.8);
- /simple/whois/{IP}: you have to give a valid IPv4 or IPv6 address (example: 8.8.8.8);
- /simple/ctl/{DOMAIN|HOSTNAME}: you have to give a valid domain or hostname;
- /simple/datascan/{IP|STRING}: you have to give a valid IPv4 or IPv6 address (example: 8.8.8.8) or a search string (exemple: confidential);
- /simple/datascan/datamd5/{MD5}: you have to give a valid MD5 string;
- /simple/resolver/forward/{DOMAIN|HOSTNAME}: you have to give a valid domain or hostname;
- /simple/resolver/reverse/{IP}: you have to give a valid IPv4 or IPv6 address (example: 8.8.8.8);
- /simple/onionscan/{ONIONDOMAIN|ONIONHOSTNAME}: you have to give a valid onion domain or onion hostname;
- /simple/onionshot/{ONIONDOMAIN|ONIONHOSTNAME}: you have to give a valid onion domain or onion hostname.
Using curl
You can use curl in the following way to call the Simple API:
curl -H 'Content-Type: application/json' -H 'Authorization: bearer YOUR_APIKEY' -XGET 'https://www.onyphe.io/api/v2/simple/datascan/8.8.8.8'
Output:
{
"count": 100,
"error": 0,
"max_page": 1,
"myip": "<redacted>",
"page": 1,
"page_size": 100,
"results": [
{
"@category": "datascan",
"@timestamp": "2023-03-16T10:43:54.000Z",
[..]
],
"status": "ok",
"text": "Success",
"took": 0.028,
"total": 3550
}
Using curl against Unrated API endpoint
If you want to query against the Unrated API endpoint, you have to pass the API key as an HTTP parameter as the Authorization header will be used to store Basic authentication credentials based on your login email address and your API key as a password:
LOGIN=`echo -n YOUR_LOGIN_EMAIL | sed 's/@/_/g'`
PASS=YOUR_APIKEY
BASIC=`echo -n $LOGIN:$PASS | base64 -w 0`
curl -H 'Content-Type: application/json' -H "Authorization: basic $BASIC" -XGET 'https://www.onyphe.io/unrated/api/v2/simple/datascan/8.8.8.8?k=YOUR_APIKEY'