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.
Hi @Afonso Souza
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.
author.accountId
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!
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.
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.
It looks like you're new here. Sign in or register to get started.