Reputation: 784
I'm using the JIRA rest API in order to get the team of some user by passing their accountId as a parameter in the URL, for example:
URL = "https://my_account.atlassian.net/rest/api/3/user?accountId="+userId+"/team"
But I'm getting the error: "404 item not found".
Does anyone have any idea how I could get what I need?
I'm developing with Google App.Script, but the programming language does not matter if someone has some useful idea. Thanks!
Upvotes: 1
Views: 1654
Reputation: 2992
UPDATE: Atlassian has made REST and GraphQL APIs available now for teams. See Team Public REST API and Using Team Queries in GraphQL.
Upvotes: 0
Reputation: 555
Firstly, you're forming the query incorrectly. You can't add parameters after the '?' using a forward slash because the forward slash is used for hierarchy in the URL.
Secondly, there is no endpoint 'team' and there currently is no mechanism provided by the Jira REST API to lookup what Team a user is a member of. Refer to this thread on the Atlassian community.
Upvotes: 1