REST API Support for VCS

JFrog Artifactory Documentation

ft:sourceType
Paligo

VCS repositories must be prefixed with api/vcs in the path

When accessing a VCS repository through Artifactory, the repository URL must be prefixed with api/vcs in the path.

For example, if you are using Artifactory standalone or as a local service, you would access your VCS repositories using the following URL:

http://localhost:8081/artifactory/api/vcs/<repository key>

Or, if you are using Artifactory Cloud, the URL would be:

https://<server name>.jfrog.io/artifactory/api/vcs/<repository key>

Artifactory exposes REST APIs that let you do the following with VCS repositories:

To help you build the API call correctly, you can select the VCS repository you want to interact with and click Set Me Up.

VcsSetMeUp.jpg

Examples

Below are some examples of working with the API using cURL:

Download jquery master branch from GitHub

curl -i  "http://localhost:8080/artifactory/api/vcs/downloadBranch/github/jquery/jquery/master"

Download a specific tag from Bitbucket

curl -i  "http://localhost:8080/artifactory/api/vcs/downloadTag/bitbucket/lsystems/angular-extended-notifications/1.0.0"

Download a file within the tag 2.0.1 of jquery, '!' is escaped as '%21'

curl -i  "http://localhost:8080/artifactory/api/vcs/downloadTagFile/github/jquery/jquery/2.0.1%21AUTHORS.txt"

When files are already cached, you can conditionally request them using a properties query param:

Download a file within the tag 2.0.1 of jquery, '!' is escaped as '%21'

curl -i  "http://localhost:8080/artifactory/api/vcs/downloadBranch/github/jquery/jquery/2.0.1?properties=qa=approved"