Platform API

<back to all web services

LogDeviceStatuses

Logs multiple device event details. Details include an event(crash,error,unexpected result) and the device status at the time of the event.

Requires Authentication
LogDeviceStatuses Parameters:
NameParameterData TypeRequiredDescription
DeviceStatusesqueryintYesA list of logged event statuses for a device.
LogDeviceStatus Parameters:
NameParameterData TypeRequiredDescription
ApplianceIdqueryGuidYesGuid of the Appliance this Device is logging an event status for.
DeviceIdqueryGuidYesGuid representing the saved Device
LatitudequerydoubleYesThe latitude the device was last located at.
LongitudequerydoubleYesThe longitude the device was last located at.
EventNamequerystringNoName of the event we're logging.
EventDetail1querystringNoDetails of the event up to (255 char).
EventDetail2querystringNoDetails of the event up to (255 char).
EventDetail3querystringNoDetails of the event up to (255 char).
EventDetail4querystringNoDetails of the event up to (255 char).
EventDetail5querystringNoDetails of the event up to (255 char).
OrientationquerystringNoDetails of the event up to (255 char).
InternetConnectionStatusquerystringNoThe device internet connection status.
LogquerystringNoUnlimited text field for logging details of the event.
EventqueryDateTimeNoDate and Time of the event.
IsInPortraitqueryboolNoTrue if the device is in portrait mode.
IsInLandscapequeryboolNoTrue if the device is in landscape mode.
CellularDataEnabledqueryboolNoTrue if cellular data is enabled.
DataRoamingEnabledqueryboolNoTrue if data roaming is enabled.
IsNetworkAvailablequeryboolNoTrue if the network is available.
CanSendSMSqueryboolNoTrue if the device can send an sms.
BatteryChargingqueryboolNoTrue if the battery is charging.
BatteryLevelqueryintNoThe amount of battery life left as a percentage.
MediaFileId1queryGuidNoThe Guid of a saved Media Object.
MediaFileId2queryGuidNoThe Guid of a saved Media Object.

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /xml/reply/LogDeviceStatuses HTTP/1.1 
Host: pfapi.pstpf.com.au 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<LogDeviceStatuses xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Canvara.WebAPIModel.ServiceModel">
  <DeviceStatuses>
    <LogDeviceStatus>
      <ApplianceId>00000000-0000-0000-0000-000000000000</ApplianceId>
      <BatteryCharging>false</BatteryCharging>
      <BatteryLevel>0</BatteryLevel>
      <CanSendSMS>false</CanSendSMS>
      <CellularDataEnabled>false</CellularDataEnabled>
      <DataRoamingEnabled>false</DataRoamingEnabled>
      <DeviceId>00000000-0000-0000-0000-000000000000</DeviceId>
      <Event>0001-01-01T00:00:00</Event>
      <EventDetail1>String</EventDetail1>
      <EventDetail2>String</EventDetail2>
      <EventDetail3>String</EventDetail3>
      <EventDetail4>String</EventDetail4>
      <EventDetail5>String</EventDetail5>
      <EventName>String</EventName>
      <InternetConnectionStatus>String</InternetConnectionStatus>
      <IsInLandscape>false</IsInLandscape>
      <IsInPortrait>false</IsInPortrait>
      <IsNetworkAvailable>false</IsNetworkAvailable>
      <Latitude>0</Latitude>
      <Log>String</Log>
      <Longitude>0</Longitude>
      <MediaFileId1>00000000-0000-0000-0000-000000000000</MediaFileId1>
      <MediaFileId2>00000000-0000-0000-0000-000000000000</MediaFileId2>
      <Orientation>String</Orientation>
    </LogDeviceStatus>
  </DeviceStatuses>
</LogDeviceStatuses>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ResponseStatus xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <ErrorCode>String</ErrorCode>
  <Message>String</Message>
  <StackTrace>String</StackTrace>
  <Errors>
    <ResponseError>
      <ErrorCode>String</ErrorCode>
      <FieldName>String</FieldName>
      <Message>String</Message>
      <Meta xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>String</d4p1:Key>
          <d4p1:Value>String</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
      </Meta>
    </ResponseError>
  </Errors>
  <Meta xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>String</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </Meta>
</ResponseStatus>