-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update resource.json #2798
base: master
Are you sure you want to change the base?
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 |
@@ -543,8 +543,7 @@ | |||
"summary": "Update a device tag", | |||
"description": "", | |||
"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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 $filter
s.
"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"
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.