Skip to main content

Request IP Feed Information in Batch Mode

The API Reference information for retrieving IP feed information can be found here.

Overview

The Threat Vault API can be used to request IP feed information in batch mode. Consider the following examples:

Keep a few things in mind when formatting your API query:

  1. All the query strings in Get requests must be a URL-Encoded parameter string. If you use a space in the URL-Encoded request, you must include either a plus sign (+) or %20 to replace the space.
  2. You can specify the content type of the request body and response by specifying the Content-Type header. Some responses generate an HTTP response in addition to a JSON object.
  3. Do not embed API keys in code or application source tree files. This can inadvertently expose the API key. Instead, consider storing the API key in environmental variables or files that are excluded from your application source tree files.

Example 1: A POST request to retrieve the IP feed information based on a list of IP addresses:

curl -X POST -d '{"ipaddr": ["1.33.230.137", "1.117.154.185", "1.117.180.42"]}' 'https://api.threatvault.paloaltonetworks.com/service/v1/ip-feed' \
-H 'X-API-KEY: API_KEY' \
-H 'Content-Type: application/json'

A successful API call returns, within the contents section, status="success" along with the IP feed results.

{
"success": true,
"link": {
"next": null,
"previous": null
},
"count": 3,
"data": [
{
"ipaddr": "1.33.230.137",
"name": "Malicious IP Feed",
"status": "released",
"release": {
"first_release_version": "3327",
"first_release_time": "2020-04-22T20:38:31Z"
},
"geo": "JP (Japan)",
"asn": "2514 (INFOSPHERE NTT PC Communications, Inc., JP)"
},
{
"ipaddr": "1.117.154.185",
"name": "Malicious IP Feed",
"status": "released",
"release": {
"first_release_version": "4090",
"first_release_time": "2022-05-21T21:43:42Z"
},
"geo": "CN (China)",
"asn": "45090 (TENCENT-NET-AP Shenzhen Tencent Computer Systems Company Limited, CN)"
},
{
"ipaddr": "1.117.180.42",
"name": "Malicious IP Feed",
"status": "released",
"release": {
"first_release_version": "3888",
"first_release_time": "2021-11-02T00:53:22Z"
},
"geo": "CN (China)",
"asn": "45090 (TENCENT-NET-AP Shenzhen Tencent Computer Systems Company Limited, CN)"
}
],
"message": "Successful"
}