> ## 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 prefix list

> Retrieves the complete details of a specific prefix list, including its name, description, status, associated sites, and a full list of its prefixes.



## OpenAPI

````yaml /api/en/security-groups.yaml get /vpc/prefix-lists/{prefixListId}
openapi: 3.0.3
info:
  title: Altostrat Security Groups API
  version: 1.0.0
  description: >-
    The Altostrat Security Groups API is the microservice responsible for the
    centralized management of stateful firewall rulesets and reusable IP address
    collections.


    It serves as the source of truth for all network security policies within
    the Altostrat SDX platform, translating abstract rules into concrete
    configurations that are asynchronously deployed to MikroTik routers.


    This API allows you to programmatically manage:

    - **Security Groups:** Containers for stateful firewall rules that define
    allowed inbound and outbound traffic for associated network sites.

    - **Prefix Lists:** Reusable, named collections of IP addresses and CIDR
    blocks that can be referenced within Security Group rules to simplify policy
    management.


    Developers use this API to programmatically define, manage, and automate
    network security policies at scale across their entire MikroTik
    infrastructure.
servers:
  - url: https://v1.api.altostrat.io
    description: Production API Server
security: []
tags:
  - name: Security Groups
    description: Manage firewall rule containers and their associations with network sites.
  - name: Prefix Lists
    description: Manage reusable collections of IP addresses and CIDR blocks.
  - name: Reference Data
    description: Retrieve static data like supported protocols and services.
paths:
  /vpc/prefix-lists/{prefixListId}:
    get:
      tags:
        - Prefix Lists
      summary: Retrieve a prefix list
      description: >-
        Retrieves the complete details of a specific prefix list, including its
        name, description, status, associated sites, and a full list of its
        prefixes.
      operationId: getPrefixList
      parameters:
        - name: prefixListId
          in: path
          required: true
          description: >-
            The unique identifier for the prefix list, prefixed with
            `prfx_lst_`.
          schema:
            type: string
            pattern: ^prfx_lst_[0-9a-zA-Z]{27}$
            example: prfx_lst_0ujsswThIGTUYm2K8FjOOfxcYpw
      responses:
        '200':
          description: The requested prefix list object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrefixList'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - bearerAuth: []
components:
  schemas:
    PrefixList:
      type: object
      description: Represents a reusable, named collection of IP addresses and CIDR blocks.
      properties:
        id:
          type: string
          description: >-
            The unique identifier for the prefix list, prefixed with
            `prfx_lst_`.
          readOnly: true
          example: prfx_lst_0ujsswThIGTUYm2K8FjOOfxcYpw
        name:
          type: string
          description: A human-readable name for the prefix list.
          example: Main Office IPs
        description:
          type: string
          description: An optional description for the prefix list.
          example: Public IP ranges for the main office.
        status:
          type: string
          description: The current synchronization status of the prefix list.
          readOnly: true
          enum:
            - active
            - syncing
            - failed
          example: active
        sites:
          type: array
          description: A list of site IDs where this prefix list is directly applied.
          items:
            type: string
            example: site_12345
        prefixes:
          type: array
          description: The list of CIDR blocks in this prefix list.
          items:
            $ref: '#/components/schemas/Prefix'
    Prefix:
      type: object
      description: Represents a single IP address or CIDR block within a prefix list.
      properties:
        id:
          type: string
          description: The unique identifier for the prefix entry, prefixed with `prfx_`.
          readOnly: true
          example: prfx_0ujsswThIGTUYm2K8FjOOfxcYpw
        cidr:
          type: string
          description: The IP address range in CIDR notation.
          example: 192.0.2.0/24
        description:
          type: string
          description: An optional description for this specific prefix.
          example: Main server subnet
    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 does not exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Internal Server Error - An unexpected error occurred on the server.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Authentication is performed via an Auth0-issued JSON Web Token (JWT).
        Provide the token in the `Authorization` header with the `Bearer`
        scheme.

````