mirror of
https://github.com/MicrosoftDocs/windows-itpro-docs.git
synced 2025-05-12 21:37:22 +00:00
update file name
This commit is contained in:
parent
fc94a872db
commit
00b2a73647
@ -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:
|
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" />
|
<span id="session-object" />
|
||||||
## Step 2: Create request 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.
|
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" />
|
<span id="calls" />
|
||||||
## Step 3: Create calls to the custom threat intelligence API
|
## 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:
|
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.
|
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
|
## Step 4: Create a new alert definition
|
||||||
The following example demonstrates how you to 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" />
|
<span id="ioc" />
|
||||||
## Step 5: Create a new indicator of compromise
|
## 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.
|
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
|
## Complete code
|
||||||
You can use the complete code to create calls to the API.
|
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)]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user