HTTP Request Workflow post function for API Calls

Step-1

Go to Jira project configuration ** In Workflows tab Click EDIT Icon.

In Post Functions tab section, Click Add Post Function.

 

Step-2

Choose HTTP Request API Invoke Function and Click Add.

 

Step-3

Configure Post Function and Click Add.

Here is example to use Issue fields in JSON payload:

1 2 3 4 5 6 7 { "tracking": "{issuekey}", "team": "{customfield_10201}", "customer": "{customfield_10200}", "release": "{fixversions}", "owner": "{assignee}" }

Note. You can find custom field ID at, Issues > Custom Fields > Click Edit > You will find in URL.

Supported System fields:

1 2 3 summary, description, key or issuekey, type or issuetype, status, priority, components, labels, fixversions, affectsversions, assignee, reporter, environment

To generate basic access token with username and password:

1 2 3 4 5 6 7 8 $ python >>> import base64 >>> string = 'username:password' >>> data = base64.b64encode(string.encode()) >>> print(data) b'ZGF0YSB0byBiZSBlbmNvZGVk' >>> //your basic access token: ZGF0YSB0byBiZSBlbmNvZGVk

 

Step-4

Review and Click Publish.

 

Step-5

Transition Issue and verify if HTTP Request triggered with response notification in issue comment.