> ## 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's SHACL shapes

> Gives the SHACL shapes that the namespace's data export (getRdfData) conforms to, limited to what the caller can view and made on each request, with no versions. A link into another namespace requires only an IRI at its end, so one namespace's export validates on its own. Validate a Turtle or N-Triples export: an N-Quads or TriG export validates only as the union of its graphs, and a tool that reads such a file into its default graph gets no triples and reports that the data conforms. In N-Quads and TriG the shapes are in the default graph. The serialisation comes from the format query parameter, else the Accept header, else Turtle.



## OpenAPI

````yaml /api-reference/openapi.yml get /rdf/{username}/{namespace}/shapes
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}/shapes:
    get:
      tags:
        - rdf
      summary: Export a namespace's SHACL shapes
      description: >-
        Gives the SHACL shapes that the namespace's data export (getRdfData)
        conforms to, limited to what the caller can view and made on each
        request, with no versions. A link into another namespace requires only
        an IRI at its end, so one namespace's export validates on its own.
        Validate a Turtle or N-Triples export: an N-Quads or TriG export
        validates only as the union of its graphs, and a tool that reads such a
        file into its default graph gets no triples and reports that the data
        conforms. In N-Quads and TriG the shapes are in the default graph. The
        serialisation comes from the format query parameter, else the Accept
        header, else Turtle.
      operationId: getRdfShapes
      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. 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 shapes, 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.