| All Verbs | /qry/configurations/devices |
|---|
package dtos
type DeviceOperationalStatus int
const (
DeviceOperationalStatusActive DeviceOperationalStatus = 1
DeviceOperationalStatusDeactivated DeviceOperationalStatus = 2
DeviceOperationalStatusRetired DeviceOperationalStatus = 3
)
type Ref struct {
Id string `json:"id"`
Val string `json:"val"`
}
type ProductReference struct {
Id *string `json:"id,omitempty"`
Value *string `json:"value,omitempty"`
Category *string `json:"category,omitempty"`
ProductProvider *Ref `json:"productProvider,omitempty"`
}
type ProductInstanceRef struct {
Id *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Title *string `json:"title,omitempty"`
Product *ProductReference `json:"product,omitempty"`
}
type GPSCoordinates struct {
Lat float64 `json:"lat,omitempty"`
Lng float64 `json:"lng,omitempty"`
}
type Address struct {
Street string `json:"street"`
City string `json:"city"`
State string `json:"state"`
PostalCode string `json:"postalCode"`
Country Ref `json:"country"`
Gps GPSCoordinates `json:"gps"`
Data RecordDictionary[string, string] `json:"data"`
}
type LocationRef struct {
Id *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Group *Ref `json:"group,omitempty"`
Region *Ref `json:"region,omitempty"`
Address *Address `json:"address,omitempty"`
IntegrationsData *RecordDictionary[string, string] `json:"integrationsData,omitempty"`
}
type OrganizationRef struct {
Id *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Address *Address `json:"address,omitempty"`
IntegrationsData *RecordDictionary[string, string] `json:"integrationsData,omitempty"`
}
type DeviceConfiguration struct {
Id *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
IsActive bool `json:"isActive,omitempty"`
IsRetired bool `json:"isRetired,omitempty"`
OperationalStatus DeviceOperationalStatus `json:"operationalStatus,omitempty"`
ProductInstances *RecordList[ProductInstanceRef] `json:"productInstances,omitempty"`
TimeZone *Ref `json:"timeZone,omitempty"`
Currency *Ref `json:"currency,omitempty"`
Language *Ref `json:"language,omitempty"`
Location *LocationRef `json:"location,omitempty"`
Organization *OrganizationRef `json:"organization,omitempty"`
}
type GetDeviceConfiguration struct {
Id *string `json:"id,omitempty"`
}
type RecordList[T any] []T
type RecordDictionary[TKey any, TVal any] map[TKey]TVal
Go GetDeviceConfiguration 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 /qry/configurations/devices HTTP/1.1
Host: api.bettor.webhop.biz
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
id: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
id: String,
name: String,
isActive: False,
isRetired: False,
operationalStatus: 2,
productInstances:
[
{
id: String,
name: String,
title: String,
product:
{
id: String,
value: String,
category: String,
productProvider:
{
id: String,
val: String
}
}
}
],
timeZone:
{
id: String,
val: String
},
currency:
{
id: String,
val: String
},
language:
{
id: String,
val: String
},
location:
{
id: String,
name: String,
group:
{
id: String,
val: String
},
region:
{
id: String,
val: String
},
address:
{
street: String,
city: String,
state: String,
postalCode: String,
country:
{
id: String,
val: String
},
gps:
{
lat: 0,
lng: 0
},
data:
{
String: String
}
},
integrationsData:
{
String: String
}
},
organization:
{
id: String,
name: String,
address:
{
street: String,
city: String,
state: String,
postalCode: String,
country:
{
id: String,
val: String
},
gps:
{
lat: 0,
lng: 0
},
data:
{
String: String
}
},
integrationsData:
{
String: String
}
}
}