Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Post worklog to Jira via JSON - authentication

Per-Åge Themte
Contributor
January 16, 2019

Hi,

I'm creating an integration between SAP and Jira for posting worklogs. We have around 150 users and I can't seem to understand how to authenticate each one?

In Atlassian ID, everyone can create an access token. Can this be used somehow when posting JSON, or do I have to call with each users username and password?

If so - can you please help me out and explain how to to fill this oauth authentication in e.g postman?

In SAP, we have an http-class than that now works for GET and POST with basic auth. If tokens can be used - can they be added to the header the same way as basic can? 

Thanks in advance!

1 answer

0 votes
Michael Wan January 16, 2019

The usage of token is covered here: https://confluence.atlassian.com/cloud/api-tokens-938839638.html

In term of integration with another app, it seems complicated/less-secure for regular users to generate their token and enter it in another app. Perhaps you could create a "service account" in JIRA and use that account to access JIRA from SAP. You would need to map your users' account id in SAP to JIRA. 

Per-Åge Themte
Contributor
January 17, 2019

Thanks for replying @Michael Wan!

 Yes, I've created an API user for basic GET's, but I was under the impression that you cannot post worklogs on behalf of other users?

In the API spec, it says: 

author

UserJsonBean

User details. Note, cannot be specified as a body parameter in Add worklog or Update worklog.

If this is possible, I'm more than happy to connect to Jira with one API user for all operations. The mapping is easily maintainable in SAP

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events