Get Kubernetes Resources Endpoint
import requests
url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/kubernetes/resources/get"
payload = { "resource_requests": [
{
"kind": "<string>",
"continue_token": "<string>",
"field_selectors": [
{
"field": "<string>",
"value": "<string>"
}
],
"group": "<string>",
"label_selector": "<string>",
"limit": 123,
"name": "<string>",
"namespace": "<string>",
"resource": "<string>",
"version": "v1"
}
] }
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({
resource_requests: [
{
kind: '<string>',
continue_token: '<string>',
field_selectors: [{field: '<string>', value: '<string>'}],
group: '<string>',
label_selector: '<string>',
limit: 123,
name: '<string>',
namespace: '<string>',
resource: '<string>',
version: 'v1'
}
]
})
};
fetch('https://platform.ankra.app/api/v1/clusters/{cluster_id}/kubernetes/resources/get', 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/{cluster_id}/kubernetes/resources/get \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"resource_requests": [
{
"kind": "<string>",
"continue_token": "<string>",
"field_selectors": [
{
"field": "<string>",
"value": "<string>"
}
],
"group": "<string>",
"label_selector": "<string>",
"limit": 123,
"name": "<string>",
"namespace": "<string>",
"resource": "<string>",
"version": "v1"
}
]
}
'{
"resource_responses": [
{
"items": [
"<unknown>"
],
"kind": "<string>",
"version": "<string>",
"cache_metadata": {
"served_from_cache": true,
"staleness_seconds": 123,
"sync_status": "<string>",
"deleted_at": "<string>",
"is_deleted": false,
"warning": "<string>"
},
"continue_token": "<string>",
"group": "<string>",
"name": "<string>",
"namespace": "<string>",
"total_count": 123
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Kubernetes API
Get Kubernetes Resources Endpoint
POST
/
api
/
v1
/
clusters
/
{cluster_id}
/
kubernetes
/
resources
/
get
Get Kubernetes Resources Endpoint
import requests
url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/kubernetes/resources/get"
payload = { "resource_requests": [
{
"kind": "<string>",
"continue_token": "<string>",
"field_selectors": [
{
"field": "<string>",
"value": "<string>"
}
],
"group": "<string>",
"label_selector": "<string>",
"limit": 123,
"name": "<string>",
"namespace": "<string>",
"resource": "<string>",
"version": "v1"
}
] }
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({
resource_requests: [
{
kind: '<string>',
continue_token: '<string>',
field_selectors: [{field: '<string>', value: '<string>'}],
group: '<string>',
label_selector: '<string>',
limit: 123,
name: '<string>',
namespace: '<string>',
resource: '<string>',
version: 'v1'
}
]
})
};
fetch('https://platform.ankra.app/api/v1/clusters/{cluster_id}/kubernetes/resources/get', 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/{cluster_id}/kubernetes/resources/get \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"resource_requests": [
{
"kind": "<string>",
"continue_token": "<string>",
"field_selectors": [
{
"field": "<string>",
"value": "<string>"
}
],
"group": "<string>",
"label_selector": "<string>",
"limit": 123,
"name": "<string>",
"namespace": "<string>",
"resource": "<string>",
"version": "v1"
}
]
}
'{
"resource_responses": [
{
"items": [
"<unknown>"
],
"kind": "<string>",
"version": "<string>",
"cache_metadata": {
"served_from_cache": true,
"staleness_seconds": 123,
"sync_status": "<string>",
"deleted_at": "<string>",
"is_deleted": false,
"warning": "<string>"
},
"continue_token": "<string>",
"group": "<string>",
"name": "<string>",
"namespace": "<string>",
"total_count": 123
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Response
Successful Response
Show child attributes
Show child attributes
⌘I