import requests
url = "https://platform.ankra.app/api/v1/clusters/import"
payload = {
"name": "<string>",
"description": "<string>",
"spec": {
"git_repository": {
"provider": "github",
"credential_name": "<string>",
"branch": "<string>",
"repository": "<string>"
},
"prometheus_metrics": {
"endpoint": "<string>",
"credential_name": "<string>"
},
"prometheus_credential": {
"name": "<string>",
"username": "<string>",
"password": "<string>",
"token": "<string>"
},
"stacks": [],
"kubernetes": { "version": "0.0.0" },
"provider": "imported",
"argo_cd": {
"namespace": "<string>",
"version": "<string>"
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"name": "<string>",
"cluster_id": "<string>",
"organisation_id": "<string>",
"import_command": "<string>",
"errors": []
}import requests
url = "https://platform.ankra.app/api/v1/clusters/import"
payload = {
"name": "<string>",
"description": "<string>",
"spec": {
"git_repository": {
"provider": "github",
"credential_name": "<string>",
"branch": "<string>",
"repository": "<string>"
},
"prometheus_metrics": {
"endpoint": "<string>",
"credential_name": "<string>"
},
"prometheus_credential": {
"name": "<string>",
"username": "<string>",
"password": "<string>",
"token": "<string>"
},
"stacks": [],
"kubernetes": { "version": "0.0.0" },
"provider": "imported",
"argo_cd": {
"namespace": "<string>",
"version": "<string>"
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"name": "<string>",
"cluster_id": "<string>",
"organisation_id": "<string>",
"import_command": "<string>",
"errors": []
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
standalone, profile Show child attributes
Show child attributes
Show child attributes
aws, imported Successful Response