AWS API

Use these operations to interact with the AWS integration in Cortex.

Required permissions

Your API key must have the Configure integrations permission.

Operations

List AWS types

get
Authorizations
AuthorizationstringRequired

All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.

Query parameters
includeDisabledbooleanOptional

When true, includes all AWS types supported

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
get
/api/v1/aws/types
GET /api/v1/aws/types?pageSize=250&page=0 HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "hasMore": true,
  "page": 1,
  "total": 1,
  "totalPages": 1,
  "types": [
    {
      "enabled": true,
      "type": "AWS::S3::Bucket"
    }
  ]
}

Retrieve a configuration

get
Authorizations
AuthorizationstringRequired

All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.

Path parameters
accountIdstringRequired
Responses
get
/api/v1/aws/configurations/{accountId}
GET /api/v1/aws/configurations/{accountId} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "accountId": "text",
  "accountName": "text",
  "role": "text"
}

Retrieve configurations

get
Authorizations
AuthorizationstringRequired

All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.

Responses
get
/api/v1/aws/configurations
GET /api/v1/aws/configurations HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "configurations": [
    {
      "accountId": "text",
      "accountName": "text",
      "role": "text"
    }
  ]
}

Add a single configuration

post
Authorizations
AuthorizationstringRequired

All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.

Body
accountIdstringRequired

The account ID for the AWS account

rolestringRequired

The IAM role Cortex would be assuming

Responses
post
/api/v1/aws/configurations
POST /api/v1/aws/configurations HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 34

{
  "accountId": "text",
  "role": "text"
}
{
  "accountId": "text",
  "accountName": "text",
  "role": "text"
}

Validate all configurations

post
Authorizations
AuthorizationstringRequired

All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.

Responses
post
/api/v1/aws/configurations/all/validate
POST /api/v1/aws/configurations/all/validate HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "configurations": [
    {
      "alias": "text",
      "isValid": true,
      "message": "text"
    }
  ]
}

Validate a configuration

post
Authorizations
AuthorizationstringRequired

All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.

Path parameters
accountIdstringRequired
Responses
post
/api/v1/aws/configurations/validate/{accountId}
POST /api/v1/aws/configurations/validate/{accountId} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "alias": "text",
  "isValid": true,
  "message": "text"
}

Update configurations

put
Authorizations
AuthorizationstringRequired

All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.

Body
Responses
put
/api/v1/aws/configurations
PUT /api/v1/aws/configurations HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 55

{
  "configurations": [
    {
      "accountId": "text",
      "role": "text"
    }
  ]
}
{
  "configurations": [
    {
      "accountId": "text",
      "accountName": "text",
      "role": "text"
    }
  ]
}

Update configured AWS types

put
Authorizations
AuthorizationstringRequired

All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.

Body
Responses
put
/api/v1/aws/types
PUT /api/v1/aws/types HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 53

{
  "types": [
    {
      "enabled": true,
      "type": "AWS::S3::Bucket"
    }
  ]
}
{
  "types": [
    {
      "enabled": true,
      "type": "AWS::S3::Bucket"
    }
  ]
}

Delete all configurations

delete
Authorizations
AuthorizationstringRequired

All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.

Responses
delete
/api/v1/aws/configurations
DELETE /api/v1/aws/configurations HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Delete a configuration

delete
Authorizations
AuthorizationstringRequired

All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.

Path parameters
accountIdstringRequired
Responses
delete
/api/v1/aws/configurations/{accountId}
DELETE /api/v1/aws/configurations/{accountId} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Last updated

Was this helpful?