Skip to content

Let’s get started with APIs

About
Infoblox APIs

BloxOne APIs are RESTful web services that allow users to interact with the Infoblox Cloud Service Platform (CSP). APIs are available for the two primary applications powered by the BloxOne Platform and include:

  • BloxOne DDI APIs— these are used to manage and automate Infoblox DDI services in the cloud
  • BloxOne Threat Defense APIs—these enable organizations to manage the network security aspect of the BloxOne Threat Defense infrastructure

Follow these simple steps to get started with BloxOne APIs:

  1. Set up your BloxOne account [Optional]
  2. Create service accounts
  3. Understand authentication of API requests
  4. Create your API key
  5. Execute an API call
    1. Using Postman
    2. Using Curl

Set up your BloxOne account [Optional]

Contact your sales representative at Infoblox to get a BloxOne account.

Create your API key (see step 4).

BloxOne APIs require a key to be provided for authentication.

Establish service account users

For integrations, you will want to enable third-party applications to access the Cloud Services Portal through the API. This is accomplished by establishing service account users. By design, service account users are not allowed to sign in to the Cloud Services Portal. Instead, you will create API keys for their use that grant access. Each service API key is associated with a service account user. A service account user can be associated up to 10 service API keys. For information, see Configuring Service API Keys.

Understand API keys and authentication

An API key is an authentication token that is passed on to the BloxOne API to facilitate user (interactive or service) authentication in an API request. The API key acts as a secret token for authentication, and is assigned a set of access that is specific to a user. Any users that are allowed to log in to the Cloud Services Portal can create user API keys for themselves. The user API key can be used to track and control how the API is being used, such as preventing malicious use or abuse of the API.

To authenticate API requests, you should pass an HTTP “Authorization” header with the API key and the prefix “Token.”

The following is an example API request using curl commands in JSON format:

curl -k -i -H "Authorization: Token <YOUR API Key>" "https://csp.infoblox.com/api/dnsdata/v2/dns_event?source=rpz&t0=1483228800&t1=1514764799"

Create API keys

1. Launch the Cloud Services Portal from a browser.

2. Authenticate with your newly obtained/existing user credentials.

3. Once you get to the homepage, hover your name at the bottom left of the screen, and select User Profile.

4. Click on the User API Keys tab and select Create.

5. In the pop-up, specify the Name and the Expiry Date. Ensure that the expiry date is set to a later date from the day you create this API key.

6. Select Save & Close.

7. You will see your API key on top of the screen. Please make sure you copy it and save it on a trusted platform.

Execute your first API call

We will perform a simple API call to fetch all IP Spaces in your organization.

Using Postman:

Postman is an API collaboration platform used for making REST, SOAP, or GraphQL requests. If you don’t already have the application, you can download it from here.

1. Launch Postman.

2. Select Create a Request.

3. Ensure you select GET from the dropdown.

4. Enter the following URL in the input box:

https://csp.infoblox.com/api/ddi/v1/ipam/ip_space

5. In the Authorization tab, select API Key as Type.

6. Enter Authorization as Key.

7. Enter Token followed by your API key (format: Token <api-key>) as Value.

8. Click on Send to make the API call.

9. You can see the results of the call in Body section per the example below.

The GET API’s result returns a list of all the existing objects (in this example, IP Spaces) with all the associated details.

Using Curl:

Curl is used in command lines or scripts to transfer data. Learn more about it here.

If you don’t already have it installed on your system, you can download it from here.

1. Open a terminal.

2. Replace the api-key value and execute the following command:

curl --location --request GET 'https://csp.infoblox.com/api/ddi/v1/ipam/ip_space' \
--header 'Authorization: Token <api-key>'

3. You can see the results per the example below.

Ready to take BloxOne Threat Defense for a free test-drive?

Back To Top