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

/** @description Logs details of an event(crash,error,unexpected result) and the device status at the time of the event. */
// @Api(Description="Logs details of an event(crash,error,unexpected result) and the device status at the time of the event.")
export class LogDeviceStatus
{
    /** @description Guid of the Appliance this Device is logging an event status for. */
    // @ApiMember(DataType="Guid", Description="Guid of the Appliance this Device is logging an event status for.", IsRequired=true, Name="ApplianceId", ParameterType="query")
    public ApplianceId: string;

    /** @description Guid representing the saved Device */
    // @ApiMember(DataType="Guid", Description="Guid representing the saved Device", IsRequired=true, Name="DeviceId", ParameterType="query")
    public DeviceId: string;

    /** @description The latitude the device was last located at. */
    // @ApiMember(DataType="double", Description="The latitude the device was last located at.", IsRequired=true, Name="Latitude", ParameterType="query")
    public Latitude: number;

    /** @description The longitude the device was last located at. */
    // @ApiMember(DataType="double", Description="The longitude the device was last located at.", IsRequired=true, Name="Longitude", ParameterType="query")
    public Longitude: number;

    /** @description Name of the event we're logging. */
    // @ApiMember(DataType="string", Description="Name of the event we're logging.", Name="EventName", ParameterType="query")
    public EventName: string;

    /** @description Details of the event up to (255 char). */
    // @ApiMember(DataType="string", Description="Details of the event up to (255 char).", Name="EventDetail1", ParameterType="query")
    public EventDetail1: string;

    /** @description Details of the event up to (255 char). */
    // @ApiMember(DataType="string", Description="Details of the event up to (255 char).", Name="EventDetail2", ParameterType="query")
    public EventDetail2: string;

    /** @description Details of the event up to (255 char). */
    // @ApiMember(DataType="string", Description="Details of the event up to (255 char).", Name="EventDetail3", ParameterType="query")
    public EventDetail3: string;

    /** @description Details of the event up to (255 char). */
    // @ApiMember(DataType="string", Description="Details of the event up to (255 char).", Name="EventDetail4", ParameterType="query")
    public EventDetail4: string;

    /** @description Details of the event up to (255 char). */
    // @ApiMember(DataType="string", Description="Details of the event up to (255 char).", Name="EventDetail5", ParameterType="query")
    public EventDetail5: string;

    /** @description Details of the event up to (255 char). */
    // @ApiMember(DataType="string", Description="Details of the event up to (255 char).", Name="Orientation", ParameterType="query")
    public Orientation: string;

    /** @description The device internet connection status. */
    // @ApiMember(DataType="string", Description="The device internet connection status.", Name="InternetConnectionStatus", ParameterType="query")
    public InternetConnectionStatus: string;

    /** @description Unlimited text field for logging details of the event. */
    // @ApiMember(DataType="string", Description="Unlimited text field for logging details of the event.", Name="Log", ParameterType="query")
    public Log: string;

    /** @description Date and Time of the event. */
    // @ApiMember(DataType="DateTime", Description="Date and Time of the event.", Name="Event", ParameterType="query")
    public Event: string;

    /** @description True if the device is in portrait mode. */
    // @ApiMember(DataType="bool", Description="True if the device is in portrait mode.", Name="IsInPortrait", ParameterType="query")
    public IsInPortrait: boolean;

    /** @description True if the device is in landscape mode. */
    // @ApiMember(DataType="bool", Description="True if the device is in landscape mode.", Name="IsInLandscape", ParameterType="query")
    public IsInLandscape: boolean;

    /** @description True if cellular data is enabled. */
    // @ApiMember(DataType="bool", Description="True if cellular data is enabled.", Name="CellularDataEnabled", ParameterType="query")
    public CellularDataEnabled: boolean;

    /** @description True if data roaming is enabled. */
    // @ApiMember(DataType="bool", Description="True if data roaming is enabled.", Name="DataRoamingEnabled", ParameterType="query")
    public DataRoamingEnabled: boolean;

    /** @description True if the network is available. */
    // @ApiMember(DataType="bool", Description="True if the network is available.", Name="IsNetworkAvailable", ParameterType="query")
    public IsNetworkAvailable: boolean;

    /** @description True if the device can send an sms. */
    // @ApiMember(DataType="bool", Description="True if the device can send an sms.", Name="CanSendSMS", ParameterType="query")
    public CanSendSMS: boolean;

    /** @description True if the battery is charging. */
    // @ApiMember(DataType="bool", Description="True if the battery is charging.", Name="BatteryCharging", ParameterType="query")
    public BatteryCharging: boolean;

    /** @description The amount of battery life left as a percentage. */
    // @ApiMember(DataType="int", Description="The amount of battery life left as a percentage.", Name="BatteryLevel", ParameterType="query")
    public BatteryLevel: number;

    /** @description The Guid of a saved Media Object. */
    // @ApiMember(DataType="Guid", Description="The Guid of a saved Media Object.", Name="MediaFileId1", ParameterType="query")
    public MediaFileId1: string;

    /** @description The Guid of a saved Media Object. */
    // @ApiMember(DataType="Guid", Description="The Guid of a saved Media Object.", Name="MediaFileId2", ParameterType="query")
    public MediaFileId2: string;

    public constructor(init?: Partial<LogDeviceStatus>) { (Object as any).assign(this, init); }
}

TypeScript LogDeviceStatus DTOs

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

HTTP + JSV

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

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

{
	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-01,
	IsInPortrait: False,
	IsInLandscape: False,
	CellularDataEnabled: False,
	DataRoamingEnabled: False,
	IsNetworkAvailable: False,
	CanSendSMS: False,
	BatteryCharging: False,
	BatteryLevel: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

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