GET, POST | /configuration/objects/{ObjectIds}/devices |
---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DeviceInfoEntity:
id: int = 0
description: Optional[str] = None
name: Optional[str] = None
load_order: int = 0
node_id: Optional[str] = None
node_name: Optional[str] = None
protocol_id: int = 0
protocol_name: Optional[str] = None
connection_string: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DeviceInfoGetResponse:
devices: Optional[Dict[int, DeviceInfoEntity]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DeviceInfoGetRequest:
object_ids: Optional[List[str]] = None
Python 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 } } }