Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Want to add/remove users from team on jira align using API

Want to know the API for users to add team and remove users from team in jira align.

2 answers

2 accepted

1 vote
Answer accepted

Hi @Mohamed Musheer !

Assuming you have a valid API 2.0 token, and corresponding grants in UI to perform this operation....

 

To add a user to a team, by using Jira Align API 2.0, make the following call:

PATCH https://instance.jiraalign.com/rest/align/api/2/Users/<id>

Where <id> is the userId of your user.

As request body, use the following JSON:

[
{
"op": "add",
"path": "/teams/0",
"value": {
"teamId": 1385,
"roleId": 6
}
}
]

Notice teamId and roleId are mandatory fields.  Each team has its own set of valid roles.  Check your team type and corresponding valid values before issuing this call.

The property path is also important.  As path is an array, you must clearly declare which position (index) you're filling.  So if the user doesn't belong yet to any team, then you must use position (index) 0 (as in the example).  If the user already belongs to, let's say, only one team, then you must use position (index) 1 (the second position, as they start counting from zero) and so on.

 

Removing a team assignment, in turn, is a simpler operation.

Just make the following call:

PATCH https://instance.jiraalign.com/rest/align/api/2/Users/<id>

Where <id> is the userId of your user.

As request body, use the following JSON:

[
{
"op": "remove",
"path": "/teams/0"
}
]

The property path determines which team assignment (index) you want to remove.

0 votes
Answer accepted
Rich Sparks Atlassian Team Mar 29, 2021

In addition to @Rodrigo Cortez 's answer about the specifics, I assume you've read this already and looked at the specific documentation that's available in your Jira Align instance:

https://help.jiraalign.com/hc/en-us/articles/360045371954-Getting-started-with-the-REST-API-2-0

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Align

Helpful hints if you're rolling Align out to your entire enterprise

(Or, What to expect when you’re expanding.) Once you've completed your Jumpstart, or your initial assessment of Jira Align, you'll start to think about how you can roll it out to the rest of your e...

939 views 3 22
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you