Skip to content

docs(attributes): unified attribute-request API across MQTT/HTTP/CoAP/gateway#529

Open
ShvaykaD wants to merge 2 commits into
mainfrom
feature/docs-unified-attribute-request
Open

docs(attributes): unified attribute-request API across MQTT/HTTP/CoAP/gateway#529
ShvaykaD wants to merge 2 commits into
mainfrom
feature/docs-unified-attribute-request

Conversation

@ShvaykaD

Copy link
Copy Markdown
Contributor

Overview

Documents the unified attribute-request API introduced in thingsboard/thingsboard#15865:

  • Per-scope "fetch all" — MQTT: an empty clientKeys/sharedKeys value returns the whole scope; HTTP/CoAP: allClientKeys=true / allSharedKeys=true query params; Gateway: a request carrying only {id, device} returns both scopes.
  • Scope-separated gateway response{"client": {...}, "shared": {...}} (the legacy value/values form is preserved and noted as deprecated).
  • Verified examples — request/response snippets use the mqtt.js Node emulator so they actually run end to end.

Pages updated

  • docs/reference/{mqtt-api,http-api,coap-api,gateway-api}/attributes.mdx
  • docs/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.js

Related

…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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/allSharedKeys for HTTP/CoAP) and clarified scope exclusion rules.
  • Updated Gateway attribute request/response docs to use clientKeys/sharedKeys and 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.

Comment thread src/content/_includes/docs/edge/reference/apis-and-sdks/device-api.mdx Outdated
Comment thread src/content/_includes/docs/reference/mqtt-api/attributes.mdx
Comment thread src/content/_includes/docs/reference/gateway-api/attributes.mdx
@vvlladd28 vvlladd28 added the awaiting-product-merge Waiting for corresponding changes to be merged into the main product repository label Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-product-merge Waiting for corresponding changes to be merged into the main product repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants