Differences
This shows you the differences between two versions of the page.
en:d-sdk:4_units:3_get_units [2018/04/25 17:47] info@geliossoft.ru |
en:d-sdk:4_units:3_get_units [2021/07/07 13:28] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Units list ====== | ||
- | The request is intended to receive the units list. | ||
- | === Request exmple === | ||
- | <code php>&svc=get_units¶ms={ | ||
- | "id_group":integer, | ||
- | "filtr_cf":[{ | ||
- | "name":string, | ||
- | "value":string | ||
- | }] | ||
- | }</code> | ||
- | |||
- | === Parameters === | ||
- | ^ Parameter ^ Description ^ | ||
- | | id_group | Unique group id | | ||
- | | filtr_cf | JSON-object, which has keys "name" and "value" to filter results by custom-fields| | ||
- | | name | Name of custom-field | | ||
- | | value | Value of custom-field | | ||
- | |||
- | === Addional info === | ||
- | params={"short_details":1} - will response only with info from units | ||
- | |||
- | svc = get_units - will response with all available units | ||
- | |||
- | optional parameter "id_group" - will response with units included into specified group | ||
- | |||
- | optional parameter "id_camera" - will response with unit with specified camera | ||
- | |||
- | optional parameter "filtr_cf" - will response with units with specified custom field, if parameter is empty (filtr_cf:«») will response with units with any custom fields | ||
- | |||
- | === Response === | ||
- | == Units list == | ||
- | <code php>{ | ||
- | "id": 66780, // unique unit id | ||
- | "hw_id": "12412421", // hardware id | ||
- | "hw_type": "32131241", // hardware type | ||
- | "removed": 0, // deletion status (in recycle = 1, not in recycle = 0) | ||
- | "is_free": 0, // billing status (chargeable = 0, free = 1) | ||
- | "creator": 24237, // unit creator | ||
- | "name": "TestSDK", // unit name | ||
- | ... | ||
- | }</code> |