DevNet Associate DEVASC 200-901 Official Certification Guide by Adrian Iliesiu (z-lib.org)

(andrew) #1

Threat Grid API Format


All Threat Grid API calls are made to the URL
https://panacea.threatgrid.com/api/. The format of the
API is as follows:


https://panacea.threatgrid.com/api//<api-
endpoint>?q=&api_key=apikey


where could be “v2” or “v3”, is the
actual API and the apikey is the key associated with the
account.


API Keys


To get the API key from the Threat Grid portal UI, follow
these steps:


Step 1. Go to the Threat Grid portal UI.
Step 2. From the Welcome menu in the upper-right
corner of the navigation bar, select Manage
Users.
Step 3. Navigate (use Search if necessary) to the User
Details page for the integration’s user account
and copy the API key.

This API key is used in every API call that is made to
Threat Grid.


The following sections provide some examples of
working with the Threat Grid APIs.


Who Am I


To see if the API key is working, you can use the GET
method and the API
https://panacea.threatgrid.com/api/v3/session/whoami


. You need to pass the API key as a query parameter, as
shown in Example 11-18.


Example 11-18 Threat Grid: Who Am I

Click here to view code image

Free download pdf