update file name

This commit is contained in:
jcaparas 2017-03-02 20:57:30 -08:00
parent fc94a872db
commit 00b2a73647
2 changed files with 6 additions and 6 deletions

View File

@ -39,20 +39,20 @@ The following example demonstrates how to obtain an Azure AD access token that y
Replace the *tenant\_id*, *client_id*, and *client_secret* values with the ones you got from **Preferences settings** page in the portal:
[!code[CustomTIAPIpython](./code/example.py1#L1-L17)]
[!code[CustomTIAPI](./code/example.py#L1-L17)]
<span id="session-object" />
## Step 2: Create request session object
Add HTTP headers to the session object, including the Authorization header with the token that was obtained.
[!code[CustomTIAPIpython](./code/example.py1#L19-L23)]
[!code[CustomTIAPI](./code/example.py#L19-L23)]
<span id="calls" />
## Step 3: Create calls to the custom threat intelligence API
After adding HTTP headers to the session object, you can now create calls to the API. The following example demonstrates how you can view all the alert definition entities:
[!code[CustomTIAPIpython](./code/example.py1#L25-L26)]
[!code[CustomTIAPI](./code/example.py#L25-L26)]
If this is the first time to use the API, the response is empty.
@ -60,15 +60,15 @@ If this is the first time to use the API, the response is empty.
## Step 4: Create a new alert definition
The following example demonstrates how you to create a new alert definition.
[!code[CustomTIAPIpython](./code/example.py1#L28-L39)]
[!code[CustomTIAPI](./code/example.py#L28-L39)]
<span id="ioc" />
## Step 5: Create a new indicator of compromise
You can now use the alert ID obtained from creating a new alert definition to create a new indicator of compromise.
[!code[CustomTIAPIpython](./code/example.py1#L41-L51)]
[!code[CustomTIAPI](./code/example.py#L41-L51)]
## Complete code
You can use the complete code to create calls to the API.
[!code[CustomTIAPIpython](./code/example.py1#L1-L51)]
[!code[CustomTIAPI](./code/example.py#L1-L51)]