Table Record
https://{your-workspace-slug}.{region}.xata.sh/db/db_branch_name/tables/table_name/data/record_id
This endpoint enables mutating a given record in a table, referenced by its ID.
Expected parameters
Name | Description | In | Required | Schema |
---|---|---|---|---|
db_branch_name | The DBBranchName matches the pattern `{db_name}:{branch_name}`. | path | ✅ | string |
table_name | The Table name | path | ✅ | string |
record_id | The Record name | path | ✅ | string |
columns | Column filters | query | - | array |
Get Record by ID
GEThttps://{your-workspace-slug}.{region}.xata.sh/db/db_branch_name/tables/table_name/data/record_id
Retrieve record by ID
Responses
Insert Record With ID
PUThttps://{your-workspace-slug}.{region}.xata.sh/db/db_branch_name/tables/table_name/data/record_id
By default, IDs are auto-generated when data is inserted into Xata. Sending a request to this endpoint allows us to insert a record with a pre-existing ID, bypassing the default automatic ID generation.
Expected parameters
Name | Description | In | Required | Schema |
---|---|---|---|---|
createOnly | query | - | boolean | |
ifVersion | query | - | integer |
Request Body Type Definition
Responses
Update Record With ID
PATCHhttps://{your-workspace-slug}.{region}.xata.sh/db/db_branch_name/tables/table_name/data/record_id
Expected parameters
Name | Description | In | Required | Schema |
---|---|---|---|---|
ifVersion | query | - | integer |
Request Body Type Definition
Responses
Upsert Record With ID
POSThttps://{your-workspace-slug}.{region}.xata.sh/db/db_branch_name/tables/table_name/data/record_id
Expected parameters
Name | Description | In | Required | Schema |
---|---|---|---|---|
ifVersion | query | - | integer |
Request Body Type Definition
Responses
Delete Record From Table
DELETEhttps://{your-workspace-slug}.{region}.xata.sh/db/db_branch_name/tables/table_name/data/record_id