Retrieves a list of cluster summary with provided search filter spec Supported sort fields - ['environment', 'clusterName', 'memoryUsage', 'healthState', 'creationTimestamp', 'lastModifiedTimestamp']
POSThttps://api.spectrocloud.com/v1/dashboard/spectroclusters/search
Retrieves a list of cluster summary with provided search filter spec Supported sort fields - ["environment", "clusterName", "memoryUsage", "healthState", "creationTimestamp", "lastModifiedTimestamp"]
Request
Query Parameters
Possible values: <= 20
limit is a maximum number of responses to return for a list call. Maximum value of the limit is 20.
If more items exist, the server will set the continue
field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.
offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.
continue token to paginate the subsequent data items
- application/json
Body
filter
sort
undefined[]
Responses
- 200
An array of cluster summary items
- application/json
- Schema
- Example (from schema)
Schema
items
object[]
required
listmeta
object
{
"items": [
{
"metadata": {
"annotations": {},
"creationTimestamp": "2024-07-02T20:32:02.639Z",
"deletionTimestamp": "2024-07-02T20:32:02.639Z",
"labels": {},
"lastModifiedTimestamp": "2024-07-02T20:32:02.639Z",
"name": "string",
"namespace": "string",
"resourceVersion": "string",
"selfLink": "string",
"uid": "string"
},
"specSummary": {
"cloudAccountMeta": {
"name": "string",
"uid": "string"
},
"cloudConfig": {
"cloudType": "all",
"machinePools": [
{
"cloudType": "all",
"healthy": 0,
"infraProfileTemplate": {
"cloudType": "all",
"name": "string",
"packs": [
{
"annotations": {},
"digest": "string",
"inValidReason": "string",
"isInvalid": true,
"layer": "kernel",
"manifests": [
{
"apiVersion": "string",
"fieldPath": "string",
"kind": "string",
"name": "string",
"namespace": "string",
"resourceVersion": "string",
"uid": "string"
}
],
"name": "string",
"packUid": "string",
"params": {},
"presets": [
{
"add": "string",
"displayName": "string",
"group": "string",
"name": "string",
"remove": [
"string"
]
}
],
"registryUid": "string",
"schema": [
{
"format": "string",
"hints": [
"string"
],
"listOptions": [
"string"
],
"name": "string",
"readonly": true,
"regex": "string",
"required": true,
"type": "string"
}
],
"server": "string",
"tag": "string",
"type": "spectro",
"values": "string",
"version": "string"
}
],
"scope": "string",
"type": "string",
"uid": "string",
"version": 0
},
"labels": [
"string"
],
"size": 0
}
],
"uid": "string"
},
"clusterConfig": {
"hostClusterConfig": {
"clusterGroup": {
"apiVersion": "string",
"fieldPath": "string",
"kind": "string",
"name": "string",
"namespace": "string",
"resourceVersion": "string",
"uid": "string"
}
}
},
"clusterProfileTemplate": {
"cloudType": "all",
"name": "string",
"packs": [
{
"annotations": {},
"digest": "string",
"inValidReason": "string",
"isInvalid": true,
"layer": "kernel",
"manifests": [
{
"apiVersion": "string",
"fieldPath": "string",
"kind": "string",
"name": "string",
"namespace": "string",
"resourceVersion": "string",
"uid": "string"
}
],
"name": "string",
"packUid": "string",
"params": {},
"presets": [
{
"add": "string",
"displayName": "string",
"group": "string",
"name": "string",
"remove": [
"string"
]
}
],
"registryUid": "string",
"schema": [
{
"format": "string",
"hints": [
"string"
],
"listOptions": [
"string"
],
"name": "string",
"readonly": true,
"regex": "string",
"required": true,
"type": "string"
}
],
"server": "string",
"tag": "string",
"type": "spectro",
"values": "string",
"version": "string"
}
],
"scope": "string",
"type": "string",
"uid": "string",
"version": 0
},
"clusterProfileTemplates": [
{
"cloudType": "all",
"name": "string",
"packs": [
{
"annotations": {},
"digest": "string",
"inValidReason": "string",
"isInvalid": true,
"layer": "kernel",
"manifests": [
{
"apiVersion": "string",
"fieldPath": "string",
"kind": "string",
"name": "string",
"namespace": "string",
"resourceVersion": "string",
"uid": "string"
}
],
"name": "string",
"packUid": "string",
"params": {},
"presets": [
{
"add": "string",
"displayName": "string",
"group": "string",
"name": "string",
"remove": [
"string"
]
}
],
"registryUid": "string",
"schema": [
{
"format": "string",
"hints": [
"string"
],
"listOptions": [
"string"
],
"name": "string",
"readonly": true,
"regex": "string",
"required": true,
"type": "string"
}
],
"server": "string",
"tag": "string",
"type": "spectro",
"values": "string",
"version": "string"
}
],
"scope": "string",
"type": "string",
"uid": "string",
"version": 0
}
],
"projectMeta": {
"name": "string",
"uid": "string"
}
},
"status": {
"clusterImport": {
"importLink": "string",
"isBrownfield": true,
"state": "string"
},
"cost": {
"cloud": {
"compute": 0,
"storage": 0,
"total": 0
},
"total": 0
},
"health": {
"agentVersion": "string",
"conditions": [
{
"message": "string",
"relatedObject": {
"kind": "spectrocluster",
"name": "string",
"uid": "string"
},
"type": "string"
}
],
"lastHeartBeatTimestamp": "2024-07-02T20:32:02.640Z",
"state": "string"
},
"hourlyRate": {
"cloud": {
"compute": 0,
"storage": 0,
"total": 0
},
"total": 0
},
"location": {
"coordinates": [
0
],
"countryCode": "string",
"countryName": "string",
"regionCode": "string",
"regionName": "string"
},
"metrics": {
"cpu": {
"lastUpdatedTime": "2024-07-02T20:32:02.640Z",
"limit": 0,
"request": 0,
"total": 0,
"unit": "string",
"usage": 0
},
"memory": {
"lastUpdatedTime": "2024-07-02T20:32:02.640Z",
"limit": 0,
"request": 0,
"total": 0,
"unit": "string",
"usage": 0
}
},
"nested": {
"appDeployments": [
{
"kind": "string",
"name": "string",
"projectUid": "string",
"tenantUid": "string",
"uid": "string"
}
],
"clusterGroup": {
"kind": "string",
"name": "string",
"projectUid": "string",
"tenantUid": "string",
"uid": "string"
},
"hostCluster": {
"kind": "string",
"name": "string",
"projectUid": "string",
"tenantUid": "string",
"uid": "string"
},
"lifecycleStatus": {
"msg": "string",
"status": "Pausing"
},
"nestedClusters": [
{
"kind": "string",
"name": "string",
"projectUid": "string",
"tenantUid": "string",
"uid": "string"
}
],
"state": "string",
"virtualClusters": [
{
"kind": "string",
"name": "string",
"projectUid": "string",
"tenantUid": "string",
"uid": "string"
}
]
},
"notifications": {
"isAvailable": true
},
"state": "string",
"virtual": {
"appDeployments": [
{
"kind": "string",
"name": "string",
"projectUid": "string",
"tenantUid": "string",
"uid": "string"
}
],
"clusterGroup": {
"kind": "string",
"name": "string",
"projectUid": "string",
"tenantUid": "string",
"uid": "string"
},
"hostCluster": {
"kind": "string",
"name": "string",
"projectUid": "string",
"tenantUid": "string",
"uid": "string"
},
"lifecycleStatus": {
"msg": "string",
"status": "Pausing"
},
"nestedClusters": [
{
"kind": "string",
"name": "string",
"projectUid": "string",
"tenantUid": "string",
"uid": "string"
}
],
"state": "string",
"virtualClusters": [
{
"kind": "string",
"name": "string",
"projectUid": "string",
"tenantUid": "string",
"uid": "string"
}
]
}
}
}
],
"listmeta": {
"continue": "string",
"count": 0,
"limit": 0,
"offset": 0
}
}
- curl
- python
- go
- nodejs
- java
- CURL
curl -L -X POST 'https://api.spectrocloud.com/v1/dashboard/spectroclusters/search' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"filter": {
"conjunction": "and",
"filterGroups": [
{
"conjunction": "and",
"filters": [
{
"condition": {
"bool": {
"value": true
},
"date": {
"match": {
"conjunction": "and",
"values": [
"2024-07-02T20:32:01.628Z"
]
},
"negation": true,
"operator": "eq"
},
"float": {
"match": {
"conjunction": "and",
"values": [
0
]
},
"negation": true,
"operator": "eq"
},
"int": {
"match": {
"conjunction": "and",
"values": [
0
]
},
"negation": true,
"operator": "eq"
},
"keyValue": {
"ignoreCase": true,
"key": "string",
"match": {
"conjunction": "and",
"values": [
"string"
]
},
"negation": true,
"operator": "eq"
},
"string": {
"ignoreCase": true,
"match": {
"conjunction": "and",
"values": [
"string"
]
},
"negation": true,
"operator": "eq"
}
},
"property": "string",
"type": "string"
}
]
}
]
},
"sort": [
{
"field": "environment",
"order": "asc"
}
]
}'