MSDN

Azure Sentinel REST API

Overview

The Azure Sentinel API enables you to programmatically manage incidents, watchlists, and threat intelligence in your Sentinel workspace. Use it to automate workflows, integrate with third‑party tools, and build custom dashboards.

Base URL: https://management.azure.com

Authentication

All requests must be authenticated with Azure AD bearer tokens. Obtain a token using the https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token endpoint with the https://management.azure.com/.default scope.

curl -X POST https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token \
  -d "client_id={client_id}" \
  -d "client_secret={client_secret}" \
  -d "grant_type=client_credentials" \
  -d "scope=https://management.azure.com/.default"

Endpoints

OperationHTTP MethodURI Template
List IncidentsGET/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents?api-version=2023-01-01
Get IncidentGET/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}?api-version=2023-01-01
Create IncidentPUT/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}?api-version=2023-01-01
Update IncidentPATCH/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}?api-version=2023-01-01
Delete IncidentDELETE/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}?api-version=2023-01-01

Sample Requests

List Incidents

curl -X GET "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents?api-version=2023-01-01" \
  -H "Authorization: Bearer {access_token}"

Create an Incident

{
  "properties": {
    "title": "Suspicious PowerShell Activity",
    "severity": "High",
    "status": "New",
    "description": "Detected anomalous PowerShell command execution on host XYZ."
  }
}
curl -X PUT "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/incidents/{incidentId}?api-version=2023-01-01" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d @incident.json

Error Codes

StatusCodeMessage
400BadRequestRequest parameters are missing or invalid.
401UnauthorizedAuthentication token is missing or expired.
403ForbiddenCaller does not have permission to perform the operation.
404NotFoundSpecified resource could not be found.
429TooManyRequestsRate limit exceeded. Retry after the value in Retry-After header.
500InternalServerErrorUnexpected server error.

References