ReadMe Metrics Api Specification API

The Api Specification API from ReadMe Metrics — 1 operation(s) for api specification.

OpenAPI Specification

readme-metrics-api-specification-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: ReadMe Api Registry Api Specification API
  description: 'REST API for ReadMe''s developer hub platform — manage API specifications,

    documentation pages, changelogs, custom pages, categories, and API registry

    entries. Authenticated with HTTP Basic auth using a ReadMe API key as the

    username (empty password).

    '
  version: 1.0.0
  contact:
    name: ReadMe
    url: https://docs.readme.com/main/reference/intro-to-the-readme-api
servers:
- url: https://dash.readme.com/api/v1
  description: ReadMe production API
security:
- basicAuth: []
tags:
- name: Api Specification
paths:
  /api-specification:
    get:
      summary: List API specifications
      operationId: getAPISpecifications
      parameters:
      - $ref: '#/components/parameters/perPage'
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/readmeVersion'
      responses:
        '200':
          description: List of API specifications.
          headers:
            Link:
              schema:
                type: string
            x-total-count:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/APISpecification'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
      tags:
      - Api Specification
    post:
      summary: Upload an API specification
      operationId: uploadAPISpecification
      parameters:
      - $ref: '#/components/parameters/readmeVersion'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                spec:
                  type: string
                  format: binary
                  description: OpenAPI / Swagger file (JSON or YAML).
                url:
                  type: string
                  description: Public URL pointing to an OpenAPI / Swagger definition.
      responses:
        '201':
          description: API specification uploaded.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '408':
          $ref: '#/components/responses/Error'
      tags:
      - Api Specification
components:
  parameters:
    perPage:
      name: perPage
      in: query
      schema:
        type: integer
        default: 10
        minimum: 1
        maximum: 100
      description: Items per page (max 100).
    readmeVersion:
      name: x-readme-version
      in: header
      required: false
      schema:
        type: string
      description: Version identifier for the docs project (e.g. v3.0).
    page:
      name: page
      in: query
      schema:
        type: integer
        default: 1
        minimum: 1
      description: Page number (1-based).
  responses:
    Forbidden:
      description: API key mismatch or insufficient permissions.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error:
      description: Error response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: Validation error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    APISpecification:
      type: object
      properties:
        _id:
          type: string
        title:
          type: string
        lastSynced:
          type: string
          format: date-time
        source:
          type: string
        type:
          type: string
        version:
          type: string
        category:
          type: object
          properties:
            title:
              type: string
            slug:
              type: string
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        suggestion:
          type: string
        docs:
          type: string
        help:
          type: string
        poem:
          type: array
          items:
            type: string
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: ReadMe API key supplied as the HTTP Basic username (password empty).