Create a provider network
import requests
url = "https://platform.ankra.app/org/clusters/managed/{provider}/networks"
payload = {
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<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({credential_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', name: '<string>'})
};
fetch('https://platform.ankra.app/org/clusters/managed/{provider}/networks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/org/clusters/managed/{provider}/networks \
--header 'Content-Type: application/json' \
--header 'X-Ankra-CSRF: <x-ankra-csrf>' \
--cookie ankra_session= \
--data '
{
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
'{
"id": "<string>",
"name": "<string>",
"provider_reference": "<string>",
"region": "<string>",
"is_default": false
}{
"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"
}Scaleway / Kapsule
Create a provider network
Provision a provider network with the scoping credential so the create wizard can offer an inline create-network flow. GKE creates an auto subnet-mode VPC (a subnetwork in every region, like the GCP default network) and waits for the compute operation to finish; other providers answer 400. The GCP service account needs the compute.networks.create permission (for example via the Compute Network Admin role, roles/compute.networkAdmin); a credential without it answers 400 with the provider’s permission message. The response is the created network in the options catalog’s private_networks shape.
POST
/
org
/
clusters
/
managed
/
{provider}
/
networks
Create a provider network
import requests
url = "https://platform.ankra.app/org/clusters/managed/{provider}/networks"
payload = {
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<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({credential_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', name: '<string>'})
};
fetch('https://platform.ankra.app/org/clusters/managed/{provider}/networks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/org/clusters/managed/{provider}/networks \
--header 'Content-Type: application/json' \
--header 'X-Ankra-CSRF: <x-ankra-csrf>' \
--cookie ankra_session= \
--data '
{
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
'{
"id": "<string>",
"name": "<string>",
"provider_reference": "<string>",
"region": "<string>",
"is_default": false
}{
"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.
Path Parameters
Available options:
doks, uks, gke, ovh_mks, aks, eks, kapsule Example:
"kapsule"