May i get a bitbucket API to copy the file content by passing the commit version number?
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
That 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
It looks like you're new here. Sign in or register to get started.