GET, POST | /configuration/objects/{ObjectIds}/devices |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Bazefield.Configuration.WebService.Request
Imports Bazefield.Configuration.WebService.Response
Imports Bazefield.Configuration.Entity
Namespace Global
Namespace Bazefield.Configuration.Entity
Public Partial Class DeviceInfoEntity
Public Overridable Property Id As Integer
Public Overridable Property Description As String
Public Overridable Property Name As String
Public Overridable Property LoadOrder As Integer
Public Overridable Property NodeId As Guid
Public Overridable Property NodeName As String
Public Overridable Property ProtocolId As Integer
Public Overridable Property ProtocolName As String
Public Overridable Property ConnectionString As String
End Class
End Namespace
Namespace Bazefield.Configuration.WebService.Request
Public Partial Class DeviceInfoGetRequest
Public Sub New()
ObjectIds = New List(Of String)
End Sub
Public Overridable Property ObjectIds As List(Of String)
End Class
End Namespace
Namespace Bazefield.Configuration.WebService.Response
Public Partial Class DeviceInfoGetResponse
Public Sub New()
Devices = New Dictionary(Of Integer, DeviceInfoEntity)
End Sub
Public Overridable Property Devices As Dictionary(Of Integer, DeviceInfoEntity)
End Class
End Namespace
End Namespace
VB.NET DeviceInfoGetRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /configuration/objects/{ObjectIds}/devices HTTP/1.1
Host: monitoring.ox2.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
objectIds:
[
String
]
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { devices: { 0: { id: 0, description: String, name: String, loadOrder: 0, nodeName: String, protocolId: 0, protocolName: String, connectionString: String } } }