User Tools

Site Tools


infoblox:api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
infoblox:api [2026/01/16 16:14] – [Get Internal Domain List] bstaffordinfoblox:api [2026/03/07 00:25] (current) bstafford
Line 10: Line 10:
     * [[https://docs.infoblox.com/space/NIOS/35400616/NIOS|Official Doc Page]] linking to both of the links above.     * [[https://docs.infoblox.com/space/NIOS/35400616/NIOS|Official Doc Page]] linking to both of the links above.
  
 +===== Convert JSON =====
 +The "jq" command is excellent for parsing JSON. 
 +
 +Page on transforming JSON with jq [[www.digitalocean.com/community/tutorials/how-to-transform-json-data-with-jq|here]].
 ===== Quick CURL===== ===== Quick CURL=====
 <code>curl -X GET -H "Authorization: Token token=<API_KEY>" "https://csp.infoblox.com/tide/api/data/threats?type=host&class=bot"</code> <code>curl -X GET -H "Authorization: Token token=<API_KEY>" "https://csp.infoblox.com/tide/api/data/threats?type=host&class=bot"</code>
Line 284: Line 288:
 API Docs [[https://csp.infoblox.com/apidoc?url=https%3A%2F%2Fcsp.infoblox.com%2Fapidoc%2Fdocs%2FAtcfw#/|here]]. API Docs [[https://csp.infoblox.com/apidoc?url=https%3A%2F%2Fcsp.infoblox.com%2Fapidoc%2Fdocs%2FAtcfw#/|here]].
  
 +===== Subnet Filter =====
 +
 +
 +<code>curl -s --location 'https://csp.eu.infoblox.com/api/ddi/v1/ipam/subnet?_offset=0&_tfilter=Type%3DHo*&_limit=5&_is_total_size_needed=true' \
 +--header 'Accept: application/json' \
 +--header 'Authorization: Token YOUR_API_KEY_HERE' \
 +| jq -r '.results[] | "\(.address)/\(.cidr)"' </code>
 +
 +This command will find all subnets that have the tag "Type" with value "Home" and return JSON data.
 +
 +You can then use the jq command to filter the subnet address value and the subnet CIDR value and display in format address/cidr
 +==== AWS IPAM ====
 +To get the Infoblox ID needed by AWS IPAM for management:
 +<code>curl -s -H "Authorization: Token <YOUR_API_KEY>" https://csp.infoblox.com/v2/current_user | jq '.result.account_infoblox_id'</code>
 ==== Get Internal Domain List ==== ==== Get Internal Domain List ====
 The following gets the full list of Internal Domain lists (Security) as well as their contents. You can use this to get the ID of each list. The following gets the full list of Internal Domain lists (Security) as well as their contents. You can use this to get the ID of each list.
infoblox/api.1768580099.txt.gz · Last modified: by bstafford