Hello @Shruthi R ,
Welcome to Atlassian Community!
The Bitbucket API provides the following endpoint to get the contents of a single file, or the contents of a directory at a specified revision (commit) :
GET /2.0/repositories/{workspace}/{repo_slug}/src/{commit}/{path}
path
points to a file, this endpoint returns the raw contents.path
points to a directory instead of a file, the response is a paginated list of directory and file objectsThat being said, and example request to that endpoint would like like the following :
curl --request GET --user <BitbucketUsername>:<AppPassword> --url https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/src/{commit}/{path}
For more information about this and other endpoints available on the Bitbucket API, you can refer to the following documentation:
Hope that helps to address your question. Let us know if you need further assistance :)
Best regards,
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.