---
title: "List models"
method: GET
path: "/api/public/organizations/{orgId}/models"
tags: ["Models"]
---

# List models

`GET /api/public/organizations/{orgId}/models`

## Request

- Base URL: `https://charts.basedash.com`
- URL: `https://charts.basedash.com/api/public/organizations/{orgId}/models`
- Auth: HTTP bearer

Lists models for an organization. Requires admin access to the organization. Results are paginated and ordered by creation date (newest first).

## Path parameters

- `orgId` string, required: Organization ID

## Query parameters

- `limit` integer: Maximum number of items to return (1-100, default 50)
- `cursor` string: Cursor for pagination (ID of the last item from previous page)
- `databaseConnectionId` string: Optional data source ID to filter models by

## Response `200`

Models retrieved successfully

- object
  - `data` ModelResponse[], required
    - `id` string, required: Model ID
    - `createdAt` string, date-time, required: Model creation timestamp
    - `updatedAt` string, date-time, required: Model last update timestamp
    - `name` string, required: Human-readable model name
    - `referenceName` string, required: Stable SQL reference name for the model
    - `description` string, required: Model description
    - `sqlQuery` string, required: SQL query for the latest model version
    - `organizationId` string, required: Organization ID
    - `databaseConnectionId` string, required: Data source ID
    - `verifiedAt` string, date-time, nullable, required: Verification timestamp for the current model SQL
    - `verifiedByMemberId` string, nullable, required: Member who verified the current model SQL
    - `columns` object[], required: Inferred result columns and their documentation
      - `name` string, required
      - `description` string
      - `synonyms` string[]
      - `type` 'array' | 'bigint' | 'boolean' | 'date' | 'mixed' | 'null' | 'number' | 'object' | 'string' | 'unknown', required: Best-effort type inferred from sampled result values.
      - `nullable` boolean, required: Whether null or undefined appeared in sampled result values.
      - `example` union, required: First non-null sampled value, normalized for JSON.
        - string
        - number
        - boolean
      - `sampleValues` union[]: Distinct non-null sampled values (capped), normalized for JSON.
        - union
          - string
          - number
          - boolean
    - `measures` object[], required: Ordered reusable aggregate expressions
      - `name` string, required
      - `sql` string, required
      - `description` string
      - `synonyms` string[]
    - `segments` object[], required: Ordered reusable predicate expressions
      - `name` string, required
      - `sql` string, required
      - `description` string
      - `synonyms` string[]
    - `defaultTimeColumn` string, nullable, required: Default date result column
    - `synonyms` string[], required: Alternative model names
    - `grain` string, required: What one model row represents
    - `keyColumns` string[], required: Columns that uniquely identify a model row
    - `relationships` object[], required: Relationships to other models
      - `targetModelId` string, required
      - `sourceColumn` string, required
      - `targetColumn` string, required
      - `cardinality` 'many_to_one' | 'one_to_one' | 'one_to_many', required
    - `usageGuidance` string, required: Guidance about when and how to use the model
    - `warnings` object[], required: Non-blocking semantic metadata warnings
      - `code` 'base_sql_contains_group_by' | 'default_time_column_cleared' | 'measure_may_not_aggregate' | 'semantic_expression_may_be_stale', required
      - `message` string, required
      - `field` 'sqlQuery' | 'measures' | 'segments' | 'defaultTimeColumn', required
      - `name` string
  - `pagination` PaginationMeta, required
    - `nextCursor` string, nullable, required: Cursor for the next page (null if no more pages)
    - `hasMore` boolean, required: Whether there are more items after this page

## Other responses

- `401`: Unauthorized - Missing or invalid API key
- `404`: Not found - Organization, data source, or admin access not found
- `429`: Rate limit exceeded - Too many requests
- `500`: Internal server error

---

[API](https://skmtc.dev/basedash/apis/basedash-public-api.md) - [All operations](https://skmtc.dev/basedash/apis/basedash-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/basedash/apis/basedash-public-api/revisions/efb9d40bc6f7?raw)
