Create Or Update Import Cluster Endpoint
import requests
url = "https://platform.ankra.app/api/v1/clusters/import"
payload = { "name": "<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>'})
};
fetch('https://platform.ankra.app/api/v1/clusters/import', 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/clusters/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'{
"cluster_id": "<string>",
"import_command": "<string>",
"name": "<string>",
"organisation_id": "<string>",
"commit_sha": "<string>",
"commit_url": "<string>",
"errors": []
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Clusters
Create Or Update Import Cluster Endpoint
POST
/
api
/
v1
/
clusters
/
import
Create Or Update Import Cluster Endpoint
import requests
url = "https://platform.ankra.app/api/v1/clusters/import"
payload = { "name": "<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>'})
};
fetch('https://platform.ankra.app/api/v1/clusters/import', 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/clusters/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'{
"cluster_id": "<string>",
"import_command": "<string>",
"name": "<string>",
"organisation_id": "<string>",
"commit_sha": "<string>",
"commit_url": "<string>",
"errors": []
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Body
application/json
Available options:
production, staging, development, disposable Required string length:
1 - 50GitHub Git repository request shape.
Legacy repository: 'owner/name' format is preserved as the API contract because
ankra-cli releases shipped to end-users send this shape. This class is the
__external_type__ for GithubRepositoryResource; renaming or restructuring
the fields is a permanent breaking change and is forbidden.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Successful Response