Assets Resource

GET /assets

Returns the list of all the Assets that published some data for the account of the currently connected user. For each returned Asset, the Asset ID and timestamp of its last received message will be returned.

Request Parameters
name type description default constraints
limit query Maximum number of entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. 50 required
offset query Starting offset for the entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. 0 required
Response Body
media type data type description
application/json AssetsResult (JSON) The list of requested Asset objects.
application/xml assetsResult (XML)

Example

Request
GET /assets
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "assetInfo" : [ {
    "asset" : "...",
    "lastMessageOn" : 12345
  }, {
    "asset" : "...",
    "lastMessageOn" : 12345
  } ]
}
                
              

GET /assets/{asset}/count

Returns the count of all the Messages that the specified asset published.

Request Parameters
name type description default
asset path  
endDate query End date of the date range requested. The parameter is expressed as a long counting the number of milliseconds since January 1, 1970, 00:00:00 GMT. If not specified it means current time. Alternatively, the date can be expressed as a string following the ISO 8601 format. 0
startDate query Start date of the date range requested. The parameter is expressed as a long counting the number of milliseconds since January 1, 1970, 00:00:00 GMT. If not specified it means no start date. Alternatively, the date can be expressed as a string following the ISO 8601 format. 0
Response Body
media type data type description
application/json CountResult (JSON) The count of requested Messages.
application/xml countResult (XML)

Example

Request
GET /assets/{asset}/count
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "count" : 12345
}
                
              

GET /assets/{asset}/topics

Returns the list of all the Topic that the specified asset published under. For each returned Topic, the topic and timestamp of its last received message will be returned.

Request Parameters
name type description default constraints
asset path    
limit query Maximum number of entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. 50 required
offset query Starting offset for the entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. 0 required
prefix query  
Response Body
media type data type description
application/json TopicsResult (JSON) The list of requested Topic objects.
application/xml topicsResult (XML)

Example

Request
GET /assets/{asset}/topics
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "topicInfo" : [ {
    "edcTopic" : {
      "systemTopic" : true,
      "edcTopic" : true,
      "alertTopic" : true,
      "account" : "...",
      "asset" : "...",
      "semanticTopic" : "...",
      "leafName" : "...",
      "parentTopic" : "...",
      "grandParentTopic" : "...",
      "fullTopic" : "...",
      "topicParts" : [ "...", "..." ]
    },
    "lastMessageOn" : 12345,
    "topic" : "..."
  }, {
    "edcTopic" : {
      "systemTopic" : true,
      "edcTopic" : true,
      "alertTopic" : true,
      "account" : "...",
      "asset" : "...",
      "semanticTopic" : "...",
      "leafName" : "...",
      "parentTopic" : "...",
      "grandParentTopic" : "...",
      "fullTopic" : "...",
      "topicParts" : [ "...", "..." ]
    },
    "lastMessageOn" : 12345,
    "topic" : "..."
  } ]
}