Skip to content

Post topics

API Endpoint

Application Method Service
IED Post http://ie-dps-communication-broker:\/dps/api/v2/topics

Post Topics in DPS

Using DPS APIs, application needs to post user first before posting topics. The request parameter is used when configuring the topics in DPS.

Parameter Name Data Type Mandatory/Optional(IED) Description
userParams - - Object Mandatory Data model of application parameters
appParms - Object Mandatory Data model of application parameters
appid String Mandatory Instance name of the application that is used to post user on the Databus using DPS API
device_name String Mandatory Name of the device (IED) on which the application is installed
credential - Object Mandatory Data model of credential
username String Mandatory Name of the user to be created on the Databus to publish or subscribe the data
password String Mandatory The corresponding password of the user created on Databus
topics_info - - array Mandatory Its a array String
- topicName String Mandatory Name of the topic created on the Databus
- topicDetails String Optional Details of the topic created on the Databus
- permission enum Mandatory permission to the topic:
  • subscribe
  • both
  • none
  • - permissionOthers enum Optional It is the permission provided by the owner of the topic, for other users on that topic
    - metadata String Mandatory -

    Sample Request

    { "userParams": { "appParams": { "appId": "app1", "deviceName": "abhiyanta1" }, "credential": { "userName": "admin", "password": "admin123" } }, "topicsInfo": [ { "topicName": "/topic/1", "topicDetails": "Test topic", "permission": "both", "permissionOthers": "subscribe", "metadata": "{}" } ] }

    Response Parameter

    The response parameter received when configuring topics 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 "0" as the request is post user
    totalDataset Integer total data set value is set "0" as the request is post user
    responseData String Response data is set to "0" 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": { "code": 451, "description": "invalid Schema" }, "message": "Error message from code", "jobId": "", "responseData": {}, "severity": "error", "status": "failed", "timeStamp": "2023-08-01T12:34:56.000Z" }