About the API Explorer

About the API Explorer

The API Explorer provides a limited interface for the REST API as well as giving a view of the abilities of the REST API.

The API Explorer resides on the Firepower Management Center, and can be accessed via the Firepower Management Center at:

https://<management_center_IP_or_name>:<https_port>/api/api-explorer

This explorer provides the list of APIs available on the Firepower Management Center, and their details.

Authentication to the API Explorer

The REST API relies on the same authentication as the Firepower Management Center. Each function in the REST API maps to permissions in the Firepower Management Center.

You can log into the API Explorer using any account on the Firepower Management Center, but you will only be able to perform the functions for which the account has permissions. For more information on setting permissions for user roles, see the Firepower Management Center Configuration Guide.

The first time you connect to the API Explorer you may receive an error that the connection is not secure due to an invalid certificate. You will need to add an exception in your browser to use the certificate and accept the connection.

Logging into API Explorer

The REST API uses the same authentication and permission model as the Firepower Management Center. See the Firepower Management Center Configuration Guide for more information.

Before you begin

Make sure you have an account on your Firepower Management Center with the required permissions to perform the tasks you want to perform using the REST API.

Procedure


Step 1

Navigate to the following URL: https://<management_center_IP_or_name>:<https_port>/api/api-explorer

If you experience an extended load time for the logon screen when using a Firefox browser, enter about:support in the search bar and click the Refresh Firefox option, then view the Firepower Management Center interface with self-signed certificates in the same Firefox browser. For more information, see https://support.mozilla.org/en-US/kb/refresh-firefox-reset-add-ons-and-settings.

Step 2

Log in with your username and password and click "Sign In"


What to do next

Locate the desired resource and request.

Setting the Domain

The REST API can perform functions globally, in the default domain, or in specific domains.

Before you begin

You must have a configured Firepower Management Center, an account with permissions to access the REST API in one or more domains configured on your FMC.

Procedure


In the upper right, drop down the Domains menu and select the desired domain.


What to do next

Locate the desired resource and request type.

Obtaining Sample Code

You can use the Export Operation button in API Explorer to save the displayed method example as a Python or Perl script file to your local host. This script can be used to make that REST call, and can be integrated into your application. This is meant primarily as an educational and bootstrapping tool.

Obtaining Sample Code

The API Explorer can create sample code in Python and Perl to aid in creating a REST API client.

Before you begin

You must have a configured Firepower Management Center and an account on that center with the permissions required to use the desired REST API functions.

Procedure


Step 1

Select the resource where you want to obtain sample code from the API INFO menu.

Step 2

Locate the desired function and select DELETE, PUT, POST, or GET.

Step 3

Select and input all other parameters for the desired function. This will vary depending on the function.

Step 4

On the right, drop down the menu for "Export operation in" and select "Python script" or "Perl script".

Step 5

The sample code will pop up in a new window. Cut and paste this code to use in your REST API client.


What to do next

Use this sample code to implement your own REST API client.

Viewing API Parameters

Each resource has a set of parameters and fields associated with it. You can view the parameters and fields by performing any of the supported operations for that resource within API Explorer.

Before you begin

You must have a configured Firepower Management Center and an account on that center with the permissions required to use the desired REST API functions.

Procedure


Step 1

Select the desired resource.

Step 2

Select one of the supported operations for that resource.