Ruby Programming Language and Popular API Gems website screenshot

Ruby Programming Language and Popular API Gems

A profile of the Ruby programming language ecosystem from an API perspective: the language and its standard library HTTP surface (Net::HTTP), the rubygems.org package registry and its public v1/v2 REST API, Bundler, RBS type signatures, popular HTTP/REST client gems (Faraday, http.rb, HTTParty, Excon, Typhoeus, REST Client, HTTPClient), and the major Ruby frameworks used to build APIs (Rails API mode, Sinatra, Grape).

15 APIs 6 Features
Programming LanguageRubyHTTPRESTAPI ClientsFrameworksLibrariesPackage Registry

APIs

Net::HTTP (Ruby Standard Library)

The HTTP client class shipped with the Ruby standard library. Provides class and instance methods for GET, POST, PUT, DELETE, HEAD, PATCH, OPTIONS, TRACE plus WebDAV methods (CO...

RubyGems.org Registry API v1

Public REST API for the rubygems.org package registry. Endpoints cover gems, versions, downloads, owners, profiles, web hooks, activity, API keys, and OIDC/trusted-publishing to...

RubyGems.org Registry API v2

Version 2 of the rubygems.org registry API. Adds gem version detail endpoints with optional platform query parameter, returning richer metadata than v1.

Bundler

Dependency manager for Ruby. Reads a Gemfile, resolves and installs gems from rubygems.org or alternate sources, and writes Gemfile.lock for reproducible installs across environ...

RBS (Ruby Type Signatures)

A language for describing the structure of Ruby programs. Lets developers declare classes, modules, method signatures, instance variables and inheritance in separate .rbs files ...

Faraday

Simple but flexible HTTP client library with a common interface over many adapters (Net::HTTP, Typhoeus, Patron, Excon, HTTPClient, and others) and Rack-style middleware for req...

HTTParty

HTTP client gem that "makes consuming RESTful web services dead easy" via a class-level DSL. Wraps Net::HTTP with parsing, query handling, and authentication helpers.

http.rb

Fast Ruby HTTP client built on the llhttp parser with a chainable request-building API, streaming bodies, persistent connections, and fine-grained timeout control.

Excon

EXtended HTTP(S) CONnections library focused on performance, persistent connections, and predictable behavior. Used as an adapter under Faraday and inside Fog/cloud SDKs.

Typhoeus

Libcurl-based HTTP client built for running HTTP requests in parallel. Pairs well with Hydra for fan-out integrations against many APIs at once.

REST Client

Simple HTTP and REST client for Ruby inspired by Sinatra's microframework style. Provides class-level GET/POST/PUT/DELETE helpers.

HTTPClient

Long-standing Ruby HTTP client providing "the functionality of libwww-perl (LWP) in Ruby". Supports keep-alive, cookies, proxies, and SSL.

Ruby on Rails (API Mode)

Rails generated with the --api flag boots a slimmer middleware stack and an ApplicationController inheriting from ActionController::API (rather than ActionController::Base), mak...

Sinatra

"DSL for quickly creating web applications in Ruby with minimal effort." Widely used to stand up small HTTP APIs and microservices without the ceremony of a full-stack framework.

Grape

"Opinionated framework for creating REST-like APIs in Ruby." Provides a routing DSL with parameter validation, versioning, and content-negotiation helpers; runs standalone or mo...

Collections

Features

Dynamic, Object-Oriented Language

Ruby is a dynamic, open-source programming language with a focus on simplicity and productivity, with everything-is-an-object semantics.

Standard Library HTTP Client

Net::HTTP ships in the standard library and covers GET/POST/PUT/ DELETE/HEAD/PATCH/OPTIONS/TRACE plus WebDAV verbs and TLS.

Public Package Registry API

rubygems.org exposes versioned v1 and v2 REST APIs over HTTPS for discovering, publishing, and managing gems with JSON or YAML responses.

Trusted Publishing via OIDC

/api/v1/oidc/ endpoints let CI providers exchange OIDC tokens for short-lived RubyGems API keys instead of long-lived secrets.

Type Signatures with RBS

RBS provides a separate-file type signature language so Ruby code can carry an explicit, machine-checkable contract for IDEs and type checkers.

API-First Rails

rails new --api generates a Rails app with a JSON-oriented middleware stack and ActionController::API as the base class.

Use Cases

Consuming Third-Party HTTP APIs

Calling external REST APIs from Ruby scripts, jobs, and services using Net::HTTP, Faraday, http.rb, HTTParty, or Excon.

Building JSON APIs

Standing up REST/JSON APIs with Rails in --api mode, Sinatra, or Grape, optionally documented with OpenAPI tooling.

Publishing and Managing Gems

Releasing libraries to rubygems.org via the v1 publish endpoints and the gem and bundler CLIs, including trusted-publishing flows.

Mirroring or Caching a Private Gem Server

Running gemstash as a rubygems.org cache and private gem server inside an enterprise.

Static Analysis and IDE Support

Writing .rbs signatures so type checkers and IDEs can validate method shapes against the implementation.

Integrations

rubygems.org Registry

The default gem source for bundler and the gem CLI, accessible over HTTPS at https://rubygems.org and https://rubygems.org/api/v1.

GitHub Actions (setup-ruby)

ruby/setup-ruby installs prebuilt Ruby versions in CI for building, testing, and publishing gems.

OIDC Trusted Publishing

/api/v1/oidc/ exchanges short-lived CI OIDC tokens for scoped rubygems.org API keys, eliminating long-lived secrets.

Fastly CDN

rubygems.org serves gem downloads and the API surface through Fastly edge caching, tracked on status.rubygems.org.

HackerOne Vulnerability Disclosure

Ruby core security issues are reported through the official HackerOne program and the security@ruby-lang.org mailing list.

Solutions

Self-Hosted RubyGems with Gemstash

A caching proxy and private gem server for organizations that need air-gapped or controlled gem distribution.

Rails-Powered API Backends

Production JSON API backends built on Rails --api mode with Active Record, Active Job, and Action Cable as needed.

Sinatra Microservices

Lightweight HTTP services and API gateways built on Sinatra's minimal DSL.

Semantic Vocabularies

Ruby Context

20 classes · 17 properties

JSON-LD

API Governance Rules

Ruby Programming Language and Popular API Gems API Rules

7 rules · 5 errors 2 warnings

SPECTRAL

JSON Structure

Rubygems Registry Gem Structure

19 properties

JSON STRUCTURE

Rubygems Registry Version Structure

13 properties

JSON STRUCTURE

Example Payloads

Resources

🔗
SpectralRules
SpectralRules
🔗
Vocabulary
Vocabulary
🔗
JSONLD
JSONLD
🔗
Website
Website
🔗
Documentation
Documentation
🚀
GettingStarted
GettingStarted
🔗
Downloads
Downloads
📄
ReleaseNotes
ReleaseNotes
🔗
Security
Security
🔗
Community
Community
📰
Blog
Blog
👥
GitHubOrganization
GitHubOrganization
👥
GitHubOrganization
GitHubOrganization
👥
GitHubOrganization
GitHubOrganization
💻
SourceCode
SourceCode
🔗
Registry
Registry
🟢
StatusPage
StatusPage
📰
Blog
Blog
🔗
License
License

Sources

Raw ↑
opencollection: 1.0.0
info:
  name: RubyGems.org Registry API
  version: 1.0.0
request:
  auth:
    type: apikey
    key: Authorization
    value: '{{Authorization}}'
    placement: header
items:
- info:
    name: Gems
    type: folder
  items:
  - info:
      name: Get Gem Info
      type: http
    http:
      method: GET
      url: https://rubygems.org/api/v1/gems/:gem_name.json
      params:
      - name: gem_name
        value: ''
        type: path
        description: Canonical gem name.
    docs: Returns information about the named gem, including downloads, version, dependencies, and source URLs.
  - info:
      name: List Gems Owned By Authenticated User
      type: http
    http:
      method: GET
      url: https://rubygems.org/api/v1/gems.json
      auth:
        type: apikey
        key: Authorization
        value: '{{Authorization}}'
        placement: header
    docs: Returns all gems owned by the authenticated user.
  - info:
      name: Push Gem
      type: http
    http:
      method: POST
      url: https://rubygems.org/api/v1/gems.json
      auth:
        type: apikey
        key: Authorization
        value: '{{Authorization}}'
        placement: header
    docs: Submits a built .gem file for publication. Body is the binary gem file.
  - info:
      name: Yank A Version
      type: http
    http:
      method: DELETE
      url: https://rubygems.org/api/v1/gems/yank
      params:
      - name: gem_name
        value: ''
        type: query
      - name: version
        value: ''
        type: query
      - name: platform
        value: ''
        type: query
      auth:
        type: apikey
        key: Authorization
        value: '{{Authorization}}'
        placement: header
    docs: Removes a specific gem version from the index so it can no longer be installed by default.
  - info:
      name: Search Gems
      type: http
    http:
      method: GET
      url: https://rubygems.org/api/v1/search.json
      params:
      - name: query
        value: ''
        type: query
      - name: page
        value: ''
        type: query
    docs: Searches gems by name or description and returns matching gem summaries.
- info:
    name: Versions
    type: folder
  items:
  - info:
      name: List All Versions Of A Gem
      type: http
    http:
      method: GET
      url: https://rubygems.org/api/v1/versions/:gem_name.json
      params:
      - name: gem_name
        value: ''
        type: path
        description: Canonical gem name.
    docs: Returns every version of the named gem ordered most-recent first.
  - info:
      name: Get Latest Version Of A Gem
      type: http
    http:
      method: GET
      url: https://rubygems.org/api/v1/versions/:gem_name/latest.json
      params:
      - name: gem_name
        value: ''
        type: path
        description: Canonical gem name.
    docs: Returns the latest stable version number for the named gem.
  - info:
      name: Get Gem Version Details
      type: http
    http:
      method: GET
      url: https://rubygems.org/api/v2/rubygems/:gem_name/versions/:version.json
      params:
      - name: gem_name
        value: ''
        type: path
        description: Canonical gem name.
      - name: version
        value: ''
        type: path
      - name: platform
        value: ''
        type: query
    docs: Returns full details for a specific gem version, optionally filtered by platform. This is the API v2 endpoint.
- info:
    name: Downloads
    type: folder
  items:
  - info:
      name: Get Downloads For A Gem Version
      type: http
    http:
      method: GET
      url: https://rubygems.org/api/v1/downloads/:gem_full_name.json
      params:
      - name: gem_full_name
        value: ''
        type: path
    docs: Returns the total download count for a specific gem version (name plus version, e.g. "rails-7.1.3").
  - info:
      name: Get Total Rubygems Download Count
      type: http
    http:
      method: GET
      url: https://rubygems.org/api/v1/downloads.json
    docs: Returns the total number of gem downloads ever counted across rubygems.org.
- info:
    name: Owners
    type: folder
  items:
  - info:
      name: List Owners Of A Gem
      type: http
    http:
      method: GET
      url: https://rubygems.org/api/v1/owners/:gem_name.json
      params:
      - name: gem_name
        value: ''
        type: path
        description: Canonical gem name.
    docs: Returns the owners (publishers) of the named gem.
  - info:
      name: Add Owner To A Gem
      type: http
    http:
      method: POST
      url: https://rubygems.org/api/v1/owners/:gem_name.json
      params:
      - name: gem_name
        value: ''
        type: path
        description: Canonical gem name.
      body:
        type: form-urlencoded
        data:
        - name: email
          value: ''
      auth:
        type: apikey
        key: Authorization
        value: '{{Authorization}}'
        placement: header
    docs: Grants ownership of the gem to another rubygems.org user (by email).
  - info:
      name: Remove Owner From A Gem
      type: http
    http:
      method: DELETE
      url: https://rubygems.org/api/v1/owners/:gem_name.json
      params:
      - name: gem_name
        value: ''
        type: path
        description: Canonical gem name.
      body:
        type: form-urlencoded
        data:
        - name: email
          value: ''
      auth:
        type: apikey
        key: Authorization
        value: '{{Authorization}}'
        placement: header
    docs: Revokes ownership of the gem from the specified user.
- info:
    name: Profiles
    type: folder
  items:
  - info:
      name: Get Authenticated User Profile
      type: http
    http:
      method: GET
      url: https://rubygems.org/api/v1/profiles/me.json
      auth:
        type: apikey
        key: Authorization
        value: '{{Authorization}}'
        placement: header
    docs: Returns the profile of the authenticated user, including MFA level and handle.
- info:
    name: Webhooks
    type: folder
  items:
  - info:
      name: List Web Hooks
      type: http
    http:
      method: GET
      url: https://rubygems.org/api/v1/web_hooks.json
      auth:
        type: apikey
        key: Authorization
        value: '{{Authorization}}'
        placement: header
    docs: Returns all webhooks registered for the authenticated user, grouped by gem.
  - info:
      name: Register A Web Hook
      type: http
    http:
      method: POST
      url: https://rubygems.org/api/v1/web_hooks
      body:
        type: form-urlencoded
        data:
        - name: gem_name
          value: ''
        - name: url
          value: ''
      auth:
        type: apikey
        key: Authorization
        value: '{{Authorization}}'
        placement: header
    docs: Registers a callback URL fired when a gem (or any gem) is published. Use "*" as the gem name to receive global events.
  - info:
      name: Remove A Web Hook
      type: http
    http:
      method: DELETE
      url: https://rubygems.org/api/v1/web_hooks/remove
      params:
      - name: gem_name
        value: ''
        type: query
      - name: url
        value: ''
        type: query
      auth:
        type: apikey
        key: Authorization
        value: '{{Authorization}}'
        placement: header
    docs: Removes a previously registered webhook for the given gem and URL.
  - info:
      name: Test Fire A Web Hook
      type: http
    http:
      method: POST
      url: https://rubygems.org/api/v1/web_hooks/fire
      body:
        type: form-urlencoded
        data:
        - name: gem_name
          value: ''
        - name: url
          value: ''
      auth:
        type: apikey
        key: Authorization
        value: '{{Authorization}}'
        placement: header
    docs: Synchronously fires a registered webhook for testing purposes.
- info:
    name: Activity
    type: folder
  items:
  - info:
      name: Get Latest Gem Releases
      type: http
    http:
      method: GET
      url: https://rubygems.org/api/v1/activity/latest.json
    docs: Returns the most recently published gem versions.
  - info:
      name: Get Just Updated Gems
      type: http
    http:
      method: GET
      url: https://rubygems.org/api/v1/activity/just_updated.json
    docs: Returns gems that received a new version most recently.
- info:
    name: API Keys
    type: folder
  items:
  - info:
      name: Get An API Key
      type: http
    http:
      method: GET
      url: https://rubygems.org/api/v1/api_key.json
      auth:
        type: basic
        username: '{{username}}'
        password: '{{password}}'
    docs: Exchanges HTTP Basic credentials for the authenticated user's API key.
- info:
    name: OIDC
    type: folder
  items:
  - info:
      name: Exchange OIDC Token For Trusted Publishing API Key
      type: http
    http:
      method: POST
      url: https://rubygems.org/api/v1/oidc/api_key_role/:token/assume_role
      params:
      - name: token
        value: ''
        type: path
      body:
        type: json
        data: '{}'
    docs: Exchanges a CI provider OIDC token (GitHub Actions, GitLab CI, etc.) for a short-lived RubyGems API key scoped by
      a configured trusted-publishing role.
bundled: true