RetrieveDeviceStatusesByDeviceId

 

DeviceService / RetrieveDeviceStatusesByDeviceId

 

Description: Get device status history by device id

URL: http://{your-server-url}/api/v1/core/devices/{deviceid}/statuses

Method: GET

Token Required: True


Request Headers:
content-type: application/json or content-type: application/xml
token: {token}
currentaccountid: {accountid - optional and default value is user's own account}
Required Roles:

Portal Administrator, Account Administrator, Account Owner, Network Administrator

Rights:

Type: Nexus.AppSpace.Service.Contract.Model.Enums.Rights.Rights

Right Require
Network_Management Yes

Request Query Parameters:
Parameter Type Nullable Description
appids int[] True comma separated values, eg. appids=1,2,3
enddate string True format: yyyyMMddhhmm
status Contract.Model.Enums.Network.Status True device status
sort string True sorting fields: startdate, enddate, devicename. Comma seperated values, unary negative to imply descending sort order, e.g. sort=devicename,-starttime
page int True page number
rpp int True records per page, default = 50, max = 500
devicestatusids int[] True comma separated values, eg. devicestatusids=1,2,3
startdate string True format: yyyyMMddhhmm

Example: http://{your-server-url}/api/v1/core/devices/{deviceid}/statuses?appids=1,2,3&enddate=string&sort=string


Response:

Type: Nexus.AppSpace.Service.Contract.Messages.AppSpaceIntegration.v1.Device.DeviceResponse

Parameter Type
Response.DeviceStatuses Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.V1.Networks.PlayerStatus[]
Response.CurrentPage int
Response.TotalPages int
Response.Rpp int

Enums:
Field Name Values
PlayerType Nexus.AppSpace.Service.Contract.Model.Enums.Network.PlayerType Undefined = 0, Standard_Player = 1, Video_Wall_NEXMPV5 = 2, Cisco_DMP = 3, Video_Wall_NEXMPV6 = 4, Video_Wall_NEXMPV10 = 5, Video_Wall_NEXMPV12 = 6, Video_Wall_NEXMPV24 = 7, Others = 8
Status Nexus.AppSpace.Service.Contract.Model.Enums.Network.Status Online = 0, Offline = 1, Failed = 2, Communication_Lost = 3

The following is an example response Xml body:
<DeviceResponse xmlns="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Messages.AppSpaceIntegration.v1.Device" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <DebugMessage xmlns="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Messages">String</DebugMessage>
  <Errors xmlns="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Messages">
    <Error>
      <Code>String</Code>
      <Message>String</Message>
      <StackTrace>String</StackTrace>
    </Error>
  </Errors>
  <Status xmlns="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Messages">Success</Status>
  <CurrentPage>123</CurrentPage>
  <DeviceStatuses xmlns:a="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.v1.Networks">
    <a:PlayerStatus>
      <a:EndTime>2015-04-30T16:46:19.4464966Z</a:EndTime>
      <a:Id>123</a:Id>
      <a:PlayerId>123</a:PlayerId>
      <a:StartTime>2015-04-30T16:46:19.4464966Z</a:StartTime>
      <a:Status>Communication_Lost</a:Status>
    </a:PlayerStatus>
  </DeviceStatuses>
  <Rpp>123</Rpp>
  <TotalPages>123</TotalPages>
</DeviceResponse>

The following is an example response Json body:
{
	"DebugMessage":"String",
	"Errors":[
		{
			"Code":"String",
			"Message":"String",
			"StackTrace":"String"
		}
	],
	"Status":1,
	"CurrentPage":123,
	"DeviceStatuses":[
		{
			"EndTime":"\/Date(1430412379446)\/",
			"Id":123,
			"PlayerId":123,
			"StartTime":"\/Date(1430412379446)\/",
			"Status":3
		}
	],
	"Rpp":123,
	"TotalPages":123
}