> ## 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 a namespace ontology as RDF

> Describes the namespace's datasets, columns and links as an RDF ontology, limited to what the caller can view: a class for each dataset, a datatype property for each column, a value class (a subclass of datalinks:Value) and a value property for each column that a link uses, and a sub-property of datalinks:matches for each link, from its source column's value class to its target column's. IRIs are made from the names of the owner, namespace, dataset and column. 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
openapi: 3.0.3
info:
  title: DataLinks
  version: 3.16.0
servers:
  - url: https://api.datalinks.com/api/v1
    description: production server
security:
  - bearerAuth: []
  - openId:
      - implicit
paths:
  /rdf/{username}/{namespace}/ontology:
    get:
      tags:
        - rdf
      summary: Export a namespace ontology as RDF
      description: >-
        Describes the namespace's datasets, columns and links as an RDF
        ontology, limited to what the caller can view: a class for each dataset,
        a datatype property for each column, a value class (a subclass of
        datalinks:Value) and a value property for each column that a link uses,
        and a sub-property of datalinks:matches for each link, from its source
        column's value class to its target column's. IRIs are made from the
        names of the owner, namespace, dataset and column. The serialisation
        comes from the format query parameter, else the Accept header, else
        Turtle.
      operationId: getRdfOntology
      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: format
          in: query
          description: RDF serialisation.
          required: false
          schema:
            type: string
            enum:
              - turtle
              - rdfxml
              - jsonld
              - ntriples
              - nquads
              - trig
      responses:
        '200':
          description: The ontology, served as a download.
          headers:
            Content-Disposition:
              description: >-
                Attachment named after the namespace 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.