docs(attributes): unified attribute-request API across MQTT/HTTP/CoAP/gateway#529
Open
ShvaykaD wants to merge 2 commits into
Open
docs(attributes): unified attribute-request API across MQTT/HTTP/CoAP/gateway#529ShvaykaD wants to merge 2 commits into
ShvaykaD wants to merge 2 commits into
Conversation
…HTTP/CoAP - device & gateway MQTT, HTTP, CoAP attribute-request pages, plus edge mirrors - document fetch-all per scope (MQTT: empty value; HTTP/CoAP: allClientKeys/allSharedKeys) - replace non-working mosquitto sub/pub request examples with mqtt.js emulators - fix invalid gateway client/shared array example; deprecate legacy client/key/keys - add request-parameter tables; remove stale 'overlapping keys' note - all examples verified against a live instance
17 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the ThingsBoard documentation to describe a unified attribute-request API behavior across MQTT/HTTP/CoAP and the Gateway API, including “fetch all” semantics and scope-separated responses, and adds runnable Node/mqtt.js example scripts referenced from the docs.
Changes:
- Documented per-scope “fetch all” behavior (
""for MQTT/Gateway keys,allClientKeys/allSharedKeysfor HTTP/CoAP) and clarified scope exclusion rules. - Updated Gateway attribute request/response docs to use
clientKeys/sharedKeysand describe scope-separated responses. - Added downloadable mqtt.js scripts for device and gateway attribute requests and linked them from the docs.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/content/_includes/docs/reference/mqtt-api/attributes.mdx | Adds field semantics and a mqtt.js example for MQTT attribute requests. |
| src/content/_includes/docs/reference/http-api/attributes.mdx | Clarifies HTTP attribute read endpoint and adds allClientKeys/allSharedKeys parameters. |
| src/content/_includes/docs/reference/coap-api/attributes.mdx | Clarifies CoAP attribute read endpoint and adds allClientKeys/allSharedKeys parameters. |
| src/content/_includes/docs/reference/gateway-api/attributes.mdx | Updates Gateway attribute request docs to clientKeys/sharedKeys, scope-separated response, and adds mqtt.js example. |
| src/content/_includes/docs/edge/reference/apis-and-sdks/mqtt-api.mdx | Mirrors unified MQTT attribute-request semantics for Edge docs and adds an additional example. |
| src/content/_includes/docs/edge/reference/apis-and-sdks/http-api.mdx | Notes Edge HTTP “get attributes” supports allClientKeys/allSharedKeys. |
| src/content/_includes/docs/edge/reference/apis-and-sdks/coap-api.mdx | Notes Edge CoAP “get attributes” supports allClientKeys/allSharedKeys. |
| src/content/_includes/docs/edge/reference/apis-and-sdks/gateway-mqtt-api.mdx | Updates Edge gateway MQTT attribute request docs and adds a Node/mqtt.js example. |
| src/content/_includes/docs/edge/reference/apis-and-sdks/device-api.mdx | Adds short MQTT attribute-request guidance for Edge Device/Gateway topics. |
| public/resources/docs/reference/mqtt-api/mqtt-js-attributes-request.js | Adds a downloadable mqtt.js script for device attribute requests. |
| public/resources/docs/reference/gateway-api/mqtt-js-gateway-attributes-request.js | Adds a downloadable mqtt.js script for gateway attribute requests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…attribute-request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Documents the unified attribute-request API introduced in thingsboard/thingsboard#15865:
clientKeys/sharedKeysvalue returns the whole scope; HTTP/CoAP:allClientKeys=true/allSharedKeys=truequery params; Gateway: a request carrying only{id, device}returns both scopes.{"client": {...}, "shared": {...}}(the legacyvalue/valuesform is preserved and noted as deprecated).mqtt.jsNode emulator so they actually run end to end.Pages updated
docs/reference/{mqtt-api,http-api,coap-api,gateway-api}/attributes.mdxdocs/edge/reference/apis-and-sdks/{mqtt-api,http-api,coap-api,gateway-mqtt-api,device-api}.mdx_includes/.../mqtt-js-attributes-request.js,mqtt-js-gateway-attributes-request.jsRelated