문제

How can I get a JSON object with teams (organizations) where the user is member?

I am searching in documentation and in Bitbucket REST API Console.

Basically I need the correspondent for orgs.getFromUser function from Github API where I pass the username after authenticating.

도움이 되었습니까?

해결책 2

Use the "User Endpoint" for API 1.0

https://confluence.atlassian.com/display/BITBUCKET/user+Endpoint

The call your looking for is: https://bitbucket.org/api/1.0/user/privileges

You need to call this with user authenticated:

curl -u "USER_NAME:USER_PASSWORD" https://bitbucket.org/api/1.0/user/privileges

This will return a list of teams:

{u'teams': {u'team1': u'admin', u'team2': u'admin'}}

다른 팁

I think you're looking for this endpoint.

You provide the accountname and authenticate for it, and GET /1.0/groups/:accountname/. It will return a list of objects displayed on the documentation page.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top