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

Change a value in a row

Sets one column of one row and returns the row. You cannot change a row of an index.

PATCH/_luna/tenants/{tenant}/data/{type}/{table}/{rowid}
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:write
Path parameters
tenantstringrequired

The tenant, by its name.

typestringrequired

The luna type, by its name.

tablestringrequired

The table, by its name.

rowidinteger<int64>required

The row, by its rowid.

Request body
requiredapplication/json
keyanyrequired

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.

columnstringrequired

The column to change.

valueany

The new value. Null when left out.

Responses
200

The row as it is now.

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}.

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
Bodyapplication/json
Request
curl -X PATCH 'https://luna.example.com/_luna/tenants/string/data/string/string/0' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "key": null,
  "column": "string",
  "value": null
}'
Response
{
  "rowid": 0,
  "values": {}
}

Was this page helpful?