Update a Resource (PUT)
Update one or more existing rows entirely through query parameters — no request body needed:
How it Works
PUT uses only query parameters — a filter to select which rows to update, and a set param to define what changes:
PUT /minimal/api/rest/auto/v1/{org_abbr}/{project_abbr}/{db_type}/{db_name}/{table}?{filter}&set={column}.{new value}
Example — rename "Steve Cat 33" to "Steve Cat 34" for user id=1:
PUT /minimal/api/rest/auto/v1/acme/demo/ms/demo_db/users?id=eq.1&set=name.Steve%20Cat%2034
/v1/acme/demo/ms/demo_db
│ │ │ │
│ │ │ └── database name
│ │ └── ms = MySQL
│ └── project abbreviation
└── org abbreviation
Query Parameters
Filter — selects which rows to update
At least one filter is required. Uses the same operators as GET:
| Operator | Meaning | Example |
|---|---|---|
eq | Equals | id=eq.10 |
ne | Not equals | id=ne.10 |
lt | Less than | id=lt.100 |
gt | Greater than | id=gt.5 |
le | Less than or equal | id=le.50 |
ge | Greater than or equal | id=ge.10 |
bw | Between (inclusive) | id=bw.10.20 |
in | Value is in list | id=in.6,7,8 |
nin | Value is not in list | id=nin.1,2,3 |
li | Contains | name=li.alice |
rli | Starts with | name=rli.ali |
set — defines the update
| Param | Format | Description |
|---|---|---|
set | set=column.new value | Column, dot, new value |
The format is:
set=<column>.<new value>
Decoded example:
column → name
new → Steve Cat 34
set=name.Steve Cat 34
URL-encoded:
set=name.Steve%20Cat%2034
Spaces within new value must be encoded as %20.
Multiple filters are combined with AND. Only one set param per request:
?id=eq.1&set=name.Steve%20Cat%2034
Request Body
PUT does not require a request body. Send an empty body or omit it entirely.
Response
200 OK — returns the number of rows updated:
{
"rows_affected": 1
}
200 OK with zero rows — No error is raised:
{
"rows_affected": 0
}
Required Headers
All requests to Minimal must include these headers.
They are mandatory — missing any header results in a 400 Bad Request.
| Header | Format | Description |
|---|---|---|
X-Org-Id | String | Organization identifier |
X-Project-Id | String | Project identifier within the organization |
X-Space-Id | String | Workspace/environment identifier within the project |
X-User-Id | String | Authenticated user's identifier |
X-User-Roles | Comma-separated string | User's roles (e.g., admin,editor) |
Examples
Rename a user:
PUT /minimal/api/rest/auto/v1/acme/demo/ms/demo_db/users?id=eq.1&set=name.Steve%20Cat%2034
Update an email address:
PUT /minimal/api/rest/auto/v1/acme/demo/ms/demo_db/users?id=eq.5&set=email.new%40example.com
Update a simple single-word value:
PUT /minimal/api/rest/auto/v1/acme/demo/ms/demo_db/users?id=eq.3&set=status.active
Update all users in an ID range:
PUT /minimal/api/rest/auto/v1/acme/demo/ms/demo_db/users?id=bw.10.20&set=is_active.0
Update by matching name pattern:
PUT /minimal/api/rest/auto/v1/acme/demo/ms/demo_db/users?name=rli.test&set=is_active.1
Common Errors
| Code | Cause |
|---|---|
400 | set param is missing or malformed |
401 | Missing required header |
406 | No filter provided — PUT requires at least one filter |
417 | Unknown or unsupported filter operator |
422 | New value violates a schema constraint (type mismatch, unique violation) |