post
https://hub.xyte.io/core/v1/organization/spaces-1
Finds or create a space if not found. This API can automatically find deeply nested Space and/or create the path as required.
Overview
This API can be used to quickly find a location of a deeply nested Space or create it.
For example using this API for a name Building A/Floor 2/Room 223 under the Space specified by parent_id will:
- Search for
Building Aunderparent_idand create it, if it does not exist. - Search for
Floor 2underBuilding Aand create it, it it does not exist. - Search for
Room 223underFloor 2and create it, it it does not exist. - Return the entity data for
Room 223
Authorization
This endpoint requires Authorization.
Request
| Key | Type | Description | Required |
|---|---|---|---|
| name | string | Space path name delimited by the "/" character. | Yes |
| parent_id | string | Parent space ID, defaults to Root space ID | No |
| config | string | Configuration | No |
Response
Some fields in the config field will only be returned if they are defined for the space.
| Key | Type | Description | |
|---|---|---|---|
| id | String | Space ID | |
| name | String | Space Name | |
| parent_id | String | ID of the space's parent | |
| config | object | ||
| priority_factor | String | Incident priority modifier: "-1", "0" or "1" | |
| temperature_units | String | Temperature units: "celsius" or "fahrenheit" | |
| img | String | Space image url | |
| location | Object | Location object | |
| inherit_location | Boolean | Inherit location from parent space | |
| inherit_priority_factor | Boolean | Inherit priority_factor from parent space | |
| inherit_temperature_units | Boolean | Inherit temperature_units from parent space |
