ReadMe Metrics Docs API

The Docs API from ReadMe Metrics — 1 operation(s) for docs.

OpenAPI Specification

readme-metrics-docs-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: ReadMe Api Registry Docs 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: Docs
paths:
  /docs/{slug}:
    get:
      summary: Get a documentation page
      operationId: getDoc
      parameters:
      - name: slug
        in: path
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/readmeVersion'
      responses:
        '200':
          description: Documentation page.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Doc'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
      tags:
      - Docs
components:
  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'
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Doc:
      type: object
      properties:
        _id:
          type: string
        title:
          type: string
        slug:
          type: string
        body:
          type: string
        category:
          type: string
        version:
          type: string
        hidden:
          type: boolean
        type:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    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
  parameters:
    readmeVersion:
      name: x-readme-version
      in: header
      required: false
      schema:
        type: string
      description: Version identifier for the docs project (e.g. v3.0).
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: ReadMe API key supplied as the HTTP Basic username (password empty).