Platform API

<back to all web services

LogDeviceStatus

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

Requires Authentication
"use strict";
export class LogDeviceStatus {
    /** @param {{ApplianceId?:string,DeviceId?:string,Latitude?:number,Longitude?:number,EventName?:string,EventDetail1?:string,EventDetail2?:string,EventDetail3?:string,EventDetail4?:string,EventDetail5?:string,Orientation?:string,InternetConnectionStatus?:string,Log?:string,Event?:string,IsInPortrait?:boolean,IsInLandscape?:boolean,CellularDataEnabled?:boolean,DataRoamingEnabled?:boolean,IsNetworkAvailable?:boolean,CanSendSMS?:boolean,BatteryCharging?:boolean,BatteryLevel?:number,MediaFileId1?:string,MediaFileId2?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Guid of the Appliance this Device is logging an event status for. */
    ApplianceId;
    /**
     * @type {string}
     * @description Guid representing the saved Device */
    DeviceId;
    /**
     * @type {number}
     * @description The latitude the device was last located at. */
    Latitude;
    /**
     * @type {number}
     * @description The longitude the device was last located at. */
    Longitude;
    /**
     * @type {string}
     * @description Name of the event we're logging. */
    EventName;
    /**
     * @type {string}
     * @description Details of the event up to (255 char). */
    EventDetail1;
    /**
     * @type {string}
     * @description Details of the event up to (255 char). */
    EventDetail2;
    /**
     * @type {string}
     * @description Details of the event up to (255 char). */
    EventDetail3;
    /**
     * @type {string}
     * @description Details of the event up to (255 char). */
    EventDetail4;
    /**
     * @type {string}
     * @description Details of the event up to (255 char). */
    EventDetail5;
    /**
     * @type {string}
     * @description Details of the event up to (255 char). */
    Orientation;
    /**
     * @type {string}
     * @description The device internet connection status. */
    InternetConnectionStatus;
    /**
     * @type {string}
     * @description Unlimited text field for logging details of the event. */
    Log;
    /**
     * @type {string}
     * @description Date and Time of the event. */
    Event;
    /**
     * @type {boolean}
     * @description True if the device is in portrait mode. */
    IsInPortrait;
    /**
     * @type {boolean}
     * @description True if the device is in landscape mode. */
    IsInLandscape;
    /**
     * @type {boolean}
     * @description True if cellular data is enabled. */
    CellularDataEnabled;
    /**
     * @type {boolean}
     * @description True if data roaming is enabled. */
    DataRoamingEnabled;
    /**
     * @type {boolean}
     * @description True if the network is available. */
    IsNetworkAvailable;
    /**
     * @type {boolean}
     * @description True if the device can send an sms. */
    CanSendSMS;
    /**
     * @type {boolean}
     * @description True if the battery is charging. */
    BatteryCharging;
    /**
     * @type {number}
     * @description The amount of battery life left as a percentage. */
    BatteryLevel;
    /**
     * @type {string}
     * @description The Guid of a saved Media Object. */
    MediaFileId1;
    /**
     * @type {string}
     * @description The Guid of a saved Media Object. */
    MediaFileId2;
}

JavaScript LogDeviceStatus DTOs

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

HTTP + CSV

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

POST /csv/reply/LogDeviceStatus HTTP/1.1 
Host: pfapi.pstpf.com.au 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"ApplianceId":"00000000-0000-0000-0000-000000000000","DeviceId":"00000000-0000-0000-0000-000000000000","Latitude":0,"Longitude":0,"EventName":"String","EventDetail1":"String","EventDetail2":"String","EventDetail3":"String","EventDetail4":"String","EventDetail5":"String","Orientation":"String","InternetConnectionStatus":"String","Log":"String","Event":"0001-01-01T00:00:00.0000000","IsInPortrait":false,"IsInLandscape":false,"CellularDataEnabled":false,"DataRoamingEnabled":false,"IsNetworkAvailable":false,"CanSendSMS":false,"BatteryCharging":false,"BatteryLevel":0,"MediaFileId1":"00000000-0000-0000-0000-000000000000","MediaFileId2":"00000000-0000-0000-0000-000000000000"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}