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

# Export one stored version of a namespace ontology as RDF

> The ontology as it was stored by an earlier export, limited to the datasets the caller can view now; a deleted dataset of the namespace shows only its IRIs, and only to the namespace's owner, not through a token limited to some datasets. A version keeps the IRIs it was stored with, so after a rename they still carry the old names. The serialisation comes from the format query parameter, else the Accept header, else Turtle.



## OpenAPI

````yaml /api-reference/openapi.yml get /rdf/{username}/{namespace}/ontology/versions/{number}
openapi: 3.0.3
info:
  title: DataLinks
  version: 3.20.0
servers:
  - url: https://api.datalinks.com/api/v1
    description: production server
security:
  - bearerAuth: []
  - openId:
      - implicit
paths:
  /rdf/{username}/{namespace}/ontology/versions/{number}:
    get:
      tags:
        - rdf
      summary: Export one stored version of a namespace ontology as RDF
      description: >-
        The ontology as it was stored by an earlier export, limited to the
        datasets the caller can view now; a deleted dataset of the namespace
        shows only its IRIs, and only to the namespace's owner, not through a
        token limited to some datasets. A version keeps the IRIs it was stored
        with, so after a rename they still carry the old names. The
        serialisation comes from the format query parameter, else the Accept
        header, else Turtle.
      operationId: getRdfOntologyVersion
      parameters:
        - name: username
          in: path
          description: The username associated with the request.
          required: true
          schema:
            type: string
        - name: namespace
          in: path
          description: Namespace for the dataset.
          required: true
          schema:
            type: string
          example: cinematography
        - name: number
          in: path
          required: true
          schema:
            minimum: 1
            type: integer
        - name: format
          in: query
          description: >-
            RDF serialisation. In RDF/XML, the server writes U+FFFD for each
            character that XML 1.0 cannot hold. The other formats keep these
            characters, but not a surrogate without its pair.
          required: false
          schema:
            type: string
            enum:
              - turtle
              - rdfxml
              - jsonld
              - ntriples
              - nquads
              - trig
      responses:
        '200':
          description: The version, served as a download.
          headers:
            Content-Disposition:
              description: >-
                Attachment named after the namespace, the version's number and
                the format's file extension.
              schema:
                type: string
          content:
            text/turtle:
              schema:
                type: string
                format: binary
            application/rdf+xml:
              schema:
                type: string
                format: binary
            application/ld+json:
              schema:
                type: string
                format: binary
            application/n-triples:
              schema:
                type: string
                format: binary
            application/n-quads:
              schema:
                type: string
                format: binary
            application/trig:
              schema:
                type: string
                format: binary
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '406':
          $ref: '#/components/responses/NotAcceptable'
components:
  responses:
    BadRequest:
      description: Bad request. The request was malformed or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: >-
        Unauthorized. This error occurs if the authentication token is missing
        or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotAcceptable:
      description: >-
        The Accept header allows none of the formats this operation serves, and
        no format parameter names one.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    ErrorResponse:
      required:
        - error_code
        - message
      type: object
      properties:
        error_code:
          type: string
          example: UNAUTHORIZED
        error_message:
          type: string
          example: ''
        message:
          type: string
          example: Missing authentication token
        sub_errors:
          type: array
          items:
            required:
              - code
              - message
            type: object
            properties:
              code:
                type: string
              message:
                type: string
  securitySchemes:
    bearerAuth:
      type: http
      description: >
        Use a Bearer token for authentication. Submit the token using the
        `Authorization`

        header: `Authorization: Bearer <token>`.
      scheme: bearer
    openId:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: >-
            https://login.datalinks.com/realms/datalinks-realm/protocol/openid-connect/auth
          scopes:
            openid: openid

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.