/schema/collectionsList Collections
Returns a paginated list of all user-defined collections in the project, sourced from the project's k9o_<proj_id> schema.
Each entry includes the collection name, approximate row count (from pg_class.reltuples — rowCountIsExact: false), column count, index count, and the slug and timestamp of the last migration that touched the collection.
Requires PROJECT_MEMBER role minimum; uses cursor-based pagination with a default page size of 50.
| limit | query | The most collections to return, 1 to 200. Default 50. A value outside the range is refused. |
| cursor | query | The Omit it for the first page. |
| projectSlug * | path | The project's slug: the path segment after It is unique within the org. |
| HTTP | K9O Code | Description |
|---|---|---|
| 200 | Success | |
| 401 | K9O_SESSION_EXPIRED | Your session has expired; re-authenticate and retry. |
| 403 | K9O_ACCESS_DENIED | Your account does not have the required role (PROJECT_MEMBER or higher) to list schema collections for this project. |
| data * | object[] | One page of the project's collections, by name ascending. Pass |
| name * | string | The collection (table) name. |
| rowCount * | integer | The live row count (soft-deleted rows excluded), counted without row-level security, so it can exceed what your own reads return. |
| rowCountIsExact * | true | Always true: |
| columnCount * | integer | How many columns the collection has, platform-reserved columns included. |
| indexCount * | integer | How many indexes the collection has, the primary key included. |
| lastMigrationSlug * | any | The slug of the most recent migration that touched the collection; null when none did (for example a collection created outside migrations). |
| One of: string | ||
| or: null | ||
| lastMigrationAppliedAt * | any | When that migration was applied; null when no migration touched the collection. |
| One of: string <date-time> | ||
| or: null | ||
| meta * | any | Request metadata: cost, timing and correlation ids. The list adds |
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.schema.collections.list()Showing example in TypeScript
{
"data": [
{
"name": "string",
"rowCount": 0,
"rowCountIsExact": true,
"columnCount": 0,
"indexCount": 0,
"lastMigrationSlug": "string",
"lastMigrationAppliedAt": "string"
}
]
}