Create a Azure credential
import requests
url = "https://platform.ankra.app/api/v1/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 = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', '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/api/v1/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/api/v1/credentials/azure \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--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
Bearer PAT authentication; RBAC permission credentials.write. The secret is stored in Vault and connection-tested without echoing key material.
POST
/
api
/
v1
/
credentials
/
azure
Create a Azure credential
import requests
url = "https://platform.ankra.app/api/v1/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 = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', '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/api/v1/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/api/v1/credentials/azure \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
PAT organisation override.
Body
application/json