Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,464,570
Community Members
 
Community Events
176
Community Groups

REST API - Disabled and enabled Tasks in all stages

Hi team.

I am looking for an endpoint which can help me find the disabled and enabled tasks in all the stages for a plan. Looking forward to your help. Thanks in advance.

3 answers

1 accepted

to help other members who might eventually find their way here - as per above comment from @Richard White _TechTime_  there is no way to get task information using REST API

@Richard White _TechTime_  thank you for taking time to answer the query. Having looked at the above solution, it is not the one that could help me. 

I will try and elaborate a bit more -

As we can see below, I have a task which is disabled

task_disabled.PNG 

 

So, if I have 2 stages and 4 jobs within them and each of the jobs has - say 5 tasks.

How do I know which of the tasks in which these jobs are disabled? using the REST API?

Ah I see, I my response will only give the status for each job, not each task.

To the best of my knowledge there is no rest api which will give you task information.

Hi,

 

You can use the plan endpoint to get this information:

/rest/api/latest/plan/<plan-key>?expand=stages.stage.plans

If you set header

Accept:"application/json` 

you will get something in the following format:

{
  "expand":"actions,stages,branches,variableContext",
  ...,
  "project":{
    <project info like key description etc.>,
    "enabled":true,
    "stages":{
      "size":4,
      ...,
      "stage":[
        {
          ...
          "plans":{
            "plan":[
              {
                "key":"TEST",
                "type":"JOB"
                ...<Other plan info>,
                "enabled":true,
              },
              ... <Other jobs>
            ]
          }
        }
      ]
    }
  }
}

Which hopefully is the info you are looking for?

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events