Use the REST API for RubyGems

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide

The REST API provides access to the Gems Add-on through the repository key using the following URL:

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

In addition to the basic binary repository operations, such as download, deploy, delete, etc., the following RubyGems.org API Gem commands are supported:

Table 2. 

Gem Command

Curl Syntax Example

Info

curl http://localhost:8081/artifactory/api/gems/<repository key>/api/v1/gems/my_gem.(json|yaml)

Search

curl http://localhost:8081/artifactory/api/gems/&lt;repository key&gt;/api/v1/search.(json|yaml)?query=[query]

Dependencies

curl http://localhost:8081/artifactory/api/gems/&lt;repository key&gt;/api/v1/dependencies?gems=[gem1,...]

Yank

curl -X DELETE http://localhost:8081/artifactory/api/gems/&lt;repository key&gt;/api/v1/yank-d 'gem_name=gem_name' -d 'version=0.0.1' -d 'platform=ruby'


Indexing is done automatically by Artifactory in the background, however if you still need to recreate or update the spec index files, the following REST API commands are also available:

Table 3. 

REST Command

Curl Syntax Example

Remarks

ReIndex

curl -X POST http://localhost:8081/artifactory/api/gems/&lt;repository key&gt;/reindex

Re-creates all spec index files.

Update index

curl -X POST http://localhost:8081/artifactory/api/gems/&lt;repository key&gt;/updateIndex

Updates all spec index files if needed.