Get all spaces
Headers
-
elastic-api-version string
The version of the API to use
Value is
2023-10-31
. Default value is2023-10-31
.
Query parameters
-
purpose string
Specifies which authorization checks are applied to the API call. The default value is
any
.Values are
any
,copySavedObjectsIntoSpace
, orshareSavedObjectsIntoSpace
.
GET /api/spaces/space
curl \
-X GET https://localhost:5601/api/spaces/space? \
-H "elastic-api-version: 2023-10-31"
Response examples (200)
Get all spaces
Get all spaces without specifying any options.
[
{
"id": "default",
"name": "Default",
"imageUrl": "",
"_reserved": true,
"description": "This is the Default Space",
"disabledFeatures": []
},
{
"id": "marketing",
"name": "Marketing",
"color": null,
"imageUrl": "data:image/png;base64,iVBORw0KGgoAAAANSU",
"initials": "MK",
"description": "This is the Marketing Space",
"disabledFeatures": [
"apm"
]
},
{
"id": "sales",
"name": "Sales",
"imageUr\"": "",
"initials": "MK",
"solution": "oblt",
"disabledFeatures": [
"discover"
]
}
]
The user has read-only access to the Sales space. Get all spaces with the following query parameters: "purpose=shareSavedObjectsIntoSpace&include_authorized_purposes=true"
[
{
"id": "default",
"name": "Default",
"imageUrl": "",
"_reserved": true,
"description": "This is the Default Space",
"disabledFeatures": [],
"authorizedPurposes": {
"any": true,
"findSavedObjects": true,
"copySavedObjectsIntoSpace": true,
"shareSavedObjectsIntoSpace": true
}
},
{
"id": "marketing",
"name": "Marketing",
"color": null,
"imageUrl": "data:image/png;base64,iVBORw0KGgoAAAANSU",
"initials": "MK",
"description": "This is the Marketing Space",
"disabledFeatures": [
"apm"
],
"authorizedPurposes": {
"any": true,
"findSavedObjects": true,
"copySavedObjectsIntoSpace": true,
"shareSavedObjectsIntoSpace": true
}
},
{
"id": "sales",
"name": "Sales",
"imageUrl": "",
"initials": "MK",
"disabledFeatures": [
"discover"
],
"authorizedPurposes": {
"any": true,
"findSavedObjects": true,
"copySavedObjectsIntoSpace": false,
"shareSavedObjectsIntoSpace": false
}
}
]