Querying Device Topics
Function
This API is used to query the topic name, ID, permission, and description.
URI
GET /v1/{project_id}/link/instances/{instance_id}/topics
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
project_id |
string |
Yes |
Project ID of each region of a tenant. |
instance_id |
string |
Yes |
ID of the ROMA Connect instance used by the tenant. |
device_name |
string |
Yes |
Device name based on which topics are queried. |
product_name |
string |
Yes |
Product name based on which topics are queried. |
Request
Request parameters
None
Example request
https://example.cloud.com/v1/80e2b******f4a398d6409a50932d917/link/instances/fb3b24ab-5d87-473d-9c57-fc6******6a1/topics?device_name=device01& product_name =product01
Response
Response parameters
The response parameter is an array element.
Parameter |
Type |
Description |
---|---|---|
Array elements |
Array<topic> |
Topic list information. |
Parameter |
Type |
Description |
---|---|---|
remark |
string |
Device description, which contains a maximum of 200 characters. |
topic_id |
integer |
Topic ID.
|
topic_name |
string |
Topic name. |
topic_perm |
string |
Permission of a topic. Only the pub and sub permissions are supported. |
Example response
[ { "remark": "Pub Topics", "topic_id": 122, "topic_name": "lozrWs4y7218/out/device01", "topic_perm": "pub" }, { "remark": "Sub Topics", "topic_id": 123, "topic_name": "lozrWs4y7218/in/device01", "topic_perm": "sub" }, { "remark": "Update Shadow Topic", "topic_id": 124, "topic_name": "shadow/update/lozrWs4y7218/device01", "topic_perm": "pub" } ]
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot