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

# List relationship definitions in the mdm

> List relationship definitions in the mdm.




## OpenAPI

````yaml /api-reference/mdm.yml get /mdm/v1/relationship-definitions
openapi: 3.0.1
info:
  title: MDM API
  version: 1.0.0
servers:
  - url: https://api.{workspaceId}.clinia.cloud
    variables:
      workspaceId:
        default: ''
        description: The workspace id.
security:
  - apiKey: []
  - basicHttpAuth: []
  - bearerHttpAuth: []
tags:
  - name: Collections
    description: Management of collections.
  - name: Relationship Definitions
    description: Management of relationship definitions.
paths:
  /mdm/v1/relationship-definitions:
    get:
      tags:
        - Relationship Definitions
      summary: List relationship definitions in the mdm
      description: |
        List relationship definitions in the mdm.
      operationId: ListRelationshipDefinitions
      parameters:
        - name: page
          in: query
          schema:
            type: integer
        - name: perPage
          in: query
          schema:
            type: integer
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                type: object
                required:
                  - meta
                  - data
                properties:
                  meta:
                    $ref: '#/components/schemas/v1ListResponseMeta'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/v1RelationshipDefinition'
        '400':
          description: Returned when the request is malformed or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1Error'
        '429':
          $ref: '#/components/responses/v1TooManyRequestError'
        '504':
          $ref: '#/components/responses/v1GatewayTimeoutError'
components:
  schemas:
    v1ListResponseMeta:
      type: object
      required:
        - numPages
        - page
        - perPage
        - total
      properties:
        numPages:
          type: integer
          format: int32
        page:
          type: integer
          format: int32
        perPage:
          type: integer
          format: int32
        total:
          type: integer
          format: int32
    v1RelationshipDefinition:
      type: object
      required:
        - from
        - to
        - relationshipMapping
      properties:
        key:
          type: string
          readOnly: true
        from:
          type: string
        to:
          type: string
        relationshipMapping:
          $ref: '#/components/schemas/v1RelationshipDefinitionMappings'
    v1Error:
      type: object
      required:
        - code
        - message
        - type
      properties:
        code:
          $ref: '#/components/schemas/v1ErrorCode'
        message:
          type: string
        type:
          $ref: '#/components/schemas/v1ErrorType'
        details:
          description: list of errors that occurred if applicable.
          type: array
          items:
            $ref: '#/components/schemas/v1Error'
        additionalContext:
          type: object
          additionalProperties: true
    v1RelationshipDefinitionMappings:
      type: object
      additionalProperties:
        type: array
        items:
          type: string
    v1ErrorCode:
      type: integer
      format: int32
      enum:
        - 400
        - 401
        - 403
        - 404
        - 408
        - 409
        - 413
        - 429
        - 500
        - 501
        - 504
    v1ErrorType:
      type: string
      enum:
        - ALREADY_EXISTS
        - FAILED_PRECONDITION
        - INTERNAL
        - INVALID_ARGUMENT
        - NOT_FOUND
        - OUT_OF_RANGE
        - UNIMPLEMENTED
        - PERMISSION_DENIED
        - UNAUTHENTICATED
        - CONTENT_TOO_LARGE
        - REQUEST_TIMEOUT
        - TOO_MANY_REQUEST
        - GATEWAY_TIMEOUT
  responses:
    v1TooManyRequestError:
      description: Returned when the server starts throttling the requests.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/v1Error'
    v1GatewayTimeoutError:
      description: Returned when the request exceeds the server timeout window.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/v1Error'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-Clinia-API-Key
    basicHttpAuth:
      description: Basic HTTP authentication.
      type: http
      scheme: basic
    bearerHttpAuth:
      description: JWT Bearer authentication.
      type: http
      scheme: Bearer
      bearerFormat: JWT

````