Validate Import Cluster Endpoint
import requests
url = "https://platform.ankra.app/api/v1/clusters/validate"
payload = { "spec": {
"argo_cd": {
"namespace": "<string>",
"version": "<string>"
},
"git_repository": {
"branch": "<string>",
"credential_name": "<string>",
"repository": "<string>",
"provider": "github"
},
"kubernetes": { "version": "0.0.0" },
"prometheus_credential": {
"name": "<string>",
"password": "<string>",
"token": "<string>",
"username": "<string>"
},
"prometheus_metrics": {
"endpoint": "<string>",
"credential_name": "<string>",
"flavor": "<string>"
},
"provider": "imported",
"stacks": []
} }
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({
spec: {
argo_cd: {namespace: '<string>', version: '<string>'},
git_repository: {
branch: '<string>',
credential_name: '<string>',
repository: '<string>',
provider: 'github'
},
kubernetes: {version: '0.0.0'},
prometheus_credential: {
name: '<string>',
password: '<string>',
token: '<string>',
username: '<string>'
},
prometheus_metrics: {endpoint: '<string>', credential_name: '<string>', flavor: '<string>'},
provider: 'imported',
stacks: []
}
})
};
fetch('https://platform.ankra.app/api/v1/clusters/validate', 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/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"spec": {
"argo_cd": {
"namespace": "<string>",
"version": "<string>"
},
"git_repository": {
"branch": "<string>",
"credential_name": "<string>",
"repository": "<string>",
"provider": "github"
},
"kubernetes": {
"version": "0.0.0"
},
"prometheus_credential": {
"name": "<string>",
"password": "<string>",
"token": "<string>",
"username": "<string>"
},
"prometheus_metrics": {
"endpoint": "<string>",
"credential_name": "<string>",
"flavor": "<string>"
},
"provider": "imported",
"stacks": []
}
}
'{
"errors": [],
"warnings": []
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Cluster
Validate Import Cluster Endpoint
POST
/
api
/
v1
/
clusters
/
validate
Validate Import Cluster Endpoint
import requests
url = "https://platform.ankra.app/api/v1/clusters/validate"
payload = { "spec": {
"argo_cd": {
"namespace": "<string>",
"version": "<string>"
},
"git_repository": {
"branch": "<string>",
"credential_name": "<string>",
"repository": "<string>",
"provider": "github"
},
"kubernetes": { "version": "0.0.0" },
"prometheus_credential": {
"name": "<string>",
"password": "<string>",
"token": "<string>",
"username": "<string>"
},
"prometheus_metrics": {
"endpoint": "<string>",
"credential_name": "<string>",
"flavor": "<string>"
},
"provider": "imported",
"stacks": []
} }
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({
spec: {
argo_cd: {namespace: '<string>', version: '<string>'},
git_repository: {
branch: '<string>',
credential_name: '<string>',
repository: '<string>',
provider: 'github'
},
kubernetes: {version: '0.0.0'},
prometheus_credential: {
name: '<string>',
password: '<string>',
token: '<string>',
username: '<string>'
},
prometheus_metrics: {endpoint: '<string>', credential_name: '<string>', flavor: '<string>'},
provider: 'imported',
stacks: []
}
})
};
fetch('https://platform.ankra.app/api/v1/clusters/validate', 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/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"spec": {
"argo_cd": {
"namespace": "<string>",
"version": "<string>"
},
"git_repository": {
"branch": "<string>",
"credential_name": "<string>",
"repository": "<string>",
"provider": "github"
},
"kubernetes": {
"version": "0.0.0"
},
"prometheus_credential": {
"name": "<string>",
"password": "<string>",
"token": "<string>",
"username": "<string>"
},
"prometheus_metrics": {
"endpoint": "<string>",
"credential_name": "<string>",
"flavor": "<string>"
},
"provider": "imported",
"stacks": []
}
}
'{
"errors": [],
"warnings": []
}{
"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
⌘I