Skip to main content
GET/metadata/index/{collection}

Get Metadata Index

Get index by collection. (Data, Queries & Vectors) GET /@:projectSlug/metadata/index/{collection}.

Parameters
collection *path

The collection's name.

projectSlug *path

The project's slug: the path segment after @.

It is unique within the org.

Responses
HTTPK9O CodeDescription
200Success
400K9O_INVALID_FIELD_VALUEThe body is malformed: an unknown field, a wrong type, or an unsupported where operator.
401K9O_INVALID_CREDENTIALSThe caller is not authenticated.
403K9O_ACCESS_DENIEDThe caller has no read access to the collection (the record read's own gate).
403K9O_EXTENSION_PERMISSION_DENIEDAn extension token: the Metadata API is not extension-callable yet.
Response body (200)
data *object

The collection's metadata column declaration.

collection *string

The collection name.

columns *object[]

The declared metadata columns.

The GET lists them by column name; the PUT echoes them in the order sent.

Empty when none are declared.

column *string

A column of the collection declared as metadata.

indexed *boolean

Whether the column was declared indexed.

meta *any

Request metadata (request id, trace id, timing and cost) plus cursor.next: pass it as cursor to read the next page, or null when there is no next page.

TypeScript
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.metadata.index.get('<collection>')

Showing example in TypeScript

Response example (200)
{
  "data": {
    "collection": "string",
    "columns": [
      {
        "column": "string",
        "indexed": false
      }
    ]
  }
}

More in Data, Queries & Vectors