REST API

Add_Attachment

OVERVIEW

This REST API allow users to add Attachments/URL to any work item or Defect. It also allows user to add Revision in DMS Items

Web Service URL: https://xxx.orcanos.com/xxxx/api/v2/Json/Add_Attachment

Method: Post

Input: 

Authorization: Basic Auth token in the Request Headers

Section 1 : Add File in Attachment tab
Key Value Is Mandatory? Description
Object_ID Integer Yes Enter the Item ID i.e 1234
Object_Type String Yes Enter the type of Item i.e. OBJECT/DMS/DEFECT

  • Work items, the Object_Type should be ‘Object
  • DMS items, the Object_Type should be ‘DMS
  • Defect, the Object_Type should be ‘Defect‘.
Attachment_Type String Yes Enter the type of Item as File
Attachment_Desc String No Enter the Description of the attachment
Over_Write String No Overwrite the existing attachment

Request Params:

 

 

 

 

 

 

File Details

Key Value Is Mandatory? Description
File Selection Yes Select the File to be added as attachment when adding file attachment.

 

 

 

 

 

 

Output:

 

 

 

 

 

Section 2 : Add URL in Attachment tab
Key Value Is Mandatory? Description
Object_ID Integer Yes Enter the Item ID i.e 1234
Object_Type String Yes Enter the type of Item i.e. OBJECT/DMS/DEFECT

  • Work items, the Object_Type should be ‘Object
  • DMS items, the Object_Type should be ‘DMS
  • Defect, the Object_Type should be ‘Defect‘.
Attachment_Type String Yes Enter the type of Item as URL
Attachment_Desc String No Enter the Description of the URL
URL String (URL) Yes Enter the URL to add in the Attachment tab

Request Params:

Output:

Section 3 : Add Revision in Revision section (DMS)
Key Value Is Mandatory? Description
Object_ID Integer Yes Enter the Item ID i.e 1234
Object_Type String Yes Enter the type of Item as DMS
Attachment_Type String Yes Enter the type of Item as File
Attachment_Desc String No Enter the Description of the attachment
KeepOldName String (YES/NO) No It is specific to DMS items

  • Yes‘ if want to keep old name in latest added revision.
  • No‘ if want to use the new name (replace) in the latest added revision.

Request Params:

 

File Details

Key Value Is Mandatory? Description
File Selection Yes Select the File to be added as attachment when adding file attachment.

Output:

Key Value Is Mandatory? Description
Object_ID Integer Yes Enter the Item ID/Key
Object_Type String Yes Enter the type of Item i.e. OBJECT/DMS/DEFECT

  • Work items, the Object_Type should be ‘Object
  • DMS items, the Object_Type should be ‘DMS
  • Defect, the Object_Type should be ‘Defect‘.
Attachment_Type String Yes Enter the type of Item i.e. File or URL

  • For adding file/doc, Attachment_Type should be ‘File
  • For adding URL, Attachment_Type should be ‘URL
Attachment_Desc String No Enter the Description of the attachment
KeepOldName String (YES/NO) No It is specific to DMS items

  • Yes‘ if want to keep old name in latest added revision.
  • No‘ if want to use the new name (replace) in the latest added revision.
URL String (URL) No Enter the URL to add in the Attachment tab

 

Related Articles