Skip to content
Luna
Esc
↑↓navigate↵open⌘Jpreview

List the rows of a table

Returns a page of one table of one luna, in rowid order. Each luna has its own tables, so you name the luna with key. An index shows its rows table alone.

GET/_luna/tenants/{tenant}/data/{type}/{table}
Authorization
AuthorizationBearer token · headerrequired

An account key (la_…), an API key (lt_…) or a session token (ls_…). The scopes listed are the permissions the operation needs.

Scopes:data:read
Path parameters
tenantstringrequired

The tenant, by its name.

typestringrequired

The luna type, by its name.

tablestringrequired

The table, by its name.

Query parameters
keystringrequired

The luna's key as JSON, such as {"id":"a"}. For a type keyed by one field, the value of that field alone also works.

afterinteger<int64>

The cursor of the last page, to read the next one.

limitinteger<int64>

How many rows to return. 50 when left out.

min 0
Responses
200

A page of rows.

columnsTableColumn[]required

The table's columns, in the order the type declares them.

Show properties
Array of TableColumn
namestringrequired
typestringrequired

The column's type: string, int, float, bool, timestamp, uuid, enum, json, bytes, blobRef or vector.

nullablebooleanrequired

Whether the column may hold null.

rowsTableRow[]required
Show properties
Array of TableRow
rowidinteger<int64>required

The row's id within its table.

valuesobjectrequired

The row's value for each column, by the column's name. Bytes are shown as {"$bytes": length} and a vector as {"$vector": dimensions}.

countinteger<int64>required

How many rows the table holds in all.

min 0
cursorinteger<int64> | null

The rowid of the last row when there are more. Send it back as after. It is null on the last page.

default

The request failed. The status says how and error.message says why.

errorErrorDetailrequired
Show properties
codestring | null

A code for programs to branch on, when the error has one.

messagestringrequired

What went wrong, in a sentence a person can read.

Try it
Server
Authorization
Parameters
Request
curl -X GET 'https://luna.example.com/_luna/tenants/string/data/string/string?key=string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "columns": [
    {
      "name": "string",
      "type": "string",
      "nullable": true
    }
  ],
  "rows": [
    {
      "rowid": 0,
      "values": {}
    }
  ],
  "count": 0,
  "cursor": 0
}

Was this page helpful?