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

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

Different API results on Bitbucket Server with same user

Edited

Hello all -

Weird issues I'm seeing with Bitbucket Server v4.14.4.

I built a Python application that uses the Python Requests library for RESTful interaction. It works great and I can query Projects, Repositories, etc and get a nice .json file back.

Here is where it gets strange.

When using the Python application and my BB user/password I get say, 100 projects, from this server.

When I put in the exact URL 

<server>/rest/api/1.0/projects?limit=1000

I get about 60 more projects!

I dumped both results into excel and did a compare and via the Python Requests API query I see all the same projects but with a Chrome dump I see more projects.

My user has Admin access and can see all repos.

Really baffling in why Chrome is returning more data than a Python API call.

Any idea on what might be occurring? I see no rhyme or reason because the projects are scattered throughout the list.

 

Edit: So I queried these projects via the API and am getting this message back:

{ "errors": [{ "context": null, "message": "You are not permitted to access this resource", "exceptionName": "com.atlassian.bitbucket.AuthorisationException" }]}

So my user can see the projects, see the .json file, see the repos when using Chrome but when querying the exact same project from the CLI (using Python and basic REST commands) I am getting authentication errors.

How do you go about fixing user permissions so that a web user can see the same data as a CLI user? 

1 answer

0 votes

Hi! 

After reading the post I understood the problem with pagination 

Please, take a look how to fetch from paginated response in that module

https://github.com/atlassian-api/atlassian-python-api/tree/master/atlassian/bitbucket

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,811 views 10 16
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