Create a Azure credential
import requests
url = "https://platform.ankra.app/org/credentials/azure"
payload = {
"client_id": "00000000-0000-0000-0000-000000000003",
"client_secret": "<secret>",
"name": "azure-production",
"subscription_id": "00000000-0000-0000-0000-000000000001",
"tenant_id": "00000000-0000-0000-0000-000000000002"
}
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({
client_id: '00000000-0000-0000-0000-000000000003',
client_secret: '<secret>',
name: 'azure-production',
subscription_id: '00000000-0000-0000-0000-000000000001',
tenant_id: '00000000-0000-0000-0000-000000000002'
})
};
fetch('https://platform.ankra.app/org/credentials/azure', 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/azure \
--header 'Content-Type: application/json' \
--header 'X-Ankra-CSRF: <x-ankra-csrf>' \
--cookie ankra_session= \
--data '
{
"client_id": "00000000-0000-0000-0000-000000000003",
"client_secret": "<secret>",
"name": "azure-production",
"subscription_id": "00000000-0000-0000-0000-000000000001",
"tenant_id": "00000000-0000-0000-0000-000000000002"
}
'{
"errors": [],
"success": true
}{
"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"
}Azure Credentials
Create a Azure credential
Browser session authentication; RBAC permission credentials.write. The secret is stored in Vault and connection-tested without echoing key material.
POST
/
org
/
credentials
/
azure
Create a Azure credential
import requests
url = "https://platform.ankra.app/org/credentials/azure"
payload = {
"client_id": "00000000-0000-0000-0000-000000000003",
"client_secret": "<secret>",
"name": "azure-production",
"subscription_id": "00000000-0000-0000-0000-000000000001",
"tenant_id": "00000000-0000-0000-0000-000000000002"
}
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({
client_id: '00000000-0000-0000-0000-000000000003',
client_secret: '<secret>',
name: 'azure-production',
subscription_id: '00000000-0000-0000-0000-000000000001',
tenant_id: '00000000-0000-0000-0000-000000000002'
})
};
fetch('https://platform.ankra.app/org/credentials/azure', 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/azure \
--header 'Content-Type: application/json' \
--header 'X-Ankra-CSRF: <x-ankra-csrf>' \
--cookie ankra_session= \
--data '
{
"client_id": "00000000-0000-0000-0000-000000000003",
"client_secret": "<secret>",
"name": "azure-production",
"subscription_id": "00000000-0000-0000-0000-000000000001",
"tenant_id": "00000000-0000-0000-0000-000000000002"
}
'{
"errors": [],
"success": true
}{
"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