Update resource.json#2798
Conversation
Updating a device_tag via the documented API, changed ALL tags to the new value. The proposed change does what it actually is supposed to do.
|
Hi @MCFurry , curl -X GET "https://api.balena-cloud.com/v6/device_tag?\$filter=(tag_key%20eq%20'stats.last_application_start')%20and%20(device%20eq%2012506355)" -H "Content-Type: application/json" -H "Authorization: Bearer <...>" |
|
Could you please amend your commit (not the PR description) and add a |
| "method": "PATCH", | ||
| "endpoint": "/v6/device_tag", | ||
| "filters": "?\\$filter=(tag_key%20eq%20'<EXISTING-KEY>')%20and%20(device%20eq%20<DEVICE_ID>)", | ||
| "endpoint": "/v6/device_tag(<TAG-ID>)", |
There was a problem hiding this comment.
Optional-idea: As an additional/alternative suggestion, it might be more convenient to suggest using the composite ID notation, which is also save against unescaped $filters.
| "endpoint": "/v6/device_tag(<TAG-ID>)", | |
| "endpoint": "/v6/device_tag(device=<DEVICE_ID>,tag_key='<EXISTING-KEY>'", |
If you prefer having the numeric ID variant as well, but also like my suggestion you can add it as a separate example by coping the current one and using a different id and summary.
Eg: "id": "update-tag-by-natural-key", "summary": "Update a device tag by device id and tag_key"
|
A repository maintainer needs to approve these workflow run(s). To approve, maintainers can either: • Submit an approval review on this pull request, OR • Submit a review comment starting with Then re-run the failed job(s) via the Checks tab above. Reviews must be on the specific commit SHA of the workflow run to be considered. |
Updating a device_tag via the documented API, changed ALL tags to the new value. The proposed change does what it actually is supposed to do.