Skip to content

Commit 45f3993

Browse files
committed
docs(api-server): add usage notes for data access endpoints
- Add clarification for error handling in listItems endpoint - Include information about partial updates for user model in updateItem endpoint
1 parent dbc2048 commit 45f3993

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/content/docs/api-server/reference/data-access.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ Retrieves a paginated list of items for a specific model.
5555
- **`limit`** (integer, optional): The maximum number of items to return.
5656
- **`cursor`** (string, optional): The pagination cursor from a previous response to fetch the next page.
5757

58+
<Aside type="note">
59+
Malformed `filter` or `sort` parameters will result in a `400 Bad Request` error with a descriptive message.
60+
</Aside>
61+
5862
<Tabs>
5963
<TabItem label="Simple Filter">
6064
**Request:**
@@ -107,6 +111,10 @@ Updates an existing item by its unique ID.
107111
- **Path:** `/api/v1/data/<item_id>?model=<model_name>`
108112
- **Body (JSON):** The full JSON representation of the model with the updated fields.
109113

114+
<Aside type="note" title="Partial Updates for Users">
115+
When updating a `user` model, the API enforces a secure partial update mechanism. Non-admin users can only modify specific, whitelisted fields (such as `feedActionStatus`). Any attempts to change sensitive fields like `appRole` or `email` will be ignored, ensuring data integrity.
116+
</Aside>
117+
110118
- **Success Response:**
111119
- `200 OK`: Returns a standard success response with the updated item object as the data payload.
112120

0 commit comments

Comments
 (0)