---
title: "Get API Version Spec"
url: "https://nov18-dev.movespot.fyi/apis/portal-api-catalog-3/versions/d7aa963d-b594-41d6-a905-3097c44bd297/operations/fetch-api-version-spec"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/portal-api-catalog-3/versions/d7aa963d-b594-41d6-a905-3097c44bd297.md

# Get API Version Spec

`GET` `/api/v3/apis/{apiIdOrSlug}/versions/{versionId}`

Operation ID: `fetch-api-version-spec`

Returns an API version specification document (OpenAPI or AsyncAPI) for an API.

## Path parameters

- `apiIdOrSlug` (required) - The API identifier, either ApiId or Api Slug
- `versionId` (string, uuid, required) - Contains a unique identifier for this resource.

## Responses

- `200` - API version specification document.
- `401` - Unauthorized
- `404` - Not Found

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Portal API Catalog
  version: 3.0.11
paths:
  /api/v3/apis/{apiIdOrSlug}/versions/{versionId}:
    get:
      operationId: fetch-api-version-spec
      summary: Get API Version Spec
      description: Returns an API version specification document (OpenAPI or AsyncAPI)
        for an API.
      parameters:
        - $ref: "#/components/parameters/ApiIdOrSlug"
        - $ref: "#/components/parameters/VersionId"
      responses:
        "200":
          $ref: "#/components/responses/ApiVersionGet"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
      security:
        - portalAccessToken: []
        - {}
      tags:
        - API Docs
security:
  - portalAccessToken: []
  - {}
components:
  parameters:
    ApiIdOrSlug:
      name: apiIdOrSlug
      schema:
        oneOf:
          - $ref: "#/components/schemas/ApiId"
          - $ref: "#/components/schemas/ApiSlug"
      in: path
      required: true
      description: The API identifier, either ApiId or Api Slug
    VersionId:
      name: versionId
      in: path
      required: true
      description: Contains a unique identifier for this resource.
      schema:
        type: string
        format: uuid
  responses:
    ApiVersionGet:
      description: API version specification document.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ApiVersion"
    Unauthorized:
      description: Unauthorized
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/UnauthorizedError"
          examples:
            UnauthorizedExample:
              $ref: "#/components/examples/UnauthorizedExample"
    NotFound:
      description: Not Found
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/NotFoundError"
          examples:
            NotFoundExample:
              $ref: "#/components/examples/NotFoundExample"
  schemas:
    ApiId:
      description: The API identifier.
      type: string
      format: uuid
      example: 9f5061ce-78f6-4452-9108-ad7c02821fd5
      readOnly: true
    ApiSlug:
      description: >
        The Api `slug` is used in generated URLs to provide human readable
        paths.


        Defaults to `slugify(name + version)`
      type: string
      example: my-api-v1
      pattern: ^[\w-]+$
    ApiVersion:
      description: Singular version of an API
      type: object
      properties:
        id:
          $ref: "#/components/schemas/UUID"
        version:
          description: The version string of the API version .
          type: string
          example: v1.0.0
        spec:
          type: object
          additionalProperties: false
          properties:
            type:
              $ref: "#/components/schemas/ApiSpecType"
            content:
              description: The JSON string or YAML content of the API specification.
              type: string
          required:
            - type
      additionalProperties: false
      required:
        - id
        - version
        - spec
      title: ApiVersion
    UnauthorizedError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 401
            title:
              example: Unauthorized
            type:
              example: https://httpstatuses.com/401
            instance:
              example: kong:trace:1234567890
            detail:
              example: Invalid credentials
    NotFoundError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 404
            title:
              example: Not Found
            type:
              example: https://httpstatuses.com/404
            instance:
              example: kong:trace:1234567890
            detail:
              example: Not found
    UUID:
      description: Contains a unique identifier used for this resource.
      type: string
      format: uuid
      example: 5f9fd312-a987-4628-b4c5-bb4f4fddd5f7
      readOnly: true
    ApiSpecType:
      description: >
        The type of specification being stored. This allows us to render the
        specification correctly.
      type: string
      example: oas3
      enum:
        - oas2
        - oas3
        - asyncapi
      title: API Spec Type
    BaseError:
      description: standard error
      type: object
      properties:
        status:
          description: >
            The HTTP status code of the error. Useful when passing the response

            body to child properties in a frontend UI. Must be returned as an
            integer.
          type: integer
          readOnly: true
        title:
          description: |
            A short, human-readable summary of the problem. It should not
            change between occurences of a problem, except for localization.
            Should be provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
        type:
          description: The error type.
          type: string
          readOnly: true
        instance:
          description: |
            Used to return the correlation ID back to the user, in the format
            kong:trace:<correlation_id>. This helps us find the relevant logs
            when a customer reports an issue.
          type: string
          readOnly: true
        detail:
          description: >
            A human readable explanation specific to this occurence of the
            problem.

            This field may contain request/entity data to help the user
            understand

            what went wrong. Enclose variable values in square brackets. Should
            be

            provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
      required:
        - status
        - title
        - instance
        - detail
      title: Error
  examples:
    UnauthorizedExample:
      value:
        status: 401
        title: Unauthorized
        instance: kong:trace:8347343766220159418
        detail: Unauthorized
    NotFoundExample:
      value:
        status: 404
        title: Not Found
        instance: kong:trace:6816496025408232265
        detail: Not Found
  securitySchemes:
    portalAccessToken:
      type: apiKey
      in: cookie
      name: portalaccesstoken
      description: >
        The Developer portal cookie is meant to be used by the Developer API to
        authenticate with.
```
