Create an AWS access-key credential
import requests
url = "https://platform.ankra.app/org/credentials/aws/keys"
payload = {
"name": "<string>",
"access_key_id": "<string>",
"secret_access_key": "<string>"
}
headers = {
"cookie": "ankra_session=",
"X-Ankra-CSRF": "<x-ankra-csrf>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
cookie: 'ankra_session=',
'X-Ankra-CSRF': '<x-ankra-csrf>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>', access_key_id: '<string>', secret_access_key: '<string>'})
};
fetch('https://platform.ankra.app/org/credentials/aws/keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/org/credentials/aws/keys \
--header 'Content-Type: application/json' \
--header 'X-Ankra-CSRF: <x-ankra-csrf>' \
--cookie ankra_session= \
--data '
{
"name": "<string>",
"access_key_id": "<string>",
"secret_access_key": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"provider": "aws",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"system": true,
"available": true
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}AWS Credentials
Create an AWS access-key credential
Browser session authentication. Registers an access-key credential after an STS GetCallerIdentity check; a name clash answers 409, a failed check 400.
POST
/
org
/
credentials
/
aws
/
keys
Create an AWS access-key credential
import requests
url = "https://platform.ankra.app/org/credentials/aws/keys"
payload = {
"name": "<string>",
"access_key_id": "<string>",
"secret_access_key": "<string>"
}
headers = {
"cookie": "ankra_session=",
"X-Ankra-CSRF": "<x-ankra-csrf>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
cookie: 'ankra_session=',
'X-Ankra-CSRF': '<x-ankra-csrf>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>', access_key_id: '<string>', secret_access_key: '<string>'})
};
fetch('https://platform.ankra.app/org/credentials/aws/keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/org/credentials/aws/keys \
--header 'Content-Type: application/json' \
--header 'X-Ankra-CSRF: <x-ankra-csrf>' \
--cookie ankra_session= \
--data '
{
"name": "<string>",
"access_key_id": "<string>",
"secret_access_key": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"provider": "aws",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"system": true,
"available": true
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Authorizations
Browser session. Mutations also require X-Ankra-CSRF.
Headers
Must match the ankra_csrf browser cookie.
Body
application/json