This document describes about the Cisco Advanced Malware Protection (AMP) for Endpoints. Cisco AMP for Endpoints comes with an Application Programming Interface (API). It allows you to pull data from an AMP for Endpoints deployment, and manipulate them, when necessary.
This article demonstrates some basic functionalities of the API. The examples on this article uses a Windows 7 endpoint.
Contributed by Matthew Franks, Nazmul Rajib, and Cisco TAC Engineers.
Generate and Delete API Credentials
In order to use the AMP for Endpoint API, you have to set up an API credential. Follow the given steps to create a credential through the AMP Console.
Step 1: Log into the Console, and navigate to Accounts > API Credentials.
Step 2: Click New API Credential to create a new set of Keys.
Step 3: Provide an Application name. Select the Scope of Read-only or Read & Write.
Note: An API credential with read and write scope can make changes to your Cisco AMP for Endpoints configuration that might cause significant problems with your endpoints. Some of the input protections built into the Cisco AMP for Endpoints Console do not apply to the API.
Step 4: Click the Create button. The API Key Details appears. Save this information as some of it will not be available after leaving the screen.
Note: API credentials (API Client ID & API Key) will allow other programs to retrieve and modify your Cisco AMP for Endpoints data. It is functionally equivalent to a username and password, and should be treated as such.
Caution: Your API credentials are displayed once only. If you lose the credentials, you have to generate new ones.
Delete the API credentials for an application if you suspect they have been compromised, and create a new one. When you delete an API credential, it locks out the client who uses the old ones, so update them with the new credentials.
API Versions and Current Options
There are currently two versions of the AMP for Endpoints API - Version 0 and Version 1. The Version 1 has additional functionality versus Version 0. The documentation for Version 1 is here. You can pull this information witn the use of Version 1.
File List Items
Click on the relevant command in the document to see examples of its usage.
API Command Break-down and Example
Each API command contains similar information and can essentially break down to a curl command and can be looked at like this:
When you use the curl command with the -o option, it allows you to save the output to a file. In this case the file name is “yourfilename.json”.
Tip: More information on .json files can be found here.
The next step in the curl command is to set the address with your credentials before the @ symbol. When you generatie API Credentials, you know the clientID and APIKey, so this section of the command will resemble the link given below.
After you run the command, you should see a computers.json file downloaded to the directory where you initiated the command.
Note: Curl is available online and compiled for lots of platforms that includes Windows (generally you’ll want to use the Win32 – Generic version).
When you open the file you will see all of the data in a single line. If you would like to see this in its proper format, you can install a browser plugin to format it as JSON and open the file in a browser. This shows information for your computers that you can use however you would like, such as: