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
includeDisabledboolean · default: falseoptional
When true, includes all AWS types supported
pageSizeinteger · int32 · default: 250required
Number of results to return per page, between 1 and 1000. Default 250.
pageinteger · int32 · default: 0required
Page number to return, 0-indexed. Default 0.
curl -L \
--url 'https://api.getcortexapp.com/api/v1/aws/types?pageSize=1&page=1' \
--header 'Authorization: Bearer JWT'
{
"hasMore": true,
"page": 1,
"total": 1,
"totalPages": 1,
"types": [
{
"enabled": true,
"type": "AWS::S3::Bucket"
}
]
}
Retrieve a configuration
get
curl -L \
--url 'https://api.getcortexapp.com/api/v1/aws/configurations/{accountId}' \
--header 'Authorization: Bearer JWT'
{
"accountId": "text",
"accountName": "text",
"role": "text"
}
Retrieve configurations
get
curl -L \
--url 'https://api.getcortexapp.com/api/v1/aws/configurations' \
--header 'Authorization: Bearer JWT'
{
"configurations": [
{
"accountId": "text",
"accountName": "text",
"role": "text"
}
]
}
Add a single configuration
post
accountIdstringrequired
The account ID for the AWS account
rolestringrequired
The IAM role Cortex would be assuming
curl -L \
--request POST \
--url 'https://api.getcortexapp.com/api/v1/aws/configurations' \
--header 'Authorization: Bearer JWT' \
--header 'Content-Type: application/json' \
--data '{
"accountId": "text",
"role": "text"
}'
{
"accountId": "text",
"accountName": "text",
"role": "text"
}
Validate all configurations
post
curl -L \
--request POST \
--url 'https://api.getcortexapp.com/api/v1/aws/configurations/all/validate' \
--header 'Authorization: Bearer JWT'
{
"configurations": [
{
"alias": "text",
"isValid": true,
"message": "text"
}
]
}
Validate a configuration
post
curl -L \
--request POST \
--url 'https://api.getcortexapp.com/api/v1/aws/configurations/validate/{accountId}' \
--header 'Authorization: Bearer JWT'
{
"alias": "text",
"isValid": true,
"message": "text"
}
Update configurations
put
configurationsobject[]required
curl -L \
--request PUT \
--url 'https://api.getcortexapp.com/api/v1/aws/configurations' \
--header 'Authorization: Bearer JWT' \
--header 'Content-Type: application/json' \
--data '{
"configurations": [
{
"accountId": "text",
"role": "text"
}
]
}'
{
"configurations": [
{
"accountId": "text",
"accountName": "text",
"role": "text"
}
]
}
Update configured AWS types
put
typesobject[]required
List of AWS types and whether they're configured to be discovered and imported into the catalogs
curl -L \
--request PUT \
--url 'https://api.getcortexapp.com/api/v1/aws/types' \
--header 'Authorization: Bearer JWT' \
--header 'Content-Type: application/json' \
--data '{
"types": [
{
"enabled": true,
"type": "AWS::S3::Bucket"
}
]
}'
{
"types": [
{
"enabled": true,
"type": "AWS::S3::Bucket"
}
]
}
Delete all configurations
delete
curl -L \
--request DELETE \
--url 'https://api.getcortexapp.com/api/v1/aws/configurations' \
--header 'Authorization: Bearer JWT'
Delete a configuration
delete
curl -L \
--request DELETE \
--url 'https://api.getcortexapp.com/api/v1/aws/configurations/{accountId}' \
--header 'Authorization: Bearer JWT'