Azure Resources API

Use these operations to interact with the Azure Resources integration in Cortex.

Required permissions

Your API key must have the Configure integrations permission.

Operations

List Azure Resources types

get
Authorizations
Query parameters
includeDisabledbooleanOptional

Whether to include disabled Azure Resources types

Default: false
pageSizeinteger · int32Required

Number of results to return per page, between 1 and 1000. Default 250.

Default: 250
pageinteger · int32Required

Page number to return, 0-indexed. Default 0.

Default: 0
Responses
200
Successfully found Azure Resources types
application/json
get
GET /api/v1/azure-resources/types HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
{
  "hasMore": true,
  "page": 1,
  "total": 1,
  "totalPages": 1,
  "types": [
    {
      "enabled": true,
      "type": "microsoft.policyinsights/policyevents"
    }
  ]
}

Retrieve configurations

get
Authorizations
Responses
200
Successfully found configurations
application/json
get
GET /api/v1/azure-resources/configurations HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
{
  "configurations": [
    {
      "alias": "text",
      "azureTenantId": "text",
      "clientId": "text",
      "isDefault": true,
      "lastFour": "text",
      "subscriptionId": "text"
    }
  ]
}

Retrieve default configuration

get
Authorizations
Responses
200
Successfully found default configuration
application/json
get
GET /api/v1/azure-resources/default-configuration HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
{
  "alias": "text",
  "azureTenantId": "text",
  "clientId": "text",
  "isDefault": true,
  "lastFour": "text",
  "subscriptionId": "text"
}

Retrieve a configuration

get
Authorizations
Path parameters
aliasstringRequired
Responses
200
Successfully found configuration
application/json
get
GET /api/v1/azure-resources/configuration/{alias} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
{
  "alias": "text",
  "azureTenantId": "text",
  "clientId": "text",
  "isDefault": true,
  "lastFour": "text",
  "subscriptionId": "text"
}

Add a single configuration

post
Authorizations
Body
aliasstringRequired
azureTenantIdstringRequired
clientIdstringRequired
clientSecretstringRequired
isDefaultbooleanRequired
subscriptionIdstringRequired
Responses
200
Successfully added configuration
application/json
post
POST /api/v1/azure-resources/configuration HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 120

{
  "alias": "text",
  "azureTenantId": "text",
  "clientId": "text",
  "clientSecret": "text",
  "isDefault": true,
  "subscriptionId": "text"
}
{
  "configurations": [
    {
      "alias": "text",
      "azureTenantId": "text",
      "clientId": "text",
      "isDefault": true,
      "lastFour": "text",
      "subscriptionId": "text"
    }
  ]
}

Validate all configurations

post
Authorizations
Responses
200
Successfully validated all configurations
application/json
post
POST /api/v1/azure-resources/configuration/validate HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
{
  "configurations": [
    {
      "alias": "text",
      "isValid": true,
      "message": "text"
    }
  ]
}

Validate a configuration

post
Authorizations
Path parameters
aliasstringRequired
Responses
200
Successfully validated configuration
application/json
post
POST /api/v1/azure-resources/configuration/validate/{alias} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
{
  "alias": "text",
  "isValid": true,
  "message": "text"
}

Add multiple configurations

post
Authorizations
Body
Responses
200
Successfully added configurations
application/json
post
POST /api/v1/azure-resources/configurations HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 141

{
  "configurations": [
    {
      "alias": "text",
      "azureTenantId": "text",
      "clientId": "text",
      "clientSecret": "text",
      "isDefault": true,
      "subscriptionId": "text"
    }
  ]
}
{
  "configurations": [
    {
      "alias": "text",
      "azureTenantId": "text",
      "clientId": "text",
      "isDefault": true,
      "lastFour": "text",
      "subscriptionId": "text"
    }
  ],
  "skippedConfigurations": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}

Update configured Azure Resources types

put
Authorizations
Body
Responses
200
Successfully replaced Azure Resources types
application/json
put
PUT /api/v1/azure-resources/types HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 75

{
  "types": [
    {
      "enabled": true,
      "type": "microsoft.policyinsights/policyevents"
    }
  ]
}
{
  "hasMore": true,
  "page": 1,
  "total": 1,
  "totalPages": 1,
  "types": [
    {
      "enabled": true,
      "type": "microsoft.policyinsights/policyevents"
    }
  ]
}

Update a configuration

put

WARNING: Updating aliases for configurations or changing the default configuration could cause entity YAMLs that use this integration to break.

Authorizations
Path parameters
aliasstringRequired
Body
aliasstringRequired
isDefaultbooleanRequired
Responses
200
Successfully updated configuration
application/json
put
PUT /api/v1/azure-resources/configuration/{alias} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 33

{
  "alias": "text",
  "isDefault": true
}
{
  "configurations": [
    {
      "alias": "text",
      "azureTenantId": "text",
      "clientId": "text",
      "isDefault": true,
      "lastFour": "text",
      "subscriptionId": "text"
    }
  ]
}

Delete all configurations

delete
Authorizations
Responses
200
Successfully deleted all configurations
delete
DELETE /api/v1/azure-resources/configurations HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*

No content

Delete a configuration

delete
Authorizations
Path parameters
aliasstringRequired
Responses
200
Successfully deleted configuration
application/json
delete
DELETE /api/v1/azure-resources/configuration/{alias} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
{
  "configurations": [
    {
      "alias": "text",
      "azureTenantId": "text",
      "clientId": "text",
      "isDefault": true,
      "lastFour": "text",
      "subscriptionId": "text"
    }
  ]
}

Last updated

Was this helpful?