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

# List Ontology Components



## OpenAPI

````yaml https://api.truestate.io/openapi.json get /ontology-memory/
openapi: 3.1.0
info:
  title: TrueState Backend API
  summary: >-
    TrueState is an AI platform for business users to create high-impact AI
    solutions.
  description: >

    This **[TrueState](https://www.truestate.io/)** backend API allows our
    clients to automate and more powerfully retrieve and modify data from the
    TrueState platform.


    Example use cases include:


    - Accessing embeddings for a dataset.

    - Automating the process of dataset creation and model retraining as your
    data changes.

    - Much more.


    Our backend is built using the [FastAPI](https://fastapi.tiangolo.com/)
    framework in python

    using [Auth0](https://auth0.com/) and [Client API
    Keys](https://www.truestate.io/dawn/docs) for internal an external
    authentication, respectively.

    Our backend is designed to be secure, scalable, easy to use and well
    documented _(each router with its own linked docs page)_.

    Clients can only access data from their own organisation, as setup in Auth0
    our the Client API Keys. See how
    **[here](https://www.truestate.io/dawn/docs)**.


    **PS**: You can view this API documentation in either
    **[Swagger](swagger/docs)** or **[Redoc](redoc/)**, but only the swagger
    lets you test calls.
  contact:
    name: True State Support
    url: https://www.truestate.io/dawn/docs
    email: support@truestate.io
  license:
    name: Private
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 0.13.95
servers: []
security: []
paths:
  /ontology-memory/:
    get:
      tags:
        - ontology-memory
      summary: List Ontology Components
      operationId: list_ontology_components_ontology_memory__get
      parameters:
        - name: q
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Q
        - name: component_type
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/OntologyComponentType'
              - type: 'null'
            title: Component Type
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/OntologyMemoryStatus'
              - type: 'null'
            title: Status
        - name: include_deprecated
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Include Deprecated
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 50
            title: Limit
        - name: Api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Api-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OntologyMemoryRead'
                title: Response List Ontology Components Ontology Memory  Get
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    OntologyComponentType:
      type: string
      enum:
        - entity
        - attribute
        - action
        - relationship
        - hierarchy
      title: OntologyComponentType
    OntologyMemoryStatus:
      type: string
      enum:
        - active
        - deprecated
      title: OntologyMemoryStatus
    OntologyMemoryRead:
      properties:
        key:
          type: string
          maxLength: 255
          minLength: 1
          title: Key
          description: >-
            Stable ontology key, for example customer, customer.plan_type,
            user.login, or account_has_subscription.
        component_type:
          $ref: '#/components/schemas/OntologyComponentType'
        name:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Name
          description: Optional human-readable display name.
        content:
          type: string
          minLength: 1
          title: Content
          description: >-
            Freeform markdown defining the entity, attribute, action,
            relationship, or hierarchy.
        subject_key:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Subject Key
          description: >-
            Optional parent/source ontology key, such as the entity for an
            attribute or action.
        object_key:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Object Key
          description: Optional target ontology key for relationships or hierarchies.
        annotations:
          additionalProperties: true
          type: object
          title: Annotations
          description: >-
            Optional metadata such as aliases, lifecycle states, cardinality,
            examples, or review hints.
        status:
          $ref: '#/components/schemas/OntologyMemoryStatus'
          default: active
        id:
          type: string
          format: uuid
          title: Id
        organisation_id:
          type: string
          title: Organisation Id
        version:
          type: integer
          title: Version
        dataset_mappings:
          items:
            $ref: '#/components/schemas/OntologyDatasetMappingRead'
          type: array
          title: Dataset Mappings
        created_by_member_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Created By Member Id
        updated_by_member_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Updated By Member Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        last_edit_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Edit Reason
      type: object
      required:
        - key
        - component_type
        - content
        - id
        - organisation_id
        - version
        - created_at
        - updated_at
      title: OntologyMemoryRead
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    OntologyDatasetMappingRead:
      properties:
        dataset_name:
          type: string
          maxLength: 255
          minLength: 1
          title: Dataset Name
          description: Dataset name that represents or contains this ontology component.
        dataset_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Dataset Id
        column_name:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Column Name
          description: >-
            Optional column that maps to this entity, attribute, action,
            relationship, or hierarchy.
        mapping_type:
          $ref: '#/components/schemas/OntologyDatasetMappingType'
          default: contains
        usage_notes:
          anyOf:
            - type: string
              maxLength: 4000
            - type: 'null'
          title: Usage Notes
          description: >-
            Optional note describing how this dataset/column maps to the
            ontology component.
        annotations:
          additionalProperties: true
          type: object
          title: Annotations
          description: >-
            Optional metadata such as grain, source system, quality checks,
            owners, or review hints.
        id:
          type: string
          format: uuid
          title: Id
        component_id:
          type: string
          format: uuid
          title: Component Id
        organisation_id:
          type: string
          title: Organisation Id
        created_by_member_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Created By Member Id
        updated_by_member_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Updated By Member Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - dataset_name
        - id
        - component_id
        - organisation_id
        - created_at
        - updated_at
      title: OntologyDatasetMappingRead
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    OntologyDatasetMappingType:
      type: string
      enum:
        - source_of_truth
        - contains
        - derived_from
        - event_log
        - lookup
        - approximation
        - validation
      title: OntologyDatasetMappingType
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````