The JFrog Platform provides a convenient and up-to-date self-descriptive API that can be used by various tools/frameworks to automate the creation of REST calls.
This document includes information needed for REST API automation with the JFrog Platform.
The JFrog Platform REST API endpoints can be invoked in any of the standard ways to invoke a RESTful API. This section describes how to use the Platform REST API using cURL as an example.
JFrog Platform's REST API supports these forms of authentication:
The REST URL is constructed of:
Working with the JFrog Platform on the Cloud
The JFrog Platform on the Cloud offers the same extensive functionality and capabilities for automation as a self-hosted installation, including authentication, use of JFrog CLI, and the REST API endpoints.
As a Cloud service, the URL is different from a self-hosted installation and the REST API endpoints can be reached at:
The snippets below apply the same described above to an Artifactory Cloud instance named "myArtifactoryCloud" (instead of to a self-hosted installation).
To deploy the file using your username and password for authentication, you would use the following command:
Using cURL with a bearer token
curl -u myUser:myP455w0rd! -X PUT "https://myartifactorycloud.jfrog.io/artifactory/my-repository/my/new/artifact/directory/file.txt" -T Desktop/myNewFile.txt
Using JFrog CLI
jfrog rt u file.txt my-repository/my/new/artifact/directory/ --user=myUser --password=myP455w0rd!
Note that using JFrog CLI is identical with an Artifactory Cloud instance. You only need to configure JFrog CLI with the correct URL for your instance.