Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revision Both sides next revision
en:d-sdk:4_units:3_get_units [2018/04/25 09:58]
info@geliossoft.ru created
en:d-sdk:4_units:3_get_units [2018/04/25 17:46]
info@geliossoft.ru
Line 1: Line 1:
 FIXME **This page is not fully translated, yet. Please help completing the translation.**\\ //(remove this paragraph once the translation is finished)// FIXME **This page is not fully translated, yet. Please help completing the translation.**\\ //(remove this paragraph once the translation is finished)//
  
-====== ​Получение списка объектов ​====== +====== ​Units list ====== 
-Запрос предназначен для получения списка объектов.+The request is intended to receive the units list.
  
-=== Пример запроса ​===+=== Request exmple ​===
 <code php>&​svc=get_units&​params={ <code php>&​svc=get_units&​params={
     "​id_group":​integer,​     "​id_group":​integer,​
Line 13: Line 13:
 }</​code>​ }</​code>​
  
-=== Параметры ​=== +=== Parameters ​=== 
-Параметр ​  ^ Значение ​  ^ +Parameter ​  ^ Description ​  ^ 
-| id_group | Уникальный идентификатор группы объектов ​+| id_group | Unique group id 
-| filtr_cf | JSON-объекткоторый имеет ключи ​name и value, для фильтрации объектов по custom-fields| +| filtr_cf | JSON-objectwhich has keys "name" and "value" to filter results by custom-fields| 
-| name | Имя ​custom-field | +| name | Name of custom-field | 
-| value | Значение ​custom-field |+| value | Value of custom-field |
  
-=== Дополнительно ​=== +=== Addional info === 
-params={ +params={"​short_details":​1} - will response only with info from units
-    ​"​short_details":​1 +
-} - Вернёт только данные из units+
  
-svc = get_units ​вернёт все объекты доступные пользователю необязательный параметр id_group вернёт обекты входящие в эту группу необязательный параметр id_camera вернёт обект которому принадлежит камера (вместе с параметром id_group) вернёт объект,​ только если он входит в эту группу filtr_cf ​при наличии параметра - вернёт объекты с custom fields если параметр пустой (filtr_cf:​«») вернёт все объекты со всеми custom_field+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>{ <code php>{
-    "​id":​ 66780, // Уникальный ID объекта +    "​id":​ 66780, // unique unit id 
-    "​hw_id":​ "​12412421",​ // ID оборудования объекта +    "​hw_id":​ "​12412421",​ // hardware id 
-    "​hw_type":​ "​32131241",​ // Тип оборудования объекта +    "​hw_type":​ "​32131241",​ // hardware type 
-    "​removed":​ 0, // Статус объекта ​(в корзине ​= 1, не в корзине ​= 0) +    "​removed":​ 0, // deletion status ​(in recycle ​= 1, not in recycle ​= 0) 
-    "​is_free":​ 0, // Статус объекта ​(платный ​= 0, бесплатный ​= 1) +    "​is_free":​ 0, // billing status ​(chargeable ​= 0, free = 1) 
-    "​creator":​ 24237, // Создатель объекта +    "​creator":​ 24237, // unit creator 
-    "​name":​ "​TestSDK",​ // Название объекта+    "​name":​ "​TestSDK",​ // unit name
     ...     ...
 }</​code>​ }</​code>​