By using 'X-auth-access-token' you can now make an
API call to get the server version. Example 11-10 uses the
Python requests command to make the REST call, the
GET method, and the API
https://fmcrestapisandbox.cisco.com/api/fmc_platform
/v1/info/serverversion.
Example 11-10 Python Code to Get the Server Version
via the Firepower Management Center AP
Click here to view code image
""" Get Server Version """
import requests
url =
"https://fmcrestapisandbox.cisco.com/api/fmc_platform/v1/info/serverversion"
headers = {
'X-auth-access-token': "2abd7bdc-16f8-477f-
8022-7f193e71c847",
}
response = requests.request("GET", url,
headers=headers, verify=False)
print(response.text)
Now that you know the basics of accessing the API, you
can explore all the APIs that Firepower Management
Center has to offer.
As indicated earlier, Cisco DevNet provides an instance
of Firepower Management Center in the sandbox. The
easiest way to figure out specific operations available
with any version is by searching for “FMC API Explorer.”
You can launch the API Explorer by using the URL
https://fmc_url/api/api-explorer/, or if you have
reserved the DevNet sandbox, you can simply use
https://fmcrestapisandbox.cisco.com/api/api-
explorer/#. Figure 11-6 shows the API Explorer, which
allows you to explore all possible FMC APIs.