GET, POST | /configuration/objects/{ObjectIds}/devices |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class DeviceInfoGetRequest
{
public ArrayList<String> objectIds = null;
public ArrayList<String> getObjectIds() { return objectIds; }
public DeviceInfoGetRequest setObjectIds(ArrayList<String> value) { this.objectIds = value; return this; }
}
public static class DeviceInfoGetResponse
{
public HashMap<Integer,DeviceInfoEntity> devices = null;
public HashMap<Integer,DeviceInfoEntity> getDevices() { return devices; }
public DeviceInfoGetResponse setDevices(HashMap<Integer,DeviceInfoEntity> value) { this.devices = value; return this; }
}
public static class DeviceInfoEntity
{
public Integer id = null;
public String description = null;
public String name = null;
public Integer loadOrder = null;
public UUID nodeId = null;
public String nodeName = null;
public Integer protocolId = null;
public String protocolName = null;
public String connectionString = null;
public Integer getId() { return id; }
public DeviceInfoEntity setId(Integer value) { this.id = value; return this; }
public String getDescription() { return description; }
public DeviceInfoEntity setDescription(String value) { this.description = value; return this; }
public String getName() { return name; }
public DeviceInfoEntity setName(String value) { this.name = value; return this; }
public Integer getLoadOrder() { return loadOrder; }
public DeviceInfoEntity setLoadOrder(Integer value) { this.loadOrder = value; return this; }
public UUID getNodeId() { return nodeId; }
public DeviceInfoEntity setNodeId(UUID value) { this.nodeId = value; return this; }
public String getNodeName() { return nodeName; }
public DeviceInfoEntity setNodeName(String value) { this.nodeName = value; return this; }
public Integer getProtocolId() { return protocolId; }
public DeviceInfoEntity setProtocolId(Integer value) { this.protocolId = value; return this; }
public String getProtocolName() { return protocolName; }
public DeviceInfoEntity setProtocolName(String value) { this.protocolName = value; return this; }
public String getConnectionString() { return connectionString; }
public DeviceInfoEntity setConnectionString(String value) { this.connectionString = value; return this; }
}
}
Java 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 } } }