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

# Get all mapping versions

> Retrieves a list of all available mapping versions.



## OpenAPI

````yaml /api-reference/endpoint/gateway/openapi.json get /gateway/mapping-version/all
openapi: 3.0.3
info:
  title: quiva.ai Gateway
  description: >-
    quiva.ai Gateway API for managing gateway infrastructure and routing API
    requests.
  version: 1.0.0
  contact:
    name: quiva.ai Support
    email: support@quiva.ai
servers:
  - url: https://api.quiva.ai
    description: Production API server
security:
  - bearer_auth: []
  - api_key_auth: []
tags:
  - name: Gateways
    description: Gateway management endpoints
  - name: Mappings
    description: Gateway Mapping management endpoints
  - name: Mapping Versions
    description: Gateway Mapping Version management endpoints
paths:
  /gateway/mapping-version/all:
    get:
      tags:
        - Mapping Versions
      summary: Get all mapping versions
      description: Retrieves a list of all available mapping versions.
      operationId: getAllGatewayMappingVersions
      responses:
        '200':
          description: List of mapping versions retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MappingVersionListResponseWrapper'
              example:
                body:
                  results:
                    - subject: ms.gateway.abc123.mapping-version.get.api.users.1
                      resource_type: function
                      resource: user-service.getUsers
                      resource_version: latest
                      active: true
                      description: Version 1
                      version: 1
                      modified: 1713531894
                      type: created
                    - subject: ms.gateway.def456.mapping-version.post.api.products.1
                      resource_type: function
                      resource: product-service.createProduct
                      resource_version: latest
                      active: true
                      description: Version 1
                      version: 1
                      modified: 1713532000
                      type: created
                  results_total: 2
                metadata:
                  subject: gateway.*.mapping-version.>
        '400':
          $ref: '#/components/responses/BadRequest'
components:
  schemas:
    MappingVersionListResponseWrapper:
      type: object
      properties:
        body:
          $ref: '#/components/schemas/MappingVersionListResult'
        metadata:
          $ref: '#/components/schemas/Metadata'
    MappingVersionListResult:
      type: object
      properties:
        results:
          type: array
          description: List of mapping versions
          items:
            $ref: '#/components/schemas/MappingVersionResponse'
        results_total:
          type: integer
          description: Total number of mapping versions returned
          example: 2
    Metadata:
      type: object
      properties:
        subject:
          type: string
          description: Subject identifier for the resource
          example: ms.gateway.abcdef123456.gateway
    MappingVersionResponse:
      type: object
      properties:
        subject:
          type: string
          description: Subject identifier of the mapping version
          example: ms.gateway.abcdef123456.mapping-version.get.api.users.1
        resource_type:
          type: string
          description: Type of resource that handles requests
          example: function
        resource:
          type: string
          description: Resource identifier that handles requests
          example: user-service.getUsers
        resource_version:
          type: string
          description: Version of the resource
          example: latest
        active:
          type: boolean
          description: Whether the mapping version is active
          example: true
        description:
          type: string
          description: Description of the mapping version
          example: Gets all users with pagination
        middleware:
          type: array
          description: List of middleware applied to the mapping version
          items:
            $ref: '#/components/schemas/Middleware'
        exact_match:
          type: boolean
          description: Whether the path is matched exactly
          example: false
        attributes:
          type: array
          description: Attributes for the mapping version
          items:
            type: string
          example: []
        boolean_logic:
          type: string
          description: Boolean logic expression for request routing
          example: ''
        invocation_type:
          type: string
          description: Type of invocation for the resource
          example: RequestResponse
        version:
          type: integer
          description: Version number
          example: 1
        modified:
          type: integer
          description: Unix timestamp of when the mapping version was last modified
          example: 1713531894
        type:
          type: string
          description: Type of the mapping version record
          example: created
    Middleware:
      type: object
      properties:
        order:
          type: integer
          description: Execution order of the middleware
          example: 1
        resource:
          type: string
          description: Resource identifier for the middleware function
          example: auth-middleware
        resource_type:
          type: string
          description: Type of resource the middleware points to
          example: function
          enum:
            - function
            - service
        resource_version:
          type: string
          description: Version of the middleware resource to use
          example: latest
        type:
          type: string
          description: When the middleware should execute
          example: pre-request
          enum:
            - pre-request
            - post-request
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Invalid request parameters
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    api_key_auth:
      type: apiKey
      in: header
      name: X-Api-Key

````