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

# List datagraph schemas



## OpenAPI

````yaml /api-reference/openapi/datasources-api.json get /datagraph/schemas
openapi: 3.0.0
info:
  title: datasources-api
  version: 0.0.0
  description: |-
    # Errors
    | Error code | Message | HTTP status code | Payload |
    | :--- | :--- | :--- | :--- |
    | number | string | 409 |  |
servers:
  - url: https://api.reelevant.com/v2/datasources/
    description: production
security: []
paths:
  /datagraph/schemas:
    get:
      tags:
        - Datagraph
      summary: List datagraph schemas
      operationId: list-datagraph-schemas
      parameters:
        - name: page
          in: query
          schema:
            type: number
            default: 1
          required: false
        - name: perPage
          in: query
          schema:
            type: number
            default: 10
          required: false
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      paginationCount:
                        type: number
                      paginationPage:
                        type: number
                      paginationLimit:
                        type: number
                    required:
                      - paginationCount
                      - paginationPage
                      - paginationLimit
                    additionalProperties: false
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - success
                    required:
                      - status
                    additionalProperties: false
                  - $ref: >-
                      #/components/schemas/InternalResponse_Array_SerializedDatagraphSchema
      security:
        - password_auth: []
components:
  schemas:
    InternalResponse_Array_SerializedDatagraphSchema:
      type: object
      properties:
        program:
          type: string
        version:
          type: string
        datetime:
          type: string
        status:
          type: string
        code:
          type: number
        message:
          type: string
        data:
          type: array
          items:
            type: object
            properties:
              companyId:
                $ref: '#/components/schemas/ObjectId'
              resourceGroupIds:
                type: array
                items:
                  $ref: '#/components/schemas/ObjectId'
              versions:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/ObjectId'
                    - allOf:
                        - $ref: '#/components/schemas/Document'
                        - $ref: '#/components/schemas/DatagraphSchemaVersion'
                        - type: object
                          properties:
                            _id:
                              $ref: '#/components/schemas/ObjectId'
                          required:
                            - _id
                          additionalProperties: false
                        - type: object
                          properties:
                            __v:
                              type: number
                          required:
                            - __v
                          additionalProperties: false
                        - $ref: '#/components/schemas/IObjectWithTypegooseFunction'
              archivedAt:
                type: string
                format: date-time
                nullable: true
                readOnly: true
            required:
              - companyId
              - resourceGroupIds
              - versions
              - archivedAt
            additionalProperties: false
      required:
        - program
        - version
        - datetime
        - status
        - message
        - data
      additionalProperties: false
    ObjectId:
      type: string
    Document:
      type: object
      properties: {}
      additionalProperties: false
    DatagraphSchemaVersion:
      $ref: '#/components/schemas/Serialize_DatagraphSchemaVersion'
    IObjectWithTypegooseFunction:
      type: object
      properties: {}
      additionalProperties: false
    Serialize_DatagraphSchemaVersion:
      type: object
      properties:
        companyId:
          $ref: '#/components/schemas/ObjectId'
        state:
          allOf:
            - $ref: '#/components/schemas/DatagraphSchemaVersionState'
          readOnly: true
          description: |-
            The state of the version.
            If state=draft, it means this is the draft version, where
            updates occurs.
            If state=live, it means this is the live version used to render
            the content, it won't be updated again
        definition:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              datasourceId:
                type: string
              description:
                type: string
              indexes:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - Index
                    columns:
                      type: array
                      items:
                        type: string
                    description:
                      type: string
                  required:
                    - type
                    - columns
                  additionalProperties: false
              columns:
                type: array
                items:
                  type: object
                  properties:
                    name:
                      type: string
                    type:
                      oneOf:
                        - type: string
                          enum:
                            - string
                        - type: string
                          enum:
                            - boolean
                        - type: string
                          enum:
                            - date
                        - type: string
                          enum:
                            - text
                        - type: string
                          enum:
                            - integer
                        - type: string
                          enum:
                            - datetime
                        - type: string
                          enum:
                            - decimal
                    description:
                      type: string
                    default:
                      oneOf:
                        - type: string
                        - type: number
                        - type: boolean
                          enum:
                            - 'false'
                        - type: boolean
                          enum:
                            - 'true'
                        - type: string
                          format: date-time
                      nullable: true
                    nullable:
                      type: boolean
                  required:
                    - name
                    - type
                    - nullable
                  additionalProperties: false
              virtualColumns:
                type: array
                items:
                  type: object
                  properties:
                    name:
                      type: string
                    type:
                      oneOf:
                        - type: string
                          enum:
                            - string
                        - type: string
                          enum:
                            - boolean
                        - type: string
                          enum:
                            - date
                        - type: string
                          enum:
                            - text
                        - type: string
                          enum:
                            - integer
                        - type: string
                          enum:
                            - datetime
                        - type: string
                          enum:
                            - decimal
                    query:
                      type: string
                    nullable:
                      type: boolean
                    description:
                      type: string
                  required:
                    - name
                    - type
                    - query
                    - nullable
                  additionalProperties: false
              uniqueKeys:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - UniqueKey
                    columns:
                      type: array
                      items:
                        type: string
                    description:
                      type: string
                  required:
                    - type
                    - columns
                  additionalProperties: false
              relations:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - Relation
                    columns:
                      type: array
                      items:
                        type: string
                    reference:
                      type: object
                      properties:
                        datasourceId:
                          type: string
                        columns:
                          type: array
                          items:
                            type: string
                        table:
                          type: string
                      required:
                        - datasourceId
                        - columns
                        - table
                      additionalProperties: false
                    description:
                      type: string
                  required:
                    - type
                    - columns
                    - reference
                  additionalProperties: false
            required:
              - name
              - datasourceId
              - columns
            additionalProperties: false
      required:
        - companyId
        - state
        - definition
      additionalProperties: false
    DatagraphSchemaVersionState:
      type: string
      enum:
        - draft
        - inactive
        - live
  securitySchemes:
    password_auth:
      type: oauth2
      flows:
        password:
          tokenUrl: https://api.reelevant.com/v1/auth/token
          refreshUrl: https://api.reelevant.com/v1/auth/token
          scopes: {}

````