For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
LoginBook a Demo
  • Getting Started
    • Athena SDK Quickstart
  • Database API
    • Database Filters & CRUD
  • Python Guides
    • Build with Agents
    • Use Models Directly
    • Load Data Frames
    • Upload Files
    • Create Assets
    • Structured Output
    • Long-Running AOP Execution
  • TypeScript Guides
    • Build with Agents
    • Working with Assets
    • Use Models Directly
    • Execute AOPs
    • Sheets API
    • Browser JavaScript (ESM)
    • UI Registry (Assistant.js)
    • Upload Files
    • Create Assets
    • Structured Output
  • API Reference
      • GETCheck database status
      • GETList tables in database
      • GETRead rows from database table
      • POSTInsert rows into database table
      • DELDelete rows from database table
      • PATCHUpdate rows in database table
      • GETGet table schema (columns and types)
      • POSTExecute SQL against database
Logo
LoginBook a Demo
API ReferenceDatabases

Update rows in database table

Beta
PATCH
https://api.athenaintel.com/api/v0/databases/:asset_id/data/:table_name
PATCH
/api/v0/databases/:asset_id/data/:table_name
$curl -X PATCH https://api.athenaintel.com/api/v0/databases/asset_id/data/table_name \
> -H "X-API-KEY: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "data": {
> "email": "alice.smith@example.com",
> "name": "Alice Smith"
> },
> "return_representation": true
>}'
1{
2 "data": [
3 {
4 "email": "charlie@example.com",
5 "id": 3,
6 "name": "Charlie"
7 }
8 ]
9}
Update rows matching the filter conditions. Filter conditions are passed as query parameters using PostgREST syntax. **Filter Syntax:** - `?column=eq.value` - Equal - `?column=neq.value` - Not equal - `?column=gt.value` - Greater than - `?column=gte.value` - Greater than or equal - `?column=lt.value` - Less than - `?column=lte.value` - Less than or equal - `?column=like.*pattern*` - LIKE (case-sensitive) - `?column=ilike.*pattern*` - ILIKE (case-insensitive) - `?column=in.(a,b,c)` - IN list - `?column=is.null` - IS NULL **Safety:** Filters are required by default to prevent accidental bulk updates. To update all rows intentionally, pass `?force=true`.
Was this page helpful?
Previous

Get table schema (columns and types)

Next
Built with

Update rows matching the filter conditions. Filter conditions are passed as query parameters using PostgREST syntax.

Filter Syntax:

  • ?column=eq.value - Equal
  • ?column=neq.value - Not equal
  • ?column=gt.value - Greater than
  • ?column=gte.value - Greater than or equal
  • ?column=lt.value - Less than
  • ?column=lte.value - Less than or equal
  • ?column=like.*pattern* - LIKE (case-sensitive)
  • ?column=ilike.*pattern* - ILIKE (case-insensitive)
  • ?column=in.(a,b,c) - IN list
  • ?column=is.null - IS NULL

Safety: Filters are required by default to prevent accidental bulk updates. To update all rows intentionally, pass ?force=true.

Authentication

X-API-KEYstring
API Key authentication via header
OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

asset_idstringRequired
table_namestringRequired

Query parameters

forcebooleanOptionalDefaults to false

Set to true to update all rows (required when no filters provided)

Request

This endpoint expects an object.
datamap from strings to anyRequired
Column values to update
return_representationbooleanOptionalDefaults to false
If true, return the updated rows in the response

Response

Successful Response
datalist of maps from strings to any or null

Affected rows (returned when return_representation=true)

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
501
Not Implemented Error
503
Service Unavailable Error