Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket REST Limits not returning correct results?

Stephen Garber
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 28, 2018

Limits in the Bitbucket API doesn't appear to working properly, for example:

https://URL/stash/rest/api/1.0/users?permission=LICENSED_USER&limit=500

Returns 500 results (good so far)

https://URL/stash/rest/api/1.0/users?permission=LICENSED_USER&limit=750

Returns 605 results

https://URL/stash/rest/api/1.0/users?permission=LICENSED_USER&limit=1000

Returns 512 results

https://URL/stash/rest/api/1.0/users?permission=LICENSED_USER&limit=1500

Returns 476 results

 

Strangely these are consistent in their incorrectness...

 

What could be causing this?

1 answer

1 accepted

1 vote
Answer accepted
Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 29, 2018

Hi @Stephen Garber,

I would like to collect more details on this:

- Bitbucket Server version 

- size, limit, start, filter and nextPageStart values from the output for each example

 

If you can also share what is the end goal of using this REST API endpoint, there may be a better option to use.

 

Cheers,

Caterina - Atlassian

Stephen Garber
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 29, 2018

We are using bitbucket 5.8.3

No filters on these calls

Limit 500
size":500,"limit":500,"isLastPage":false
Limit 750
size":611,"limit":750,"isLastPage":true
Limit 1000
size":520,"limit":1000,"isLastPage":true
Limit 1500
size":479,"limit":1500,"isLastPage":true

We are using this to determine the number of active licensed users, but will be switching to https://URL/stash/rest/api/1.0/admin/license.

Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 29, 2018

Hi @Stephen Garber,

Sure, the rest/api/1.0/admin/license is a valid option to determine the number of active users.

If you are also looking for the usernames, you can follow the steps on this article:

How do I find which users count against my Bitbucket Server license?

 

I just tried to reproduce the issue with the filter, but I've not been able to and we may need to dig deeper in the data to understand what's happening. Let me know if you would like to continue investigating.

 

Caterina - Atlassian

Stephen Garber
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 4, 2018

No need to continue investigating, I'll just count that as an anomaly with our bitbucket instance.

 

Thanks for the Help Caterina.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events