Get topics¶
API Endpoint¶
| Application | Method | Service |
|---|---|---|
| IED | Get | http://ie-dps-communication-broker:\ |
Get Topics¶
Using DPS APIs, application needs to register itself first before getting topics. The request parameter used to get the list of topic in DPS.
| Parameter Name | Data Type | Mandatory/Optional(IED) | Description |
|---|---|---|---|
| appId | String | Mandatory | Path of the url |
| deviceName | String | Optional | Query of the url |
Sample Request¶
Response Parameter¶
The response parameter received to get the topic list in DPS.
| Parameter Name | Data Type | Description | |
|---|---|---|---|
| error code | - | Object | Error code the message |
| code | Integer | The response type code number | |
| description | String | The response type code description | |
| message | - | String | Description message about the response |
| jobID | - | String | Job information |
| responseData | - | Object | Response data of the requested topic |
| datasetNum | Integer | data set value is set "1" as the request is post user | |
| totalDataset | Integer | total data set value is set "1" as the request is post user | |
| responseData | String | Response data is set to "1" of the requested topic, as the request is post user | |
| severity | - | String | Information |
| status | - | String | Describes the status of the request. |
| timestamp | - | String | Timestamp of the response |
Sample Response¶
{
"errorCode": {},
"message": "got the topics info",
"jobId": "",
"responseData": {
"datasetNum": 1,
"totalDataset": 1,
"responseData": "{[{\"topicName\":
\"/topic/1\",\"userName\":\"user1\",\"permissionOthers\":
\"subscribe\",\"metadata\": \"{}\"}]"
},
"severity": "info",
"status": "success",
"timeStamp": "2023-08-01T12:34:56.000Z"
}
}
NoteUser1 has created a topic called topic1 so he automatically becomes a owner for it. There can be multiple users who can have the same topic but still user1 will always remain the owner of that topic.When User1(owner) deletes the topic1 then it wont show up on the GET topic call, even though other users have subscribed for topic1 and have topic1 present for them. After this the topic1 just becomes a placeholder for rest of the users as they cannot publish and subscribe data to this topic.