Bulk Simple API

NOTE: this API is deprecated and will be removed in future APIv3.

The Bulk Simple API allows to fetch the last 10 or 100 results for given category of data and only for the last 30-days, by providing a list contained within a text file. You have to provide a unique value for the asset, which can only be an IP address. 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:

Using curl

You can use curl in the following way to call the Bulk Simple API:

echo '1.1.1.1' > /tmp/ip.txt
echo '8.8.8.8' >> /tmp/ip.txt

curl -H 'Content-Type: application/json' -H 'Authorization: bearer YOUR_APIKEY' -XPOST 'https://www.onyphe.io/api/v2/bulk/simple/datascan/ip' --data-binary @/tmp/ip.txt

Output:

{"@category":"datascan","@timestamp":"2023-03-16T10:55:00.000Z",[..]
{"@category":"datascan","@timestamp":"2023-03-16T10:21:37.000Z",[..]
[..]

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" -XPOST 'https://www.onyphe.io/unrated/api/v2/bulk/simple/datascan/ip?k=YOUR_APIKEY' --data-binary @/tmp/ip.txt