How to use api method Get Task?

Anastasiya
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 22, 2023

Hello!

I need a help with REST API  of JIRA.

I try to use an api method "get task", but I don't understand how it works. I need to do an asynchronous operations for this method. What I need to do for it? Maybe I need to use some specific method for this?

1 answer

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 23, 2023

Hello @Anastasiya 

Welcome to the Atlassian community.

Have you referenced the REST API documentation for guidance?

https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/

This is the section that specifically addresses retrieving a Jira issue.

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-get

Anastasiya
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 7, 2023

Hello @Trudy Claspill 

 

You send me the documentation for method "Get Issue", but I told you about another method "Get Task" (https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-tasks/#api-rest-api-3-task-taskid-get)

 

And all of my questions are about this method.

Thanks for you reply.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 9, 2023

Thank you for that clarification.

According to this:

https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#async-operations

...some API calls will start an asynchronous task, and when they do they return a "303" response.

I would guess that the response will also include the Task ID for the asynchronous task. 

You need to get the Task ID and plug that into the call to the Get Task API call. The response you get to that includes the status of the asynchronous task. You can review that information to determine if the asynchronous task has completed.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events