Python
import requests url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/kubernetes/resources/get" payload = { "resource_requests": [ { "kind": "<string>", "field_selectors": [ { "field": "<string>", "value": "<string>" } ], "label_selector": "<string>", "group": "<string>", "resource": "<string>", "name": "<string>", "namespace": "<string>", "version": "v1", "limit": 123, "continue_token": "<string>" } ] } headers = { "Authorization": "Bearer <token>", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text)
{ "resource_responses": [ { "status": "success", "items": [ "<unknown>" ], "kind": "<string>", "version": "<string>", "group": "<string>", "name": "<string>", "namespace": "<string>", "continue_token": "<string>", "total_count": 123, "cache_metadata": { "served_from_cache": true, "staleness_seconds": 123, "sync_status": "<string>", "warning": "<string>", "is_deleted": false, "deleted_at": "<string>" } } ] }
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Show child attributes
Successful Response