How do I get the name of the Jira account that created the Tempo worklog? Using the
https://apidocs.tempo.io/ I can only get the author accountId, which is an account of Tempo.
After getting the author.accountId
field in the Tempo API response, you can use the Jira REST API to retrieve user details based on this Account ID.
The endpoint for this is:
GET https://your-domain.atlassian.net/rest/api/3/user?accountId=<author.accountId>
You can get user display name, avatar, etc using this endpoint.
Hi @Afonso Souza , welcome to the Community!
Yes, Tempo worklog is just returning account id. So, you should combine it with Jira Cloud's Get User method:
curl --request GET \
--url 'https://your-domain.atlassian.net/rest/api/3/user?accountId=<account_id_from_tempo>' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'
With this way, you can access the user's details like displayName, emailAddress and more.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Afonso Souza , welcome to the Community!
You are on the right way. Yes, Tempo is just returning account id in the worklog. So, you should combine it with Jira Cloud's Get User method:
curl --request GET \
--url 'https://your-domain.atlassian.net/rest/api/3/user?accountId=account_id_that_returns_from_tempo>' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'
With this way, you will get details about this user.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.