Create a GCP service-account key credential
import requests
url = "https://platform.ankra.app/api/v1/credentials/gcp/key"
payload = {
"name": "<string>",
"project_id": "<string>",
"service_account_key": "<string>"
}
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({name: '<string>', project_id: '<string>', service_account_key: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/credentials/gcp/key', 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/gcp/key \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"project_id": "<string>",
"service_account_key": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"provider": "gcp",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"system": true,
"available": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Credentials
Create a GCP service-account key credential
Registers a Google Cloud service-account key after checking it against the project; a name clash answers 409 and a failed check 400. Requires credentials.write, checked against the token’s scopes and the member’s role. The credential belongs to the request’s project.
POST
/
api
/
v1
/
credentials
/
gcp
/
key
Create a GCP service-account key credential
import requests
url = "https://platform.ankra.app/api/v1/credentials/gcp/key"
payload = {
"name": "<string>",
"project_id": "<string>",
"service_account_key": "<string>"
}
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({name: '<string>', project_id: '<string>', service_account_key: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/credentials/gcp/key', 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/gcp/key \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"project_id": "<string>",
"service_account_key": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"provider": "gcp",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"system": true,
"available": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}