> ## Documentation Index
> Fetch the complete documentation index at: https://altostrat.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve a Runbook

> Retrieves the details of a specific runbook, including its name and the bootstrap command used to onboard new devices with this configuration.



## OpenAPI

````yaml /api/en/mikrotik-api.yaml get /runbooks/{runbookId}
openapi: 3.0.3
info:
  title: Altostrat MikroTik Devices API
  version: 1.0.0
  description: >-
    The Altostrat MikroTik Devices API is the microservice responsible for
    managing the lifecycle, configuration, and real-time state of MikroTik
    devices within the SDX platform.


    It acts as the command and control plane for individual network endpoints,
    receiving heartbeats, dispatching jobs, and providing observability into
    device health. This service is the bridge between the Altostrat SDX
    automation layer and the physical network hardware.


    This API allows you to programmatically manage:

    - **Sites:** The digital twin of a physical MikroTik router, representing
    its identity, configuration, and current online status.

    - **Jobs:** Asynchronous commands or scripts sent to a Site for execution,
    enabling remote configuration changes, troubleshooting, and automation.

    - **Device Stats:** Time-series performance data, including CPU load, memory
    usage, and uptime, collected from each Site.


    Developers use this API to programmatically list, monitor, and interact with
    their fleet of MikroTik devices, forming the basis for building custom
    network automation and management tools.
servers:
  - url: https://v1.api.altostrat.io
    description: Production API Server
security:
  - BearerAuth: []
tags:
  - name: Sites
    description: Manage and monitor MikroTik devices, referred to as "Sites".
  - name: Jobs
    description: Create and manage asynchronous commands to be executed on Sites.
  - name: Device Stats
    description: Retrieve time-series performance metrics from Sites.
  - name: Runbooks
    description: Access device onboarding configurations.
  - name: Developer API
    description: >-
      Run synchronous RouterOS commands or queue asynchronous RouterOS scripts
      through SDX.
  - name: Developer Routers
    description: Read router-level summaries exposed by the SDX developer API.
paths:
  /runbooks/{runbookId}:
    get:
      tags:
        - Runbooks
      summary: Retrieve a Runbook
      description: >-
        Retrieves the details of a specific runbook, including its name and the
        bootstrap command used to onboard new devices with this configuration.
      parameters:
        - name: runbookId
          in: path
          required: true
          description: The UUID of the runbook to retrieve.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The requested runbook object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Runbook'
        '404':
          description: Not Found - The requested runbook does not exist.
components:
  schemas:
    Runbook:
      type: object
      description: A configuration profile used for onboarding new devices.
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier (UUID) for the runbook.
          example: 6d6d0e3d-1817-4817-8917-1e1717171717
        bootstrap_command:
          type: string
          description: >-
            The full RouterOS command to be run on a new device to adopt it into
            the Altostrat SDX platform using this runbook.
          example: '/tool fetch url="https://api.ostrat.io/2kLqWnX..." keep-result=no; '
        name:
          type: string
          description: The user-defined name of the runbook.
          example: Standard Branch Office Policy
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Authenticate requests by providing a JSON Web Token (JWT) in the
        `Authorization` header. Example: `Authorization: Bearer <YOUR_JWT>`

````