API additional data EN: различия между версиями

Материал из WiKi - UserSide
(Новая страница: «en | ru»)
 
Нет описания правки
Строка 1: Строка 1:
[[API_additional_data_EN|en]] | [[API_additional_data|ru]]
[[API_additional_data_EN|en]] | [[API_additional_data|ru]]
Section '''[[API_EN|API]]''' ERP "UserSide"
Purpose: Action with additional fields/data
Optional parameters:
action - request subcategory ''(possible value: see below)'''
Additional fields have categories (cat_id)
1 - Employees ''(up to 3.16dev2)''
2 - Cable lines
4 - Users ''(all. Up to 3.14)''
5 - Users ''(legal entities. Up to 3.14)''
6 - Radio equipment
7 - Buildings
8 - Switches
9 - Media converters
10 - System devices
11 - Operators ''(up to 3.16dev2)''.
12 - Rates (manual billing only)
13 - Additional Services (manual billing only)
14 - Accommodation facilities
15 - Crosses/ODFs
16 - VLAN
17 - Tasks
18 - Vehicles
19 - Advertising campaigns
20 - Custom devices
21 - Suppliers
22 - Potential users ''(up to 3.14)''
23 - Dividers/ Splitters
24 - Owners
25 - INVENTORIES
26 - Cable ducts
27 - Cable routes ''(of cable lines)''
28 - Users ''(all. From 3.14)''
29 - Keys
30 - Names of inventory items ''(from 3.14.5)''
40 - Address units ''(from 3.14.14)''
48 - Warehouses ''(from 3.14.12)''
999 - Employees ''(since 3.16dev2)''
Additional fields have a field type (type)
1 - Text
2 - Number
3 - Flag
4 - Selection from list
5 - Text field
6 - Selection from list (including your own variant)
7 - Date
8 - Selection from list (several values)
== Subcategories ==
==== get_list ====
''Modified in: 3.14.22 (numeric values can be used in section parameter)''
Description: Retrieve a list of fields
Obligatory parameters:
  section - Category of optional fields [house|node|task|switch|inventory|...numeric values from the catalogue above...]
==== add_field ====
Description: Adding an additional field
Obligatory parameters:
  cat_id - category (see above directory)
  name - name
Optional parameters
  type - field type (see above guide)
  size - field size
  max_size - maximum size of the field
  is_active - flag - field is enabled
  position - field position among others
  is_require - flag - required to be filled in
==== edit_field ====
''Modified in: 3.13.14 (added value_list parameter)''
Description: Edit additional field
Obligatory parameters:
  cat_id - category (see above directory)
  id - field id
Optional parameters
  See from add_field method
  value_list - possible values for the field type "Select from list" ''(separator - vertical line "|")''
==== delete_field ====
Description: Deletion of additional field (deleted only if there are no records with this additional field)
Obligatory parameters:
  cat_id - category (see above directory)
  id - field id
==== get_value ====
''Added from:'' 3.12.80''
Description: Retrieve field values
Obligatory parameters:
  field_id - field id
Optional parameters:
  object_id - id of object ''(by which field value)'''
  value - field value
==== change_value ====
Description: Changing the value of an additional field
If the object does not have such an additional field, it will be created.
Obligatory parameters:
  field_id - id of additional field
  object_id - object id
  value - value
  cat_id - category ''(for versions before 3.14 and only for users. See above guide)''

Версия от 16:51, 26 июля 2023

en | ru

Section API ERP "UserSide"

Purpose: Action with additional fields/data

Optional parameters:
action - request subcategory (possible value: see below)'

Additional fields have categories (cat_id)

1 - Employees (up to 3.16dev2)
2 - Cable lines
4 - Users (all. Up to 3.14)
5 - Users (legal entities. Up to 3.14)
6 - Radio equipment
7 - Buildings
8 - Switches
9 - Media converters
10 - System devices
11 - Operators (up to 3.16dev2).
12 - Rates (manual billing only)
13 - Additional Services (manual billing only)
14 - Accommodation facilities
15 - Crosses/ODFs
16 - VLAN
17 - Tasks
18 - Vehicles
19 - Advertising campaigns
20 - Custom devices
21 - Suppliers
22 - Potential users (up to 3.14)
23 - Dividers/ Splitters
24 - Owners
25 - INVENTORIES
26 - Cable ducts
27 - Cable routes (of cable lines)
28 - Users (all. From 3.14)
29 - Keys
30 - Names of inventory items (from 3.14.5)
40 - Address units (from 3.14.14)
48 - Warehouses (from 3.14.12)
999 - Employees (since 3.16dev2)

Additional fields have a field type (type)

1 - Text
2 - Number
3 - Flag
4 - Selection from list
5 - Text field
6 - Selection from list (including your own variant)
7 - Date
8 - Selection from list (several values)

Subcategories

get_list

Modified in: 3.14.22 (numeric values can be used in section parameter)

Description: Retrieve a list of fields
Obligatory parameters:
 section - Category of optional fields [house|node|task|switch|inventory|...numeric values from the catalogue above...]

add_field

Description: Adding an additional field 
Obligatory parameters:
 cat_id - category (see above directory)
 name - name
Optional parameters
 type - field type (see above guide)
 size - field size
 max_size - maximum size of the field
 is_active - flag - field is enabled
 position - field position among others
 is_require - flag - required to be filled in

edit_field

Modified in: 3.13.14 (added value_list parameter)

Description: Edit additional field 
Obligatory parameters:
 cat_id - category (see above directory)
 id - field id
Optional parameters
 See from add_field method
 value_list - possible values for the field type "Select from list" (separator - vertical line "|")

delete_field

Description: Deletion of additional field (deleted only if there are no records with this additional field)
Obligatory parameters:
 cat_id - category (see above directory)
 id - field id

get_value

Added from: 3.12.80

Description: Retrieve field values
Obligatory parameters:
 field_id - field id
Optional parameters:
 object_id - id of object (by which field value)'
 value - field value

change_value

Description: Changing the value of an additional field 
If the object does not have such an additional field, it will be created.
Obligatory parameters:
 field_id - id of additional field
 object_id - object id
 value - value
 cat_id - category (for versions before 3.14 and only for users. See above guide)