Place
CRUD
CRUD | Http Verb | Route | Description |
---|---|---|---|
READ | GET | /place/{id} | Retrieve a single Place from it's id |
CREATE | POST | /place | Create a Place |
UPDATE | POST | /place/{id} | Update a Place |
DELETE | DELETE | /place/{id} | Delete a Place |
SEARCH | GET | /place | Looking for Places |
BATCH DELETE | DELETE | /place | Delete multiple Places |
Model
WARNING: This Model is the one retrieve using X-API-MODE="get" (see READ & SEARCH operations). So if you use the legacy one (standard), the model may differs on some fields.
Field | Type | Readonly | Nullable | Translatable | Description |
---|---|---|---|---|---|
building_id | int | If the Place correspond to a building, here come the building identifier | |||
created_at | datetime(ISO 8601) | Create datetime | |||
floor_id | int | Floor identifier | |||
id | int | Identifier | |||
name | string | Name | |||
path_node_id | int | If the Place correspond to a path node, here come the path node identifier | |||
pois | array | List of associated POIs | |||
pois[] | Poi#id | Associated POI identifier | |||
shape_id | int | If the Place correspond to a shape, here come the shape identifier | |||
position | object | Centroid position | |||
position.x | float | ||||
position.y | float | ||||
position.z | float | ||||
signature | string | Unique optional identifier used to reference that Site to be used in data import | |||
site | Site#id | Site identifier | |||
updated_at | datetime(ISO 8601) | Last updated datetime | |||
version | int | Revision version, it's incremented on each change |
READ
Parameters
Name | In | Type | Required | Default | Constraint | Description |
---|---|---|---|---|---|---|
id | Route | int | ||||
X-API-MODE | Header | string | standard | "standard" or "get" | The "standard" mode is deprecated. Note that X-API-MODE will change serialization format. |
Responses
Http Code | Description | Response type | Response Content | Note |
---|---|---|---|---|
200 | Success | application/json | Place | The Place serialisation will differs depending on X-API-MODE |
400 | Invalid data | application/json | Error | |
403 | Authentication Error | application/json | Error | |
404 | Not Found | |||
500 | Internal Server Error | application/json | Error | |
503 | Service Unavailable |
CREATE
Parameters
Name | In | Type | Nullable | Required | Default | Constraint |
---|---|---|---|---|---|---|
building_id | Data | int | null | |||
floor_id | Data | int | ||||
name | Data | string | Not empty string | |||
pois | Data | array | [] | |||
pois[] | Data | Poi#id | Valid Poi#id on same site | |||
path_node_id | Data | int | null | |||
shape_id | Data | int | null | |||
position | Data | object | ||||
position.x | Data | float | ||||
position.y | Data | float | ||||
position.z | Data | float | ||||
signature | Data | string | null | |||
site | Data | Site#id | Valid Site#id |
Responses
Http Code | Description | Response type | Response Content |
---|---|---|---|
200 | Success | application/json | { id: Place#id } |
400 | Invalid data | application/json | Error |
403 | Authentication Error | application/json | Error |
404 | Not Found | ||
500 | Internal Server Error | application/json | Error |
503 | Service Unavailable |
UPDATE
Parameters
Name | In | Type | Nullable | Required | Default | Constraint |
---|---|---|---|---|---|---|
building_id | Data | int | Preserves value | |||
floor_id | Data | int | Preserves value | |||
name | Data | string | Preserves value | Not empty string | ||
pois | Data | array | Preserves value | |||
pois[] | Data | Poi#id | Valid Poi#id on same site | |||
shape_id | Data | int | Preserves value | |||
path_node_id | Data | int | Preserves value | |||
position | Data | object | Preserves value | |||
position.x | Data | float | ||||
position.y | Data | float | ||||
position.z | Data | float | ||||
signature | Data | string | Preserves value |
Responses
Http Code | Description | Response type | Response Content |
---|---|---|---|
204 | Success | application/json | |
400 | Invalid data | application/json | Error |
403 | Authentication Error | application/json | Error |
404 | Not Found | ||
500 | Internal Server Error | application/json | Error |
503 | Service Unavailable |
DELETE
Parameters
Name | In | Type | Required | Default | Constraint |
---|---|---|---|---|---|
id | Route | int |
Responses
Http Code | Description | Response type | Response Content |
---|---|---|---|
204 | Success | application/json | |
400 | Invalid data | application/json | Error |
403 | Authentication Error | application/json | Error |
404 | Not Found | ||
500 | Internal Server Error | application/json | Error |
503 | Service Unavailable |
SEARCH
Parameters
Name | In | Type | Required | Default | Constraint | Description |
---|---|---|---|---|---|---|
X-API-MODE | Header | string | standard | "standard" or "get" | The "standard" mode is deprecated. Note that X-API-MODE will change serialization format. | |
name | Query | string | ||||
signature | Query | string | ||||
site | Query | int |
Responses
Http Code | Description | Response type | Response Content | Note |
---|---|---|---|---|
200 | Success | application/json | Place[] | The Place serialisation will differs depending on X-API-MODE |
400 | Invalid data | application/json | Error | |
403 | Authentication Error | application/json | Error | |
404 | Not Found | |||
500 | Internal Server Error | application/json | Error | |
503 | Service Unavailable |
BATCH DELETE
Parameters
Name | In | Type | Required | Default | Constraint |
---|---|---|---|---|---|
site | Query | int | |||
id | Query | int[] |
Responses
Http Code | Description | Response type | Response Content |
---|---|---|---|
204 | Success | application/json | |
400 | Invalid data | application/json | Error |
403 | Authentication Error | application/json | Error |
404 | Not Found | ||
500 | Internal Server Error | application/json | Error |
503 | Service Unavailable |