Cisco AMP For Endpoints API FAQ
Cisco AMP For Endpoints API FAQ
• You are now ready to use the API Client ID and API Key to access the API.
Q. Where can I find the documentation for the API?
A. API documentation can be found at the following address:
https://api-docs.amp.sourcefire.com/
Q. What format is the reply to an API query?
A. The message container is JSON so replies to queries will be in JSON format.
Q. Is there a rate limit for how many queries I can make against the API?
A. Yes. You can make 1000 queries to the API each hour. Every response to a query
also includes the rate limit in the response itself.
Q. Is there a limit to how many results are returned for a query?
A. Yes. When you query for a resource through the API a maximum of 500 results
will be returned. However, the results are paginated and a link to the next set of
results is included in the query response. You can also use query parameters to filter
the data if you want to return fewer results.
Q. Can I see some sample code?
A. The API documentation provides several examples to access the API. The
documentation can be found at the following address:
https://api-docs.amp.sourcefire.com/
Q. What information/data can I access through the API?
A. Please refer to the API documentation for a complete list of resources you can
access. At a high level, you can access the following:
• Computers
o activity
o trajectory
• Events
• Groups
For more details refer to the documentation
https://api-docs.amp.sourcefire.com/
Q. What are some use cases for the API?
A. The API gives you flexibility to access data and information about your AMP for
Endpoints deployment. You can use the API to query for data and integrate with
other tools and downstream process within your organization. Use cases include,
but are not limited to, the following:
• Query for computers running vulnerable applications and integrate the
output with a patch management tool or system.
• Query events and integrate with a 3rd party tool such as Splunk.
• Query for top infected systems in the last 7 days to generate a custom report
using the tool of your choice.
• Query for every computer that has seen a particular file.
• Query for all computers that have communicated with a certain internal or
external IP address.
• Query for all the file and network activity for a given computer (device
trajectory).
Q. Can I see a simple example of accessing the API?
A. Below is a simple example using the command line utility cURL, available on most
Mac OS X and UNIX-like systems. Basic authentication is used by base64 encoding
your API Client ID and API key pair separated by a semicolon (:). A simple way to
base64 encode your key pair on most Linux or BSD systems is by using the base64
command or openssl.
>base64 <<< API_CLIENT_ID:API_KEY
>openssl base64 <<< API_CLIENT_ID:API_KEY
curl -X GET \
-H 'accept: application/json' \
-H 'content-type: application/json' \
-H 'authorization: Basic <INSERT_BASE64ENCODED_CLIENTID:APIKEY_PAIR> \
'https://api.amp.sourcefire.com/v0/version'
Q. Can I see some simple source code for accessing the API?
A. Below is Ruby code for getting Events and Computers using the API. This sample
requires the HTTParty gem.
> gem install httparty
require 'rubygems'
require 'httparty'
require 'base64'
class AMP
include HTTParty
BASE_URL="https://api.amp.sourcefire.com/v0/"
def version
get("version")
@response.parsed_response["version"]
end
end
CLIENT_ID = "<INSERT_CLIENTID_HERE>"
API_KEY = "<INSERT_API_KEY_HERE>"