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

# List tests

> Lists test definitions. On a full scan disabled tests are omitted unless `disabled=true` is passed; the `synced_since` and `deleted_since` feeds always include them (with `disabled: true`) so a sync can observe a test being disabled. Full scan by default; pass `synced_since` for the upserts feed or `deleted_since` for the tombstones feed (mutually exclusive). A test's `synced_at` changes when its definition changes — new executions do not bump it.



## OpenAPI

````yaml api-reference/beta/openapi.json get /public/beta/{env_id}/tests
openapi: 3.1.0
info:
  description: >
    The Elementary Public API is a REST interface for programmatically reading

    Elementary's assets, columns, lineage, tests, and test results for one

    environment.


    **Authentication.** Send a bearer token (personal or account token) in the

    `Authorization` header. The token resolves to an account; results are scoped
    to

    the environments that token may view.


    **Environment scope.** Every resource lives under `/{env_id}`. Call

    `GET /environments` first to discover the ids you can access.


    **Pagination.** List endpoints are keyset-paginated: pass `limit` (default
    500,

    max 2000) and follow `next_cursor` until `has_more` is `false`. Cursors are
    opaque

    and bound to the filters that produced them — reusing a cursor with
    different

    filters returns `400`.


    **Incremental sync.** Every dataset supports a full scan (default). Assets,

    columns, and tests also expose two incremental feeds: `synced_since`
    (upserts)

    and `deleted_since` (soft-delete tombstones). A test's `synced_at` tracks
    its

    definition — new executions do not bump it.


    Latest test executions and per-test execution history are **not**
    incremental.

    Latest executions are a full snapshot replaced in place: re-read it.
    Execution

    history is append-only and scoped to one test, filtered by `start_time_from`
    /

    `start_time_to` (last 30 days by default).


    **Lookback limit.** Explicit lower bounds (`synced_since`, `deleted_since`,

    `start_time_from`) reach back at most 90 days; an older timestamp is treated
    as

    90 days ago rather than rejected. Omitting the filter still returns the full

    current snapshot.


    **Rate limiting.** Requests are rate-limited per account; responses carry

    `RateLimit-*` headers and `429` responses include `Retry-After`.


    _Beta: the shape may change while we co-design with early adopters._
  title: Elementary Public API
  version: beta
servers:
  - url: https://prod.api.elementary-data.com
security:
  - bearerAuth: []
tags:
  - description: Discover accessible environments.
    name: Environments
  - description: Lineage assets — tables, views, BI assets.
    name: Assets
  - description: Columns of assets.
    name: Columns
  - description: Asset-to-asset lineage edges.
    name: Asset lineage
  - description: Column-level lineage edges.
    name: Column lineage
  - description: Test definitions and their configuration.
    name: Tests
  - description: Most recent execution of every sub-test.
    name: Latest test executions
  - description: Execution history of a single test.
    name: Test executions
  - description: Current data health score per asset.
    name: Asset health scores
paths:
  /public/beta/{env_id}/tests:
    get:
      tags:
        - Tests
      summary: List tests
      description: >-
        Lists test definitions. On a full scan disabled tests are omitted unless
        `disabled=true` is passed; the `synced_since` and `deleted_since` feeds
        always include them (with `disabled: true`) so a sync can observe a test
        being disabled. Full scan by default; pass `synced_since` for the
        upserts feed or `deleted_since` for the tombstones feed (mutually
        exclusive). A test's `synced_at` changes when its definition changes —
        new executions do not bump it.
      operationId: list_tests_public_beta__env_id__tests_get
      parameters:
        - description: Environment identifier that scopes the request.
          in: path
          name: env_id
          required: true
          schema:
            description: Environment identifier that scopes the request.
            title: Env Id
            type: string
        - description: Return only tests with these ids.
          in: query
          name: ids
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                maxItems: 1000
                type: array
              - type: 'null'
            description: Return only tests with these ids.
            title: Ids
        - description: Return only tests running on these asset ids.
          in: query
          name: asset_ids
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                maxItems: 1000
                type: array
              - type: 'null'
            description: Return only tests running on these asset ids.
            title: Asset Ids
        - description: Return only tests of these test types.
          in: query
          name: test_types
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                maxItems: 1000
                type: array
              - type: 'null'
            description: Return only tests of these test types.
            title: Test Types
        - description: Return only tests of these definition types.
          in: query
          name: definition_types
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                maxItems: 1000
                type: array
              - type: 'null'
            description: Return only tests of these definition types.
            title: Definition Types
        - description: >-
            Return only tests from these source types (e.g. `dbt`,
            `elementary_cloud`).
          in: query
          name: source_types
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                maxItems: 1000
                type: array
              - type: 'null'
            description: >-
              Return only tests from these source types (e.g. `dbt`,
              `elementary_cloud`).
            title: Source Types
        - description: Return only tests tagged with any of these tags.
          in: query
          name: tags
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                maxItems: 1000
                type: array
              - type: 'null'
            description: Return only tests tagged with any of these tags.
            title: Tags
        - description: >-
            Disabled tests are omitted by default. Pass `true` to return only
            the disabled ones, `false` for the default (enabled only).
          in: query
          name: disabled
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            description: >-
              Disabled tests are omitted by default. Pass `true` to return only
              the disabled ones, `false` for the default (enabled only).
            title: Disabled
        - description: >-
            Upserts feed: tests whose `synced_at` >= this time (inclusive).
            Orders by `synced_at`. Clamped to the last 90 days — an older time
            is treated as 90 days ago.
          in: query
          name: synced_since
          required: false
          schema:
            anyOf:
              - format: date-time
                type: string
              - type: 'null'
            description: >-
              Upserts feed: tests whose `synced_at` >= this time (inclusive).
              Orders by `synced_at`. Clamped to the last 90 days — an older time
              is treated as 90 days ago.
            title: Synced Since
        - description: >-
            Tombstones feed: tests whose `deleted_at` >= this time (inclusive).
            Orders by `deleted_at`. Clamped to the last 90 days — an older time
            is treated as 90 days ago.
          in: query
          name: deleted_since
          required: false
          schema:
            anyOf:
              - format: date-time
                type: string
              - type: 'null'
            description: >-
              Tombstones feed: tests whose `deleted_at` >= this time
              (inclusive). Orders by `deleted_at`. Clamped to the last 90 days —
              an older time is treated as 90 days ago.
            title: Deleted Since
        - description: >-
            Opaque cursor from a previous response's `next_cursor`. Reuse it
            only with the identical query parameters that produced it.
          in: query
          name: cursor
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Opaque cursor from a previous response's `next_cursor`. Reuse it
              only with the identical query parameters that produced it.
            title: Cursor
        - description: Maximum items to return per page (1-2000).
          in: query
          name: limit
          required: false
          schema:
            default: 500
            description: Maximum items to return per page (1-2000).
            maximum: 2000
            minimum: 1
            title: Limit
            type: integer
        - description: >-
            Sort field for a full scan. Ignored when
            `synced_since`/`deleted_since` is set (those feeds always order by
            their own cursor).
          in: query
          name: order_by
          required: false
          schema:
            $ref: '#/components/schemas/OrderBy'
            default: id
            description: >-
              Sort field for a full scan. Ignored when
              `synced_since`/`deleted_since` is set (those feeds always order by
              their own cursor).
        - description: Sort direction for `order_by`.
          in: query
          name: direction
          required: false
          schema:
            $ref: '#/components/schemas/Direction'
            default: asc
            description: Sort direction for `order_by`.
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_Test_'
          description: Successful Response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
          description: Invalid cursor or request parameters.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
          description: Authentication is required.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
          description: The token does not have permission to access the resource.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
          description: The requested resource was not found.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
          description: Request validation failed.
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
          description: Rate limit exceeded.
          headers:
            RateLimit-Limit:
              description: Maximum requests allowed in the current window.
              schema:
                type: integer
            RateLimit-Remaining:
              description: Requests remaining in the current window.
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the current rate-limit window resets.
              schema:
                type: integer
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
          description: An unexpected server error occurred.
components:
  schemas:
    OrderBy:
      enum:
        - id
        - synced_at
      title: OrderBy
      type: string
    Direction:
      enum:
        - asc
        - desc
      title: Direction
      type: string
    PaginatedResponse_Test_:
      properties:
        has_more:
          default: false
          description: >-
            The only signal to continue pagination; a short page may still have
            more items because permission filtering can trim rows.
          title: Has More
          type: boolean
        items:
          description: Objects returned in the current page.
          items:
            $ref: '#/components/schemas/Test'
          title: Items
          type: array
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Opaque cursor for the next page, valid only with identical query
            parameters.
          title: Next Cursor
      required:
        - items
      title: PaginatedResponse[Test]
      type: object
    ApiErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
          description: Structured details about the error.
      required:
        - error
      title: ApiErrorResponse
      type: object
    Test:
      properties:
        asset_id:
          anyOf:
            - type: string
            - type: 'null'
          description: ID of the asset this test runs on, when known.
          title: Asset Id
        column_name:
          anyOf:
            - type: string
            - type: 'null'
          description: Column the test runs on, for column-level tests.
          title: Column Name
        config:
          additionalProperties: true
          default: {}
          description: Test configuration as defined in the source system.
          title: Config
          type: object
        definition_type:
          description: >-
            Extensible enum. The test's name in the source system — dbt test
            name for dbt tests, test type for Elementary tests.
          examples:
            - not_null
            - unique
            - volume_anomalies
            - source_freshness
          title: Definition Type
          type: string
        deleted_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Soft-delete timestamp. Present only in the `deleted_since` feed.
          title: Deleted At
        description:
          anyOf:
            - type: string
            - type: 'null'
          description: Description from the source platform.
          title: Description
        disabled:
          description: >-
            Whether the test is disabled. A full scan omits disabled tests
            unless `disabled=true` is passed; the `synced_since` and
            `deleted_since` feeds always include them, so a sync observes a test
            being disabled.
          title: Disabled
          type: boolean
        id:
          description: Unique test identifier.
          title: Id
          type: string
        name:
          description: Test name.
          title: Name
          type: string
        owners:
          default: []
          description: Owners assigned to the test.
          items:
            type: string
          title: Owners
          type: array
        path:
          anyOf:
            - type: string
            - type: 'null'
          description: Logical path of the test in its project tree.
          title: Path
        project:
          anyOf:
            - type: string
            - type: 'null'
          description: Project the test belongs to, when known.
          title: Project
        severity:
          description: Configured severity of the test.
          examples:
            - ERROR
            - WARNING
          title: Severity
          type: string
        source_type:
          description: >-
            Extensible enum. Integration that synced this test. New values may
            be added over time.
          examples:
            - dbt
            - elementary_cloud
            - python_sdk
          title: Source Type
          type: string
        synced_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: >-
            When Elementary last synced this test definition. Bumped by
            definition changes only — new executions do not bump it. Use with
            `synced_since` for incremental reads.
          title: Synced At
        tags:
          default: []
          description: Tags assigned to the test.
          items:
            type: string
          title: Tags
          type: array
        test_type:
          description: >-
            Extensible enum. Elementary's category for the test. New values may
            be added over time.
          examples:
            - dbt_test
            - anomaly_detection
            - schema_change
            - source_freshness
            - elementary_cloud
          title: Test Type
          type: string
        updated_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: When the test definition was last updated in the source platform.
          title: Updated At
      required:
        - id
        - name
        - test_type
        - definition_type
        - source_type
        - severity
        - disabled
      title: Test
      type: object
    ApiError:
      properties:
        code:
          description: Stable code identifying the type of error.
          title: Code
          type: string
        message:
          description: Human-readable explanation of the error.
          title: Message
          type: string
      required:
        - code
        - message
      title: ApiError
      type: object
  securitySchemes:
    bearerAuth:
      description: Personal or account token.
      scheme: bearer
      type: http

````

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