The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Unable to pull repos list using GET method

puru kovvuri
April 10, 2022

Hi Team,

We're trying to pull repos list with cloud API and not able to get it.

https://api.bitbucket.org/2.0/repositories/workspaceID

Screenshot 2022-04-10 122625.png

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Karthick S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 10, 2022

Hello @puru kovvuri

Thank you for reaching out to Atlassian Community!

Could you please ensure the App password created has the necessary permissions? It also expects the username, not the email ID. 

Reference: https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/ 

Alternatively, you may try using CURL and see if the issue persists?

curl -X GET -u username:AppPassword "https://api.bitbucket.org/2.0/repositories/{workspace-id}"

 I hope this helps.

Kind regards,

Karthick S

puru kovvuri
April 10, 2022

 @Karthick S

Excellent, it has worked. Thank you so much !!

Is there a way to get last code committed user details and timestamp?

Like Karthick S likes this
Karthick S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 10, 2022

Hello @puru kovvuri

Glad to know it helped! You may use this API which would return commits for the specific repository. I have provided a sample CURL query that returns the results based on the recent update. The first response is the last code committed. 

curl -X GET -u username:AppPassword "https://api.bitbucket.org/2.0/repositories/workspace_id/repo_slug/commits?sort=updated_on"

I hope this helps.

Kind regards,

Karthick S

Like puru kovvuri likes this
puru kovvuri
April 10, 2022

@Karthick S Thank you again !!

Like Karthick S likes this
TAGS
AUG Leaders

Atlassian Community Events