Legacy | Get Reservation List
Gets a list of device reservations, for the specified time range.
startTime and endTime
This operation returns all the reservations that are partly/fully in the period between startTime and endTime parameter values.
In other words, the list will contain reservations where the following conditions are true:
- reservation.endTime > startTime parameter
- reservation.startTime < endTime parameter
For example: In the following timeline, only reservations B, C, D, & F will be returned (reservation F must be on a different device):
Request syntax
Copy
https://mycloud.perfectomobile.com/services/reservations?operation=list&user=value&password=value&resourceIds=value1,..,valuen&startTime=value&endTime=value[&optionalParameter=value]
Parameters
Name | Type | Default | Description |
---|---|---|---|
user* | string |
|
The name of the user running the operation. |
password* | string |
|
The password for the user. |
admin | boolean | false | true to allow users with administrative credentials to get reservations list for users in their group. |
resourceIds* | string | true | A comma separated list of deviceId. |
startTime* | long |
|
The start time, in milliseconds from midnight January 1, 1970 ( Epoch/Unix Time) |
endTime* | long |
|
The end time, in milliseconds from midnight January 1, 1970 ( Epoch/Unix Time) |
reservedTo | string |
|
The user the device is reserved to. |
responseFormat | string | json | The format to use for the response. json, xml |
* Mandatory
Response
The standard ISO format used in the response is : [YYYY]-[MM]-[DD]T[hh]:[mm]:[ss]
Copy
JSON response
{
"info":{
"creationTime":{
"formatted":"2016-12-04T12:23:18Z",
"millis":"1480854198912" },
"modelVersion":"2.6.0.0",
"productVersion":"master",
"time":"2016-12-04T12:23:18Z" "items":"2" },
"reservations":{
"reservation":{
"id":"idA",
"resourceId":"deviceA",
"reservedTo":"userid",
"startTime":{
"formatted":"2016-12-04T12:00:55Z",
"millis":"1480852855000" },
"endTime":{
"formatted":"2016-12-04T14:50:55Z",
"millis":"1480863055000" },
"reservedBy":"userid",
"status":"STARTED",
"created":{
"formatted":"2016-12-04T11:51:25Z",
"millis":"1480852285588" },
"lastModified":{
"formatted":"1970-01-01T00:00:00Z",
"millis":"0" }
},
"reservation":{
"id":"idB",
"resourceId":"deviceB",
"reservedTo":"userid",
"startTime":{
"formatted":"2016-12-04T12:00:55Z",
"millis":"1480852855000" },
"endTime":{
"formatted":"2016-12-04T14:50:55Z",
"millis":"1480863055000" },
"reservedBy":"userid",
"status":"SCHEDULED",
"created":{
"formatted":"2016-12-04T11:51:25Z",
"millis":"1480852285588" },
"lastModified":{
"formatted":"1970-01-01T00:00:00Z",
"millis":"0"
}
}
}
}