> ## 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 Community Script

> Fetches detailed information about a specific community script, including its content, description, and metadata about the author and source repository.



## OpenAPI

````yaml /api/en/scripts.yaml get /scripts/community-scripts/{communityScriptId}
openapi: 3.0.3
info:
  title: Altostrat Scripts API
  version: 1.0.0
  description: >-
    The Altostrat Scripts API is the microservice responsible for creating,
    managing, and executing MikroTik RouterOS scripts across your network
    infrastructure.


    It serves as the core automation engine within the Altostrat SDX platform,
    empowering developers to programmatically deploy configuration changes,
    perform operational tasks, and leverage AI for script generation. This API
    is the foundation for network automation and agentic AI capabilities.


    This API allows you to programmatically manage:

    - **Scheduled Scripts:** The primary resource for defining a script, its
    target devices, and a future execution time, complete with authorization
    workflows and progress tracking.

    - **Script Templates:** Reusable, version-controlled script blueprints that
    can be either private to an organization or shared globally to enforce
    standardization and best practices.

    - **Community Scripts:** A curated and searchable library of publicly
    available RouterOS scripts sourced from GitHub, providing ready-to-use
    solutions for common networking tasks.

    - **AI Script Generation:** An agentic AI endpoint that translates natural
    language prompts into functional and safe MikroTik RouterOS scripts.


    Developers use this API to build powerful, scalable, and intelligent network
    automation workflows for their fleet of MikroTik devices.
servers:
  - url: https://v1.api.altostrat.io
security:
  - BearerAuth:
      - script:view
      - script:create
      - script:update
      - script:delete
      - script:run
      - script:authorize
tags:
  - name: Scheduled Scripts
    description: >-
      Manage the lifecycle of scripts scheduled for execution on network
      devices.
  - name: Script Templates
    description: Create and manage reusable script templates for standardization.
  - name: Community Scripts
    description: Discover and utilize scripts from the public community repository.
  - name: AI Script Generation
    description: Generate MikroTik scripts from natural language prompts.
paths:
  /scripts/community-scripts/{communityScriptId}:
    get:
      tags:
        - Community Scripts
      summary: Retrieve a Community Script
      description: >-
        Fetches detailed information about a specific community script,
        including its content, description, and metadata about the author and
        source repository.
      operationId: getCommunityScript
      parameters:
        - name: communityScriptId
          in: path
          required: true
          description: The unique identifier for the community script.
          schema:
            type: string
            format: ulid
            example: 01H8XGJWBWBAQ1Z3G1B6X2Q8P5
      responses:
        '200':
          description: Detailed information about the community script.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunityScript'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    CommunityScript:
      type: object
      properties:
        id:
          type: string
          format: ulid
          description: The unique identifier for the community script.
          example: 01H8XGJWBWBAQ1Z3G1B6X2Q8P5
        name:
          type: string
          description: The filename of the script.
          example: add-dns-static.rsc
        description:
          type: string
          nullable: true
          description: An AI-generated summary of the script.
          example: >-
            This script adds a static DNS entry for a given name to a specified
            IP address.
        size:
          type: integer
          description: The size of the script file in bytes.
          example: 128
        readme_url:
          type: string
          format: uri
          nullable: true
          description: A URL to the raw markdown README file.
          example: >-
            https://raw.githubusercontent.com/mikrotik-scripts/main/scripts/add-dns-static/README.md
        github_url:
          type: string
          format: uri
          description: A URL to the script file on GitHub's web interface.
          example: >-
            https://github.com/mikrotik-scripts/main/blob/main/scripts/add-dns-static.rsc
        raw_url:
          type: string
          format: uri
          description: The direct raw URL for downloading the script content.
          example: >-
            https://raw.githubusercontent.com/mikrotik-scripts/main/scripts/add-dns-static.rsc
        content:
          type: string
          description: The script content, included when retrieving a single script.
          example: >-
            :local name "example.com"; :local address 192.168.88.254; /ip dns
            static add name=$name address=$address;
        sha:
          type: string
          description: The git SHA hash of the file content.
          example: e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
        repository:
          type: object
          properties:
            name:
              type: string
              example: mikrotik-scripts
            url:
              type: string
              format: uri
              example: https://github.com/user/mikrotik-scripts
            stars:
              type: integer
              example: 42
            created_at:
              type: string
              format: date-time
              example: '2024-01-15T12:00:00Z'
        user:
          type: object
          properties:
            name:
              type: string
              example: John Doe
            url:
              type: string
              format: uri
              example: https://github.com/johndoe
            avatar:
              type: string
              format: uri
              example: https://avatars.githubusercontent.com/u/12345?v=4
            followers:
              type: integer
              example: 100
            created_at:
              type: string
              format: date-time
              example: '2020-05-20T10:00:00Z'
    ErrorResponse:
      type: object
      properties:
        type:
          type: string
          description: A broad category for the error (e.g., 'invalid_request_error').
          example: invalid_request_error
        code:
          type: string
          description: A short, unique string identifying the specific error.
          example: parameter_missing
        message:
          type: string
          description: A human-readable description of what went wrong.
          example: The 'name' parameter is required for this request.
        doc_url:
          type: string
          description: >-
            A direct link to the documentation page for this specific error
            code.
          example: https://docs.altostrat.io/errors/parameter_missing
  responses:
    Unauthorized:
      description: >-
        Unauthorized - The request requires authentication and a valid Bearer
        token was not provided.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Not Found - The requested resource could not be found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Altostrat SDX API uses JWT Bearer tokens for authentication. Obtain a
        token via the Authentication API and include it in the Authorization
        header as 'Bearer {token}'.

````