Hex.pm Index API

API index and discovery.

OpenAPI Specification

hex-pm-index-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Hex.pm API Keys Index API
  description: REST API for the Hex.pm package registry, providing endpoints to search and retrieve package metadata, manage releases, handle authentication, manage API keys, and administer organizations and package ownership. The API supports JSON and Erlang media types.
  version: 1.0.0
  contact:
    name: Hex Support
    email: support@hex.pm
    url: https://hex.pm/docs
  termsOfService: https://hex.pm/policies/terms
  license:
    name: Hex.pm Terms of Service
    url: https://hex.pm/policies/terms
servers:
- url: https://hex.pm/api
  description: Hex.pm Production API
security:
- ApiKeyAuth: []
tags:
- name: Index
  description: API index and discovery.
paths:
  /:
    get:
      operationId: getApiIndex
      summary: Get API Index
      description: Returns available API endpoints and documentation URL.
      tags:
      - Index
      security: []
      responses:
        '200':
          description: API index with URL templates for all resources.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiIndex'
components:
  schemas:
    ApiIndex:
      type: object
      properties:
        packages_url:
          type: string
          format: uri
        package_url:
          type: string
        package_release_url:
          type: string
        package_owners_url:
          type: string
        keys_url:
          type: string
          format: uri
        key_url:
          type: string
        documentation_url:
          type: string
          format: uri
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'API token authentication. Pass the token directly: `Authorization: token`. For OAuth2 Bearer tokens use: `Authorization: Bearer token`.'
    BearerAuth:
      type: http
      scheme: bearer
      description: OAuth2 Bearer token obtained via Device Authorization Grant (RFC 8628).
    BasicAuth:
      type: http
      scheme: basic
      description: Deprecated. Basic authentication with username and password. Only allowed on specific endpoints for generating API tokens.
externalDocs:
  description: Hex.pm API Documentation
  url: https://hex.pm/docs/api