GET /api/spaces/space

Retrieve all available Kibana spaces. The list includes only the spaces that the user is authorized to access.

Query parameters

  • purpose string

    Specifies which authorization checks are applied to the API call. The default value is any.

    Values are any, copySavedObjectsIntoSpace, or shareSavedObjectsIntoSpace.

  • include_authorized_purposes boolean

    When enabled, the API returns any spaces the user is authorized to access in any capacity, each including the purposes for which the user is authorized. This is useful for identifying spaces the user can read but is not authorized for a given purpose. Without the security plugin, this parameter has no effect, because no authorization checks are performed. This parameter cannot be used together with the purpose parameter.

Responses

  • 200 application/json

    Indicates a successful call.

GET /api/spaces/space
curl \
 --request GET 'https://<KIBANA_URL>/api/spaces/space' \
 --header "Authorization: $API_KEY"
Response examples (200)
Get all spaces without specifying any options.
[
  {
    "id": "default",
    "name": "Default",
    "description": "This is the Default Space",
    "disabledFeatures": [],
    "imageUrl": "",
    "_reserved": true
  },
  {
    "id": "marketing",
    "name": "Marketing",
    "description": "This is the Marketing Space",
    "color": null,
    "disabledFeatures": [
      "apm"
    ],
    "initials": "MK",
    "imageUrl": "data:image/png;base64,iVBORw0KGgoAAAANSU"
  },
  {
    "id": "sales",
    "name": "Sales",
    "initials": "MK",
    "disabledFeatures": [
      "discover"
    ],
    "imageUr\"": "",
    "solution": "oblt"
  }
]
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",
    "description": "This is the Default Space",
    "disabledFeatures": [],
    "imageUrl": "",
    "_reserved": true,
    "authorizedPurposes": {
      "any": true,
      "copySavedObjectsIntoSpace": true,
      "findSavedObjects": true,
      "shareSavedObjectsIntoSpace": true
    }
  },
  {
    "id": "marketing",
    "name": "Marketing",
    "description": "This is the Marketing Space",
    "color": null,
    "disabledFeatures": [
      "apm"
    ],
    "initials": "MK",
    "imageUrl": "data:image/png;base64,iVBORw0KGgoAAAANSU",
    "authorizedPurposes": {
      "any": true,
      "copySavedObjectsIntoSpace": true,
      "findSavedObjects": true,
      "shareSavedObjectsIntoSpace": true
    }
  },
  {
    "id": "sales",
    "name": "Sales",
    "initials": "MK",
    "disabledFeatures": [
      "discover"
    ],
    "imageUrl": "",
    "authorizedPurposes": {
      "any": true,
      "copySavedObjectsIntoSpace": false,
      "findSavedObjects": true,
      "shareSavedObjectsIntoSpace": false
    }
  }
]