Use the REST API for RubyGems

JFrog Artifactory Documentation

ft:sourceType
Paligo

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:

Gem Command

Curl Syntax Example

Remarks

Info

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

Optionally indicate JSON / YAML (default: JSON)

Search

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

Will search for gems with name containing query

Dependencies

curl http://localhost:8081/artifactory/api/gems/<repository key>/api/v1/dependencies?gems=[gem1,...]

Use a csv of gem names for the value of gems

Yank

curl -X DELETE http://localhost:8081/artifactory/api/gems/<repository key>/api/v1/yank

-d 'gem_name=gem_name' -d 'version=0.0.1' -d 'platform=ruby'

Deletes the specific gem file from the repository

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:

REST Command

Curl Syntax Example

Remarks

ReIndex

curl -X POST http://localhost:8081/artifactory/api/gems/<repository key>/reindex

Re-creates all spec index files.

Update index

curl -X POST http://localhost:8081/artifactory/api/gems/<repository key>/updateIndex

Updates all spec index files if needed.