Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
curl --location --request POST 'https://api.tempo.io/core4/3/timesheet-approvals/user/{AtlassianID}/{reopen/reject/approve/submit}?from={periodStartdate}&to={periodEnddate}' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {TempoAuthorisationTokenYourTempoAccessToken}'
 -d '{"comment":"well done"}'

...

Code Block
curl --location --request GET 'https://api.tempo.io/core/34/timesheet-approvals/user/{AtlassianAccountId}?from={periodStartdate}&to={periodEnddate}' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {TempoAuthorisationTokenYourTempoAccessToken}' 

You must follow these steps for every single user whose approval status you need to check.

...

Code Block
curl --location --request GET 'https://api.tempo.io/core4/3/timesheet-approvals/team/{TeamId}?from={periodStartdate}&to={periodEnddate}' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {TempoAuthorisationTokenYourTempoAccessToken}' 

The response will include the approval status for each team member. Each approval status object also includes a URI to retrieve all worklogs within the requested approval period. This enables you to programmatically retrieve all worklogs for the approval period in question.