Retrieves a list of projects
GEThttps://api.spectrocloud.com/v1/projects
Authorization: ApiKey
name: ApiKeytype: apiKeydescription: API key authorization where API key can be generated from Palette console under Profile > My API Keysin: header
Deprecated: Use POST /v1/dashboard/projects
Request
Query Parameters
Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name
Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws
Server will be restricted to certain fields based on the indexed data for each resource.
Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1
Default value: 50
limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.
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
Header Parameters
Scope the request to the specified project uid
Responses
- 200
An array of projects
- application/json
- Schema
- Example (from schema)
Schema
items object[]required
listmeta object
{
"items": [
{
"metadata": {
"annotations": {},
"creationTimestamp": "2023-12-01T21:31:48.696Z",
"deletionTimestamp": "2023-12-01T21:31:48.696Z",
"labels": {},
"lastModifiedTimestamp": "2023-12-01T21:31:48.696Z",
"name": "string",
"uid": "string"
},
"spec": {
"alerts": [
{
"channels": [
{
"alertAllUsers": true,
"createdBy": "string",
"http": {
"body": "string",
"method": "string",
"url": "string"
},
"identifiers": [
"string"
],
"isActive": true,
"status": {
"isSucceeded": true,
"message": "string",
"time": "2023-12-01T21:31:48.696Z"
},
"type": "email",
"uid": "string"
}
],
"component": "string"
}
],
"logoUrl": "string",
"teams": [
{
"roles": [
"string"
],
"teamId": "string"
}
],
"users": [
{
"roles": [
"string"
],
"userId": "string"
}
]
},
"status": {
"cleanUpStatus": {
"cleanedResources": [
"string"
],
"msg": "string",
"state": "string"
},
"isDisabled": true
}
}
],
"listmeta": {
"continue": "string",
"count": 0,
"limit": 0,
"offset": 0
}
}
- curl
- python
- go
- nodejs
- java
- CURL
curl -L -X GET 'https://api.spectrocloud.com/v1/projects' \
-H 'Accept: application/json' \
-H 'ApiKey: <API_KEY_VALUE>'