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

# List dataset records

> Returns one page of the catalog for the given type, newest first. Inactive (soft-deleted or deactivated) records are left out unless `show_inactive=1`.

Unlike the other endpoints, this one returns the page object directly, without the `success` / `message` envelope.



## OpenAPI

````yaml get /admin/datasets/v1/
openapi: 3.1.0
info:
  title: Eka Care Datasets API
  description: >-
    Manage your workspace's formulary catalogs (medications, lab investigations,
    lab results, lab panels, symptoms and diagnoses): upload them as JSON or
    CSV, keep them in sync, read them back, and switch on partner search in the
    Eka Medical Database. Every request acts only on the workspace your access
    token belongs to.
  version: 1.0.0
  contact:
    name: Eka Care Support
    url: https://eka.care/
    email: support@eka.care
servers:
  - url: https://api.eka.care
    description: Production
  - url: https://api.dev.eka.care
    description: Stage/Sandbox
security:
  - BearerAuth: []
tags:
  - name: datasets
paths:
  /admin/datasets/v1/:
    get:
      tags:
        - datasets
      summary: List dataset records
      description: >-
        Returns one page of the catalog for the given type, newest first.
        Inactive (soft-deleted or deactivated) records are left out unless
        `show_inactive=1`.


        Unlike the other endpoints, this one returns the page object directly,
        without the `success` / `message` envelope.
      operationId: listDatasetRecords
      parameters:
        - $ref: '#/components/parameters/Type'
        - name: q
          in: query
          required: false
          description: Text search over name, display name and aliases.
          schema:
            type: string
        - $ref: '#/components/parameters/ShowInactive'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Offset'
      responses:
        '200':
          description: A page of records.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecordPage'
              example:
                items:
                  - medication_id: DRUG1001
                    name: Dolo 650
                    aliases:
                      - Dolo
                      - Paracetamol 650
                    display_name: Dolo 650
                    strength: 650mg
                    generic_name: Paracetamol
                    generic_list:
                      - Paracetamol
                    form_name: Tablet
                    manufacturer: Micro Labs Ltd
                    otc: true
                    is_active: true
                    updated_at: '2026-09-28T10:15:00+00:00'
                count: 1
                total: 1
                limit: 100
                offset: 0
                has_more: false
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  parameters:
    Type:
      name: type
      in: query
      required: true
      description: Which catalog to act on.
      schema:
        type: string
        enum:
          - medication
          - lab_investigation
          - lab_result
          - lab_panel
          - symptom
          - diagnosis
    ShowInactive:
      name: show_inactive
      in: query
      required: false
      description: Pass `1` to include inactive records.
      schema:
        type: string
        enum:
          - '1'
    Limit:
      name: limit
      in: query
      required: false
      description: Page size.
      schema:
        type: integer
        minimum: 1
        maximum: 1000
        default: 100
    Offset:
      name: offset
      in: query
      required: false
      description: Number of items to skip.
      schema:
        type: integer
        minimum: 0
        default: 0
  schemas:
    RecordPage:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Record'
        count:
          type: integer
          description: Items on this page.
        total:
          type: integer
          description: Items matching the query across all pages.
        limit:
          type: integer
        offset:
          type: integer
        has_more:
          type: boolean
    Record:
      description: A record of the requested type, as returned by the API.
      oneOf:
        - $ref: '#/components/schemas/Medication'
        - $ref: '#/components/schemas/LabInvestigation'
        - $ref: '#/components/schemas/LabResult'
        - $ref: '#/components/schemas/LabPanel'
        - $ref: '#/components/schemas/Symptom'
        - $ref: '#/components/schemas/Diagnosis'
    ErrorResponse:
      type: object
      required:
        - success
        - message
      properties:
        success:
          type: boolean
          const: false
        message:
          type: string
        errors:
          type: array
          description: >-
            Present when validation failed, the shrink guard stopped a
            reconcile, or a search switch order was refused.
          items:
            oneOf:
              - $ref: '#/components/schemas/FieldError'
              - $ref: '#/components/schemas/ShrinkGuardError'
              - $ref: '#/components/schemas/SearchOrderError'
    Medication:
      type: object
      title: Medication
      required:
        - medication_id
        - name
      properties:
        medication_id:
          type: string
          maxLength: 200
          description: Your id for the drug.
        name:
          type: string
          maxLength: 200
        ekaid:
          type:
            - string
            - 'null'
          maxLength: 64
          description: >-
            Optional. Eka's own id for this item, taken from Eka's reference
            list, so Eka products (for example EMR calculators) recognise it.
            Not checked against Eka's records; an id you send is stored as
            given. Re-uploading a CSV without this column keeps existing values;
            a blank cell in the column clears it. In a JSON update, leaving
            `ekaid` out or sending it empty keeps the current value.
        aliases:
          type: array
          items:
            type: string
            maxLength: 200
          description: Alternate names and short forms, used by search.
        display_name:
          type: string
          maxLength: 200
          description: Shown to end users. Defaults to `name`.
        strength:
          type: string
          maxLength: 32
        generic_name:
          type: string
          maxLength: 300
        generic_id:
          type: string
          maxLength: 64
        generic_list:
          type: array
          items:
            type: string
            maxLength: 100
          description: All generic (salt) components.
        generic_list_ids:
          type: array
          items:
            type: string
            maxLength: 64
        form_name:
          type: string
          maxLength: 64
          description: >-
            Dosage form. Matched case-insensitively against the [accepted drug
            forms](/docs/datasets/forms); a match links the drug to Eka's form,
            and any other value is stored as text without that link.
        sku:
          type: string
          maxLength: 64
        schedule_code:
          type: string
          maxLength: 32
        custom_type:
          type: string
          maxLength: 64
        therapy_class:
          type: string
          maxLength: 128
        therapy_class_id:
          type: string
          maxLength: 64
        action_class:
          type: string
          maxLength: 128
        action_class_id:
          type: string
          maxLength: 64
        manufacturer:
          type: string
          maxLength: 200
        otc:
          type: boolean
        is_active:
          type: boolean
          description: Defaults to true on write.
        updated_at:
          type: string
          format: date-time
          readOnly: true
    LabInvestigation:
      type: object
      title: LabInvestigation
      required:
        - investigation_id
        - name
      description: >-
        What a doctor orders or advises: a lab test, scan or package. The values
        that come back are `lab_result` records.
      properties:
        investigation_id:
          type: string
          maxLength: 200
          description: Your id for the investigation.
        name:
          type: string
          maxLength: 200
        ekaid:
          type:
            - string
            - 'null'
          maxLength: 64
          description: >-
            Optional. Eka's own id for this item, taken from Eka's reference
            list, so Eka products (for example EMR calculators) recognise it.
            Not checked against Eka's records; an id you send is stored as
            given. Re-uploading a CSV without this column keeps existing values;
            a blank cell in the column clears it. In a JSON update, leaving
            `ekaid` out or sending it empty keeps the current value.
        display_name:
          type: string
          maxLength: 200
          description: Shown to end users. Defaults to `name`.
        aliases:
          type: array
          items:
            type: string
            maxLength: 200
        category:
          type: string
          maxLength: 64
        type:
          type: string
          maxLength: 64
        specimen:
          type: string
          maxLength: 100
        unit:
          type: string
          maxLength: 32
        is_active:
          type: boolean
          description: Defaults to true on write.
        updated_at:
          type: string
          format: date-time
          readOnly: true
    LabResult:
      type: object
      title: LabResult
      required:
        - result_id
        - name
      description: >-
        A value that comes back from an investigation, such as hemoglobin. It
        has one unit. Panels refer to results by `result_id`.
      properties:
        result_id:
          type: string
          maxLength: 200
          description: Your id for the result.
        name:
          type: string
          maxLength: 200
        ekaid:
          type:
            - string
            - 'null'
          maxLength: 64
          description: >-
            Optional. Eka's own id for this item, taken from Eka's reference
            list, so Eka products (for example EMR calculators) recognise it.
            Not checked against Eka's records; an id you send is stored as
            given. Re-uploading a CSV without this column keeps existing values;
            a blank cell in the column clears it. In a JSON update, leaving
            `ekaid` out or sending it empty keeps the current value.
        display_name:
          type: string
          maxLength: 200
          description: Shown to end users. Defaults to `name`.
        aliases:
          type: array
          items:
            type: string
            maxLength: 200
        is_numerical:
          type: boolean
          description: True when the reading is a number.
        result_type:
          type: string
          enum:
            - 'N'
            - C
            - D
          description: N is numeric, C is categorical, D is descriptive.
        scale_type:
          type: string
          maxLength: 16
        loinc:
          type: string
          maxLength: 32
          description: LOINC code. Not checked against the LOINC vocabulary.
        unit:
          type: string
          maxLength: 32
          description: >-
            The one unit this result is reported in. Eka products show it only
            when `unit_id` is also set.
        unit_id:
          type: string
          maxLength: 64
          description: >-
            Eka's id for the unit. Without it the `unit` is not shown in Eka
            products.
        specimen:
          type: string
          maxLength: 100
        specimen_id:
          type: string
          maxLength: 64
          description: The specimen's id, served as is with the specimen.
        is_active:
          type: boolean
          description: Defaults to true on write.
        updated_at:
          type: string
          format: date-time
          readOnly: true
    LabPanel:
      type: object
      title: LabPanel
      required:
        - panel_id
        - name
        - member_result_ids
      description: >-
        A named, ordered collection of results that a doctor fills in, such as
        CBC. Every member must already be a `lab_result` in the same workspace
        and knowledge base, so write results first. Panel search can only be on
        while result search is on.
      properties:
        panel_id:
          type: string
          maxLength: 200
          description: Your id for the panel.
        name:
          type: string
          maxLength: 200
        ekaid:
          type:
            - string
            - 'null'
          maxLength: 64
          description: >-
            Optional. Eka's own id for this item, taken from Eka's reference
            list, so Eka products (for example EMR calculators) recognise it.
            Not checked against Eka's records; an id you send is stored as
            given. Re-uploading a CSV without this column keeps existing values;
            a blank cell in the column clears it. In a JSON update, leaving
            `ekaid` out or sending it empty keeps the current value.
        display_name:
          type: string
          maxLength: 200
          description: Shown to end users. Defaults to `name`.
        aliases:
          type: array
          items:
            type: string
            maxLength: 200
        member_result_ids:
          type: array
          minItems: 1
          items:
            type: string
            maxLength: 200
          description: >-
            The `result_id` of each member result, in display order. Each id
            must be stored as a result, and can appear once. A member whose
            result is deactivated or deleted later stays on the panel and is
            skipped when the panel is served.
        is_active:
          type: boolean
          description: Defaults to true on write.
        updated_at:
          type: string
          format: date-time
          readOnly: true
    Symptom:
      type: object
      title: Symptom
      required:
        - symptom_id
        - name
      properties:
        symptom_id:
          type: string
          maxLength: 200
          description: Your id for the symptom.
        name:
          type: string
          maxLength: 200
        ekaid:
          type:
            - string
            - 'null'
          maxLength: 64
          description: >-
            Optional. Eka's own id for this item, taken from Eka's reference
            list, so Eka products (for example EMR calculators) recognise it.
            Not checked against Eka's records; an id you send is stored as
            given. Re-uploading a CSV without this column keeps existing values;
            a blank cell in the column clears it. In a JSON update, leaving
            `ekaid` out or sending it empty keeps the current value.
        display_name:
          type: string
          maxLength: 200
          description: Shown to end users. Defaults to `name`.
        aliases:
          type: array
          items:
            type: string
            maxLength: 200
        snomed_id:
          type: string
          maxLength: 32
          description: SNOMED CT concept id. Not checked against the vocabulary.
        icd10:
          type: string
          maxLength: 32
        icd10_term:
          type: string
          maxLength: 255
        gender:
          type:
            - string
            - 'null'
          enum:
            - M
            - F
            - null
          description: Leave empty when the symptom applies to everyone.
        is_active:
          type: boolean
          description: Defaults to true on write.
        updated_at:
          type: string
          format: date-time
          readOnly: true
    Diagnosis:
      type: object
      title: Diagnosis
      required:
        - diagnosis_id
        - name
      properties:
        diagnosis_id:
          type: string
          maxLength: 200
          description: Your id for the diagnosis.
        name:
          type: string
          maxLength: 200
        ekaid:
          type:
            - string
            - 'null'
          maxLength: 64
          description: >-
            Optional. Eka's own id for this item, taken from Eka's reference
            list, so Eka products (for example EMR calculators) recognise it.
            Not checked against Eka's records; an id you send is stored as
            given. Re-uploading a CSV without this column keeps existing values;
            a blank cell in the column clears it. In a JSON update, leaving
            `ekaid` out or sending it empty keeps the current value.
        display_name:
          type: string
          maxLength: 200
          description: Shown to end users. Defaults to `name`.
        aliases:
          type: array
          items:
            type: string
            maxLength: 200
        snomed_id:
          type: string
          maxLength: 32
          description: SNOMED CT concept id. Not checked against the vocabulary.
        icd10:
          type: string
          maxLength: 32
        icd10_term:
          type: string
          maxLength: 255
        gender:
          type:
            - string
            - 'null'
          enum:
            - M
            - F
            - null
          description: Leave empty when the diagnosis applies to everyone.
        is_active:
          type: boolean
          description: Defaults to true on write.
        updated_at:
          type: string
          format: date-time
          readOnly: true
    FieldError:
      type: object
      properties:
        index:
          type:
            - integer
            - 'null'
          description: >-
            For a JSON body, the 0-based position of the failing record in the
            list. For a CSV, the 1-based data row (the header row is not
            counted). `null` for a file-level error.
        field:
          type:
            - string
            - 'null'
        msg:
          type: string
        value:
          description: The rejected value.
    ShrinkGuardError:
      type: object
      properties:
        code:
          type: string
          const: shrink_guard
        active_before:
          type: integer
        would_deactivate:
          type: integer
    SearchOrderError:
      type: object
      properties:
        code:
          type: string
          enum:
            - turn_on_results_first
            - results_in_other_kb
            - turn_off_panels_first
  responses:
    BadRequest:
      description: Invalid request, for example a missing or unknown `type`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: The access token is missing, invalid or expired.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Access token for your workspace.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.