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

Материал из WiKi - UserSide
Нет описания правки
Нет описания правки
Строка 35: Строка 35:


==== delete ====
==== delete ====
''Modified in: 3.19beta1 (removed id parameter, added uuid parameter)''
''Added in: 3.12beta25''
''Added in: 3.12beta25''
  Description: Deleting a file
  Description: Deleting a file
  Obligatory parameters:
  Obligatory parameters:
   id - id of the file
   id - id of file ''(version up to 3.19)''
  uuid - uuid of file ''(version 3.19+)'''
   name - file name ''(no paths)''
   name - file name ''(no paths)''



Версия от 20:12, 25 апреля 2024

en | ru

Section API ERP "UserSide"

Purpose: Action with attached files

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

Subcategories

add

Modified in: 3.16.19 (added name and comment parameters)

Modified in: 3.16dev4 (added possible cable_line value to object_type parameter)

Modified in: 3.16dev2 (excluded operator_id parameter, added employee_id parameter)

Modified in: 3.15.42 (added possible value of inventory to object_type parameter)

Modified in: 3.14.21 (added possible value customer to object_type parameter)

Description: Adding a file to an object
Obligatory parameters:
 object_type - object type [cable_line|customer|node|task|task_comment|inventory]
 object_id - id of the object to which to attach the file
 comment_id - id of the task comment to which to attach the file (for task_comment type)
 src - url to the file to be uploaded and attached
Optional parameters:
 employee_id - id of the employee on whose behalf to add the file
 operator_id - id of the operator on whose behalf to add the file (before version 3.16dev2)
 name - file name (arbitrary text)
 comment - file notes/description
 src_id - id of file upload method/type (arbitrary, at client's discretion)

delete

Modified in: 3.19beta1 (removed id parameter, added uuid parameter)

Added in: 3.12beta25

Description: Deleting a file
Obligatory parameters:
 id - id of file (version up to 3.19)
 uuid - uuid of file (version 3.19+)'
 name - file name (no paths)

get

Modified in: 3.16dev4 (added possible cable_line value to object_type)

Modified in: 3.15.42 (added possible value of inventory to object_type parameter)

Modified in: 3.15.12 (added object_type and object_id parameters)

Modified in: 3.14.41 (added ext_name and int_name parameters)

Added in: 3.14.36

Description: Retrieve information
Obligatory parameters (something one):
 id - file id (can be comma separated)
 ext_name - external file name (original)
 int_name - internal file name (as stored in the system)
 object_type - object type [cable_line|customer|inventory|node|task|task_comment] (used together with object_id)
 object_id - id of the object to which the file is attached (used in conjunction with object_type)

get_file

Added in: 3.14.57

Description: Output the contents of the file (in binary form)
Obligatory parameters:
 id - id of the file

get_file_temporary_link

Added in: 3.17dev1

Description: Provide a direct temporary link to download the file
Obligatory parameters:
 id - id of the file