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

Материал из WiKi - UserSide
(Новая страница: «en | ru»)
 
([IronBot] Sync EN localization from RU)
 
(не показано 11 промежуточных версий 2 участников)
Строка 1: Строка 1:
[[API_attach_EN|en]] | [[API_attach|ru]]
'''en''' | [[API_attach_UK|uk]] | [[API attach|ru]]
 
Section '''[[API_EN|API]]''' ERP "UserSide"
 
Purpose: Attached file management
 
Optional parameters:
action - request subcategory ''(possible value: see below)''
 
== Subcategories ==
 
==== add ====
''Modified in: 3.21.0-beta.3 (removed src, name, comment, and src_id parameters)''
 
''Modified in: 3.19.48 (added uuid parameter)''
 
''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: Add a file to an object
Required 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)''
  uuid - UUID of another already uploaded file that should be attached to another object
Optional parameters:
  employee_id - id of the employee on whose behalf to attach the file
  name - file name ''(arbitrary text)'' ''(before version 3.21)''
  comment - file notes/description ''(before version 3.21)''
  src_id - id of file upload method/type ''(arbitrary, at the client's discretion)'' ''(before version 3.21)''
 
==== delete ====
''Modified in: 3.19beta1 (removed id parameter, added uuid parameter)''
 
''Added in: 3.12beta25''
Description: Delete a file
Required 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.20.23 (added possible additional_field value to object_type parameter)''
 
''Modified in: 3.19beta1 (removed id parameter, added uuid parameter)''
 
''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
Required parameters ''(one of the following)'':
  uuid - uuid of file ''(comma separated)'' ''(version 3.19+)''
  id - file id ''(comma separated)'' ''(versions prior to 3.19)''
  ext_name - external file name ''(original)''
  int_name - internal file name ''(as stored in the system)''
  object_type - object type [additional_field|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 together with object_type)''
 
==== get_file ====
''Modified in: 3.19beta1 (removed id parameter, added uuid parameter)''
 
''Added in: 3.14.57''
Description: Output file contents ''(in binary form)''
Required parameters:
  uuid - uuid of file ''(version 3.19+)''
  id - file id ''(versions prior to 3.19)''
 
==== get_file_temporary_link ====
''Modified in: 3.19beta1 (removed id parameter, added uuid parameter)''
 
''Added in: 3.17dev1''
Description: Provide a direct temporary link to download the file
Required parameters:
  uuid - uuid of file ''(version 3.19+)''
  id - file id ''(versions prior to 3.19)''
 
==== upload ====
 
''Added in: 3.21.0-beta.3''
 
Description: Upload (add) a file to an object.
content-type=multipart/form-data
Required 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 object_type=task_comment)''
  file - file
Optional parameters:
  employee_id - id of the employee on whose behalf to add the file
  name - file name ''(arbitrary text)''
  comment - file notes/description
  src_id - id of file upload method/type ''(arbitrary, at the client's discretion)''

Текущая версия от 11:05, 30 мая 2026

en | uk | ru

Section API ERP "UserSide"

Purpose: Attached file management

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

Subcategories

add

Modified in: 3.21.0-beta.3 (removed src, name, comment, and src_id parameters)

Modified in: 3.19.48 (added uuid parameter)

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: Add a file to an object
Required 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)
 uuid - UUID of another already uploaded file that should be attached to another object
Optional parameters:
 employee_id - id of the employee on whose behalf to attach the file
 name - file name (arbitrary text) (before version 3.21)
 comment - file notes/description (before version 3.21)
 src_id - id of file upload method/type (arbitrary, at the client's discretion) (before version 3.21)

delete

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

Added in: 3.12beta25

Description: Delete a file
Required 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.20.23 (added possible additional_field value to object_type parameter)

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

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
Required parameters (one of the following):
 uuid - uuid of file (comma separated) (version 3.19+)
 id - file id (comma separated) (versions prior to 3.19)
 ext_name - external file name (original)
 int_name - internal file name (as stored in the system)
 object_type - object type [additional_field|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 together with object_type)

get_file

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

Added in: 3.14.57

Description: Output file contents (in binary form)
Required parameters:
 uuid - uuid of file (version 3.19+)
 id - file id (versions prior to 3.19)

get_file_temporary_link

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

Added in: 3.17dev1

Description: Provide a direct temporary link to download the file
Required parameters:
 uuid - uuid of file (version 3.19+)
 id - file id (versions prior to 3.19)

upload

Added in: 3.21.0-beta.3

Description: Upload (add) a file to an object.

content-type=multipart/form-data

Required 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 object_type=task_comment)
 file - file
Optional parameters:
 employee_id - id of the employee on whose behalf to add the file
 name - file name (arbitrary text)
 comment - file notes/description
 src_id - id of file upload method/type (arbitrary, at the client's discretion)