Improve updating multiple items api reference
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 55/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Stale
- Domain
- documentation
Research direction
Open the API reference at https://directus.io/docs/api/items#update-multiple-items and review the existing “Update Multiple Items” section. Document the update-many-by-query and batch-updating approaches using the request shapes in the issue, alongside the existing update-by-keys approach. Done means all three supported methods are clearly described on that page.
Written by the indexing model from the issue text.
Description
The "Update Multiple Items" section in the API reference is missing 2 supported methods of doing multiple updates.
On this page https://directus.io/docs/api/items#update-multiple-items we are currently documenting the "update many by keys" approach, here you provide a list of keys and one single object to update all keys with.
PATCH /items/:collection
{
"keys": [1,2,3,4],
"data": {
"status": "published"
}
}
We also support the following approaches:
- "update many by query" similar to the one above but instead of providing a list of ID's you provide a query to filter items to be updated with a single object.
PATCH /items/:collection
{
"query": {
"filter": {
"status": { "_eq": "draft" },
},
},
"data": {
"status": "published"
}
}
- "batch updating" this approach allows the sending of a list of items to updated based on ID so each individual item can update different properties.
PATCH /items/:collection
[
{
"id": 1,
"status": "published"
},
{
"id": 2,
"status": "archived"
},
{
"id": 3,
"title": "something"
},
]
- Dominant language
- TypeScript
- Stars
- 24
- Forks
- 90
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 19
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from directus/docs
-
Docs Platform
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
directus/docs#88 · 1 comment ·
Maintainers usually reply within 2 days
-
llms.txt links agents to /raw/ copies where partials are empty; the inlined .md copies aren't linkedOpen
Difficulty 3/5 1-2 days Newbie friendliness 67/100
directus/docs#865 · 1 comment ·
Maintainers usually reply within 2 days
-
Document required special flags per field typeMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
directus/docs#850 · 3 comments ·
Maintainers usually reply within 2 days
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
directus/docs#771 · 3 comments ·
Maintainers usually reply within 2 days
-
content-improvement
Difficulty 5/5 Over a week Newbie friendliness 35/100
directus/docs#726 · 3 comments ·
Maintainers usually reply within 2 days
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ranxianglei/billion-context#7597 ·
Maintainers usually reply within 1 day
-
kubernetes-ingestor: fetchCRDMapping() runs even when crossplane.enabled is false, logging a 403 ERROR every runPossibly taken @kc9ddi claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TeraSky-OSS/backstage-plugins#228 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
zmkfirmware/zmk#3571 ·
Maintainers usually reply within 10 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
[Windows] Hidden title bar: a maximized window restored from minimized on a secondary monitor gets the primary monitor's work area as its client areaPossibly taken @lijy91 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
libnativeapi/nativeapi#53 · 1 reaction ·
Maintainers usually reply within 1 day