Download File within a VCS Branch

JFrog REST APIs

Content Type
REST API

Description: Downloads a specific file from within a branch.

Since: 3.6.0

Security: Requires a privileged user (can be anonymous)

Usage:GET /artifactory/api/vcs/downloadBranchFile/{repoKey}/{userOrg}/{repo}/{branch-name}!{file-path}

This API can also be called using the userOrg as the repository, like this:

GET /artifactory/api/vcs/downloadBranchFile/{repoKey}/{userOrg}/{branch-name}!{file-path}

Produces: application/octet-stream

Sample Output:

GET /artifactory/api/vcs/downloadBranchFile/github/jquery/jquery/master!README.md
<AUTHORS.txt content>

Sample Output when using userOrg as the repository:

GET /artifactory/api/vcs/downloadBranchFile/gs-repo/crossbench/main!README.md
<README.md content>

In the example above, userOrg = crossbench , the branch name is main, and the file is README.md.