CustomObject
CRUD
| CRUD | Http Verb | Route | Description |
|---|---|---|---|
| READ | GET | /customobject/{id} | Retrieve a single CustomObject from it's id |
| CREATE | POST | /customobject | Create a CustomObject |
| UPDATE | POST | /customobject/{id} | Update a CustomObject |
| DELETE | DELETE | /customobject/{id} | Delete a CustomObject |
| SEARCH | GET | /customobject | Looking for CustomObjects |
| BATCH DELETE | DELETE | /customobject | Delete multiple CustomObjects |
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.
CAUTION: CustomObject is an abstract class, so you can't create a CustomObject, you will always have to create an inherited entity of CustomObject.
CustomObject
| Field | Type | Readonly | Nullable | Translatable | Description |
|---|---|---|---|---|---|
| autoscale | bool | Whether the CustomObject is scale depends on zoom level to keep same size on screen independing from zoom level. | |||
| id | int | Identifier | |||
| offset | object | CustomObejct offset | |||
| offset.x | float | The offset on x coordinate | |||
| offset.y | float | The offset on y coordinate | |||
| offset.z | float | The offset on z coordinate | |||
| orientation_mode | string | CustomObject orientation mode: 'BILLBOARD' (always orientated to camera), 'STATIC' (glue to the floor), 'FLIP'. | |||
| permanent_display | bool | Whether the CustomObject is always visible by default | |||
| place | Place#id | The Place where the CustomObject belong to | |||
| poi | Poi#id | Attached Poi, if the re is a Poi attached to CustomObject the CustomObject will represent that Poi. So if it's a Label, the Label#name value will be same as Poi#name and if it's a Picto, the Picto#file will be same as the first Poi#logos. | |||
| site | Site#id | Site identifier | |||
| type | string | CustomObject discriminator field |
Discriminator Map
| Discriminator Value | Class |
|---|---|
| label | Label |
| picto | Picto |
Label
| Field | Type | Readonly | Nullable | Translatable | Description |
|---|---|---|---|---|---|
| alignment | string | The text alignement, for now only "center" is supported | |||
| background_color | string | Backgroud color in hexa HTML format such as "#ffffff" | |||
| font | string | The font to use. Not supported for now | |||
| font_color | string | Font color in hexa HTML format such as "#ffffff" | |||
| font_size | string | Font size | |||
| label | string | Label is the text displayed |
Picto
| Field | Type | Readonly | Nullable | Translatable | Description |
|---|---|---|---|---|---|
| file | File#id | The file display as the Picto | |||
| height | int | Height | |||
| original_md5 | string | Orginal md5 used to generate the picto#file. As the picto#File is resized, we need to keep the original file md5 to prevent useless resizing. | |||
| width | int | Width |
READ
Parameters
| Name | In | Type | Required | Default | Constraint | Description |
|---|---|---|---|---|---|---|
| id | Route | int | ||||
| X-API-LOCALE | Header | string | Site#locale | Must be one of Site#languages | ||
| 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 | CustomObject | The CustomObject 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
You cannot create a CustomObject as it's abstract, you must choose an inherited entity.
Parameters
Shared Parameters
| Name | In | Type | Nullable | Required | Default | Constraint |
|---|---|---|---|---|---|---|
| X-API-LOCALE | Header | string | Site#locale | Must be one of Site#languages | ||
| autoscale | Data | boolean | false | |||
| offset | Data | object | {x:0, y:0, z:0} | |||
| offset.x | Data | float | 0 | |||
| offset.y | Data | float | 0 | |||
| offset.z | Data | float | 0 | |||
| orientation_mode | Data | string | "STATIC" | |||
| permanent_display | Data | boolean | ||||
| place | Data | Place#id | Valid Place#id on same site | |||
| poi | Data | Poi#id | null | Valid Poi#id on same Site | ||
| site | Data | int | Valid Site#id | |||
| type | Data | string | One of discriminator value |
Label specific parameters (type="label")
| Name | In | Type | Nullable | Required | Default | Constraint |
|---|---|---|---|---|---|---|
| alignment | Data | string | Only "center" supported | |||
| background_color | Data | string | null | |||
| font | Data | float | null | |||
| font_color | Data | float | ||||
| font_size | Data | float | 10 | |||
| label | Data | string |
Picto specific parameters (type="picto")
| Name | In | Type | Nullable | Required | Default | Constraint |
|---|---|---|---|---|---|---|
| file | Data | File#id | Valid File#id on same site | |||
| height | Data | int | 10 | |||
| original_md5 | Data | string | null | |||
| width | Data | int | 10 |
UPDATE
Parameters
Shared Parameters
| Name | In | Type | Nullable | Required | Default | Constraint |
|---|---|---|---|---|---|---|
| X-API-LOCALE | Header | string | Site#locale | Must be one of Site#languages | ||
| autoscale | Data | boolean | Preserves values | |||
| offset | Data | object | Preserves values | |||
| offset.x | Data | float | ||||
| offset.y | Data | float | ||||
| offset.z | Data | float | ||||
| orientation_mode | Data | string | Preserves values | |||
| permanent_display | Data | boolean | Preserves values | |||
| place | Data | Place#id | Preserves values | Valid Place#id on same site | ||
| poi | Data | Poi#id | Preserves values | Valid Poi#id on same Site |
Label specific parameters (type="label")
| Name | In | Type | Nullable | Required | Default | Constraint |
|---|---|---|---|---|---|---|
| alignment | Data | string | Preserves values | Only "center" supported | ||
| background_color | Data | string | Preserves values | |||
| font | Data | float | Preserves values | |||
| font_color | Data | float | Preserves values | |||
| font_size | Data | float | Preserves values | |||
| label | Data | string | Preserves values |
Picto specific parameters (type="picto")
| Name | In | Type | Nullable | Required | Default | Constraint |
|---|---|---|---|---|---|---|
| file | Data | File#id | Preserves values | Valid File#id on same site | ||
| height | Data | int | Preserves values | |||
| original_md5 | Data | string | Preserves values | |||
| width | Data | int | Preserves values |
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-LOCALE | Header | string | Site#locale | Must be one of Site#languages | ||
| 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 | ||||
| type | Query | string |
Responses
| Http Code | Description | Response type | Response Content | Note |
|---|---|---|---|---|
| 200 | Success | application/json | CustomObject[] | The CustomObject 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 |
