Retrieves specified cluster workloads
POSThttps://api.spectrocloud.com/v1/dashboard/spectroclusters/:uid/workloads
Retrieves specified cluster workloads
Request
Path Parameters
uid stringrequired
Header Parameters
ProjectUid string
Scope the request to the specified project uid
- application/json
Body
filter
object
Responses
- 200
An array of cluster workloads
- application/json
- Schema
- Example (from schema)
Schema
metadata
object
spec
object
{
"metadata": {
"annotations": {},
"labels": {},
"name": "string"
},
"spec": {
"clusterroleBindings": [
{
"metadata": {
"creationTimestamp": "2024-07-10T22:28:47.878Z",
"entity": {
"kind": "string",
"name": "string",
"uid": "string"
},
"labels": {},
"namespace": "string"
},
"spec": {
"namespace": "string",
"role": {
"kind": "Role",
"name": "string"
},
"subjects": [
{
"name": "string",
"namespace": "string",
"type": "User"
}
],
"type": "RoleBinding"
}
}
],
"cronJobs": [
{
"metadata": {
"creationTimestamp": "2024-07-10T22:28:47.878Z",
"entity": {
"kind": "string",
"name": "string",
"uid": "string"
},
"labels": {},
"namespace": "string"
},
"spec": {
"schedule": "string"
},
"status": {
"lastScheduleTime": "2024-07-10T22:28:47.878Z"
}
}
],
"daemonSets": [
{
"metadata": {
"creationTimestamp": "2024-07-10T22:28:47.878Z",
"entity": {
"kind": "string",
"name": "string",
"uid": "string"
},
"labels": {},
"namespace": "string"
},
"status": {
"available": 0,
"currentScheduled": 0,
"desiredScheduled": 0,
"misScheduled": 0,
"ready": 0,
"updatedScheduled": 0
}
}
],
"deployments": [
{
"metadata": {
"creationTimestamp": "2024-07-10T22:28:47.878Z",
"entity": {
"kind": "string",
"name": "string",
"uid": "string"
},
"labels": {},
"namespace": "string"
},
"status": {
"replicas": {
"available": 0,
"ready": 0,
"total": 0,
"updated": 0
}
}
}
],
"jobs": [
{
"metadata": {
"creationTimestamp": "2024-07-10T22:28:47.878Z",
"entity": {
"kind": "string",
"name": "string",
"uid": "string"
},
"labels": {},
"namespace": "string"
},
"status": {
"completionTime": "2024-07-10T22:28:47.878Z",
"conditions": [
{
"lastTransitionTime": "2024-07-10T22:28:47.878Z",
"lastUpdateTime": "2024-07-10T22:28:47.878Z",
"message": "string",
"reason": "string",
"status": "string",
"type": "string"
}
],
"startTime": "2024-07-10T22:28:47.878Z",
"succeeded": 0
}
}
],
"pods": [
{
"metadata": {
"associatedRefs": [
{
"kind": "string",
"name": "string",
"uid": "string"
}
],
"creationTimestamp": "2024-07-10T22:28:47.878Z",
"entity": {
"kind": "string",
"name": "string",
"uid": "string"
},
"labels": {},
"machineUid": "string",
"namespace": "string",
"nodename": "string"
},
"spec": {
"containers": [
{
"image": "string",
"name": "string",
"resources": {
"limits": {
"cpu": 0,
"cpuUnit": "string",
"memory": 0,
"memoryUnit": "string"
},
"requests": {
"cpu": 0,
"cpuUnit": "string",
"memory": 0,
"memoryUnit": "string"
}
}
}
],
"volumes": [
{
"name": "string"
}
]
},
"status": {
"containers": [
{
"image": "string",
"name": "string",
"ready": true,
"restartCount": 0,
"started": true,
"state": {
"exitCode": 0,
"finishedAt": "2024-07-10T22:28:47.879Z",
"reason": "string",
"startedAt": "2024-07-10T22:28:47.879Z",
"state": "string"
}
}
],
"phase": "string",
"podIp": "string",
"qosClass": "string"
}
}
],
"roleBindings": [
{
"metadata": {
"creationTimestamp": "2024-07-10T22:28:47.879Z",
"entity": {
"kind": "string",
"name": "string",
"uid": "string"
},
"labels": {},
"namespace": "string"
},
"spec": {
"namespace": "string",
"role": {
"kind": "Role",
"name": "string"
},
"subjects": [
{
"name": "string",
"namespace": "string",
"type": "User"
}
],
"type": "RoleBinding"
}
}
],
"statefulSets": [
{
"metadata": {
"creationTimestamp": "2024-07-10T22:28:47.879Z",
"entity": {
"kind": "string",
"name": "string",
"uid": "string"
},
"labels": {},
"namespace": "string"
},
"status": {
"replicas": {
"available": 0,
"ready": 0,
"total": 0,
"updated": 0
}
}
}
]
}
}
- curl
- python
- go
- nodejs
- java
- CURL
curl -L -X POST 'https://api.spectrocloud.com/v1/dashboard/spectroclusters/:uid/workloads' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'ApiKey: <API_KEY_VALUE>' \
--data-raw '{
"filter": {
"namespaces": [
"string"
]
}
}'