Search

Add Attachment

Last Updated: Nov 26, 2021

Articles

Use this function to add an attachment to the ticket.

Syntax

Add Attachment (token, url, username, issue_key, file_path)

Parameters

Input Parameter Name Description
token JIRA API token
url JIRA URL
username JIRA username
issue_key Key of the Issue
file_path Attachment path in client machine

To know more about token, click here.

Returns

Return Value Description
Output
  • On Success returns 1 | Attachment ID
  • On Failure returns 0 | Error Message

Sample

Add Attachment (ABCDCEF, https: //yourusername.atlassian.net, yourname@gmail.com, EX-30, C:\Invoice\Invoice.pdf)

  • Uses the token ABCDEF to connect to JIRA with the url https: //yourusername.atlassian.net with the username yourname@gmail.com, adds the attachment from C:\Invoice\Invoice.pdf to the issue EX-30.
    Returns the Attachment ID of the added attachment.

To view all the JIRA functions, click here.

Did you find what you were looking for?