---
# System prepended metadata

title: aiellobackendapi-Dashboard

---

## AielloBackendAPI-Dashnoard

### Introduction
The User API provides functionality to manage user information within our application.

### Base URL
Production: https://aiello-gate.azure-api.net/aiellobackendapi-dashboard/v1
Beta: https://aiello-gate.azure-api.net/aiellobackendapi-dashboard/beta
Dev: https://aiello-gate-test.azure-api.net/aiellobackendapi-dashboard

### Authentication
Ocp-Apim-Subscription-Key : 


## Endpoint
### Task Overview
#### **POST**　`/hotels/{hotelName}/overview`

#### Request
##### Body:
```json
{
    "locations":["String","String"], //If it's null, calculate tasks for all locations, excluding 9999, 9998...
    "startTime":1687425097487L, //Required
    "endTime":1699425097487L //Required
}
```




#### Response:
HTTP Status: 200 OK
##### Body:

```json
[
	{
		"configTaskId": 55,
		"name": "Test01",
		"overview": {
			"counts": 0,
			"duration": null,
			"avg_duration": null,
			"avg_rate": null
		}
	},
	{
		"configTaskId": 59,
		"name": "Test03",
		"overview": {
			"counts": 0,
			"duration": null,
			"avg_duration": null,
			"avg_rate": null
		}
	},
	{
		"configTaskId": 243,
		"name": "In-Room Delivery",
		"overview": {
			"counts": 7,
			"duration": 2000,
			"avg_duration": 666,
			"avg_rate": null
		}
	}
]
```
#### Error
401 Unauthorized: Missing or invalid authentication.
404 Not Found: User not found.
##### Response when Elasticsearch error

```json
[{
    "configTaskId": 244,
    "name": "Repair",
    "overview": null
  },
  {
    "configTaskId": 246,
    "name": "Laundry",
    "overview": {
      "counts": 0,
      "duration": null,
      "hold": null,
      "in-progress": null,
      "avg_duration": null,
      "avg_rate": null
    }
  }]
```
---

### TaskDetail
#### **POST**　`/hotels/{hotelName}/taskDetail`
#### Request
##### Body:
```json
{
    "locations":["String","String"], //If it's null, calculate tasks for all locations, excluding 9999, 9998...
    "configTaskId": Integer, //Required
    "startTime":1687425097487L, //Required
    "endTime":1699425097487L //Required
}
```
#### Response:
HTTP Status: 200 OK
##### Body:

```json
{
	"taskDetail": {
		"configTaskId": 243,
		"taskName": "In-Room Delivery",
		"overviewAndStatus": {
			"counts": 7,
			"status": {
				"COMPLETED": 3,
				"CANCEL": 0,
				"OPEN": 4,
				"ISSUE": 0
			},
			"rate_counts": 0,
			"has_issue_counts": 0,
			"avg_rate": null,
			"duration": 2000,
			"avg_duration": 666
		}
	},
	"worksDetail": [
		{
			"configWorkId": 340,
			"workName": "Satisfaction Survey",
			"workOrder": 1,
			"timeTracking": {
				"counts": 3,
				"avg_hold": 0,
				"avg_ongoing": 0,
				"avg_duration": 261
			}
		},
		{
			"configWorkId": 339,
			"workName": "Delivery Process",
			"workOrder": 0,
			"timeTracking": {
				"counts": 3,
				"avg_hold": 0,
				"avg_ongoing": 0,
				"avg_duration": 978882
			}
		}
	]
}
```
#### Error
401 Unauthorized: Missing or invalid authentication.
404 Not Found: User not found.
500 Can't find this task  //wrong configTaskId
##### Response when Elasticsearch error
```json
{
  "taskDetail": {
    "configTaskId": 243,
    "taskName": "In-Room Delivery",
    "overviewAndStatus": null
  },
  "worksDetail": [
    {
      "configWorkId": 339,
      "workName": "Delivery Process",
      "workOrder": 0,
      "timeTracking": {
        "counts": 3,
        "duration": 2936648,
        "hold": 0,
        "in-progress": 0,
        "avg_duration": 978882
      }
    },
    {
      "configWorkId": 340,
      "workName": "Satisfaction Survey",
      "workOrder": 1,
      "timeTracking": null
    }
  ]
}
```

---

### TaskTrend
#### **POST**　`/hotels/{hotelName}/taskTrend`
#### Request
##### Body:
```json
{
    "configTaskIds": ["total","String"], //Required, total for all task
    "locations":["String","String"], //If it's null, calculate tasks for all locations, excluding 9999, 9998...
    "startTime":1687425097487L, //Required
    "endTime":1699425097487L, //Required
    "offset": -28800000 //Required
    // "interval":"String", //Default 1d
}
```
 
*  interval
    * minute, 1m
    * hour, 1h
    * day, 1d
    * week, 1w
    * month, 1M
    * quarter, 1q
    * year, 1y
        
#### Response:
HTTP Status: 200 OK
##### Body:

example 1
```json
[
	{
		"configTaskId": "total",
		"diagramByHour": [
			{
				"key_as_string": "2023-07-09T16:00:00.000+08:00",
				"key": 1688889600000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-09T17:00:00.000+08:00",
				"key": 1688893200000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-09T18:00:00.000+08:00",
				"key": 1688896800000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-09T19:00:00.000+08:00",
				"key": 1688900400000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-09T20:00:00.000+08:00",
				"key": 1688904000000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-09T21:00:00.000+08:00",
				"key": 1688907600000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-09T22:00:00.000+08:00",
				"key": 1688911200000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-09T23:00:00.000+08:00",
				"key": 1688914800000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-10T00:00:00.000+08:00",
				"key": 1688918400000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-10T01:00:00.000+08:00",
				"key": 1688922000000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-10T02:00:00.000+08:00",
				"key": 1688925600000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-10T03:00:00.000+08:00",
				"key": 1688929200000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-10T04:00:00.000+08:00",
				"key": 1688932800000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-10T05:00:00.000+08:00",
				"key": 1688936400000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-10T06:00:00.000+08:00",
				"key": 1688940000000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-10T07:00:00.000+08:00",
				"key": 1688943600000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-10T08:00:00.000+08:00",
				"key": 1688947200000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-10T09:00:00.000+08:00",
				"key": 1688950800000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-10T10:00:00.000+08:00",
				"key": 1688954400000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-10T11:00:00.000+08:00",
				"key": 1688958000000,
				"doc_count": 1
			},
			{
				"key_as_string": "2023-07-10T12:00:00.000+08:00",
				"key": 1688961600000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-10T13:00:00.000+08:00",
				"key": 1688965200000,
				"doc_count": 1
			},
			{
				"key_as_string": "2023-07-10T14:00:00.000+08:00",
				"key": 1688968800000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-10T15:00:00.000+08:00",
				"key": 1688972400000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-10T16:00:00.000+08:00",
				"key": 1688976000000,
				"doc_count": 0
			}
		],
		"diagramByDay": null,
		"diagramByMonth": null,
		"diagramWeekDay": [
			{
				"key": "FRIDAY",
				"doc_count": 0
			},
			{
				"key": "MONDAY",
				"doc_count": 2
			},
			{
				"key": "SATURDAY",
				"doc_count": 0
			},
			{
				"key": "SUNDAY",
				"doc_count": 0
			},
			{
				"key": "THURSDAY",
				"doc_count": 0
			},
			{
				"key": "TUESDAY",
				"doc_count": 0
			},
			{
				"key": "WEDNESDAY",
				"doc_count": 0
			}
		],
		"diagramForEachHour": [
			{
				"key": 0.0,
				"doc_count": 0
			},
			{
				"key": 1.0,
				"doc_count": 0
			},
			{
				"key": 2.0,
				"doc_count": 0
			},
			{
				"key": 3.0,
				"doc_count": 0
			},
			{
				"key": 4.0,
				"doc_count": 0
			},
			{
				"key": 5.0,
				"doc_count": 0
			},
			{
				"key": 6.0,
				"doc_count": 0
			},
			{
				"key": 7.0,
				"doc_count": 0
			},
			{
				"key": 8.0,
				"doc_count": 0
			},
			{
				"key": 9.0,
				"doc_count": 0
			},
			{
				"key": 10.0,
				"doc_count": 0
			},
			{
				"key": 11.0,
				"doc_count": 1
			},
			{
				"key": 12.0,
				"doc_count": 0
			},
			{
				"key": 13.0,
				"doc_count": 1
			},
			{
				"key": 14.0,
				"doc_count": 0
			},
			{
				"key": 15.0,
				"doc_count": 0
			},
			{
				"key": 16.0,
				"doc_count": 0
			},
			{
				"key": 17.0,
				"doc_count": 0
			},
			{
				"key": 18.0,
				"doc_count": 0
			},
			{
				"key": 19.0,
				"doc_count": 0
			},
			{
				"key": 20.0,
				"doc_count": 0
			},
			{
				"key": 21.0,
				"doc_count": 0
			},
			{
				"key": 22.0,
				"doc_count": 0
			},
			{
				"key": 23.0,
				"doc_count": 0
			}
		]
	}
]
```

example 2
```json
[
	{
		"configTaskId": "total",
		"diagramByHour": null,
		"diagramByDay": [
			{
				"key_as_string": "2023-07-09T00:00:00.000+08:00",
				"key": 1688832000000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-10T00:00:00.000+08:00",
				"key": 1688918400000,
				"doc_count": 2
			},
			{
				"key_as_string": "2023-07-11T00:00:00.000+08:00",
				"key": 1689004800000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-12T00:00:00.000+08:00",
				"key": 1689091200000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-13T00:00:00.000+08:00",
				"key": 1689177600000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-14T00:00:00.000+08:00",
				"key": 1689264000000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-15T00:00:00.000+08:00",
				"key": 1689350400000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-16T00:00:00.000+08:00",
				"key": 1689436800000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-17T00:00:00.000+08:00",
				"key": 1689523200000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-18T00:00:00.000+08:00",
				"key": 1689609600000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-19T00:00:00.000+08:00",
				"key": 1689696000000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-20T00:00:00.000+08:00",
				"key": 1689782400000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-21T00:00:00.000+08:00",
				"key": 1689868800000,
				"doc_count": 1
			},
			{
				"key_as_string": "2023-07-22T00:00:00.000+08:00",
				"key": 1689955200000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-23T00:00:00.000+08:00",
				"key": 1690041600000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-24T00:00:00.000+08:00",
				"key": 1690128000000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-25T00:00:00.000+08:00",
				"key": 1690214400000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-26T00:00:00.000+08:00",
				"key": 1690300800000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-27T00:00:00.000+08:00",
				"key": 1690387200000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-28T00:00:00.000+08:00",
				"key": 1690473600000,
				"doc_count": 6
			},
			{
				"key_as_string": "2023-07-29T00:00:00.000+08:00",
				"key": 1690560000000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-30T00:00:00.000+08:00",
				"key": 1690646400000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-07-31T00:00:00.000+08:00",
				"key": 1690732800000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-08-01T00:00:00.000+08:00",
				"key": 1690819200000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-08-02T00:00:00.000+08:00",
				"key": 1690905600000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-08-03T00:00:00.000+08:00",
				"key": 1690992000000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-08-04T00:00:00.000+08:00",
				"key": 1691078400000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-08-05T00:00:00.000+08:00",
				"key": 1691164800000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-08-06T00:00:00.000+08:00",
				"key": 1691251200000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-08-07T00:00:00.000+08:00",
				"key": 1691337600000,
				"doc_count": 17
			},
			{
				"key_as_string": "2023-08-08T00:00:00.000+08:00",
				"key": 1691424000000,
				"doc_count": 0
			},
			{
				"key_as_string": "2023-08-09T00:00:00.000+08:00",
				"key": 1691510400000,
				"doc_count": 0
			}
		],
		"diagramByMonth": [
			{
				"key_as_string": "2023-07-01T00:00:00.000+08:00",
				"key": 1688140800000,
				"doc_count": 9
			},
			{
				"key_as_string": "2023-08-01T00:00:00.000+08:00",
				"key": 1690819200000,
				"doc_count": 17
			}
		],
		"diagramWeekDay": [
			{
				"key": "FRIDAY",
				"doc_count": 7
			},
			{
				"key": "MONDAY",
				"doc_count": 19
			},
			{
				"key": "SATURDAY",
				"doc_count": 0
			},
			{
				"key": "SUNDAY",
				"doc_count": 0
			},
			{
				"key": "THURSDAY",
				"doc_count": 0
			},
			{
				"key": "TUESDAY",
				"doc_count": 0
			},
			{
				"key": "WEDNESDAY",
				"doc_count": 0
			}
		],
		"diagramForEachHour": [
			{
				"key": 0.0,
				"doc_count": 0
			},
			{
				"key": 1.0,
				"doc_count": 0
			},
			{
				"key": 2.0,
				"doc_count": 0
			},
			{
				"key": 3.0,
				"doc_count": 0
			},
			{
				"key": 4.0,
				"doc_count": 0
			},
			{
				"key": 5.0,
				"doc_count": 0
			},
			{
				"key": 6.0,
				"doc_count": 0
			},
			{
				"key": 7.0,
				"doc_count": 0
			},
			{
				"key": 8.0,
				"doc_count": 0
			},
			{
				"key": 9.0,
				"doc_count": 0
			},
			{
				"key": 10.0,
				"doc_count": 0
			},
			{
				"key": 11.0,
				"doc_count": 1
			},
			{
				"key": 12.0,
				"doc_count": 0
			},
			{
				"key": 13.0,
				"doc_count": 3
			},
			{
				"key": 14.0,
				"doc_count": 13
			},
			{
				"key": 15.0,
				"doc_count": 8
			},
			{
				"key": 16.0,
				"doc_count": 0
			},
			{
				"key": 17.0,
				"doc_count": 0
			},
			{
				"key": 18.0,
				"doc_count": 1
			},
			{
				"key": 19.0,
				"doc_count": 0
			},
			{
				"key": 20.0,
				"doc_count": 0
			},
			{
				"key": 21.0,
				"doc_count": 0
			},
			{
				"key": 22.0,
				"doc_count": 0
			},
			{
				"key": 23.0,
				"doc_count": 0
			}
		]
	}
]
```
#### Error
401 Unauthorized: Missing or invalid authentication.
404 Not Found: User not found.


---

### TaskLogExport
#### **POST**　`/hotels/{hotelName}/export/task?offset={offset}&startTime={startTime}&endTime={endTime}`
#### Request

##### Parameter
* offset  (milliSecond)
* starTime  (milliSecond)
* endTime  (milliSecond)
##### Body:
```json
{
    "password": "String", //Required, password for open excel file
    "locations":["String","String"] //If it's null, calculate tasks for all locations, excluding 9999, 9998...
}
```
 
        
#### Response:
HTTP Status: 200 OK

**BATCH_THRESHOLD** : default is 60000


If the number of logs does not exceed the **BATCH_THRESHOLD**, will return excel file.
If the number of logs exceed the **BATCH_THRESHOLD**, will return a zip file which contain several excel files.


---

### VoiceIntentExport
#### **POST**　`/hotels/{hotelName}/export/voiceIntent?offset={offset}&startTime={startTime}&endTime={endTime}`
#### Request

##### Parameter
* offset  (milliSecond)
* starTime  (milliSecond)
* endTime  (milliSecond)
##### Body:
```json
{
    "password": "String", //Required, password for open excel file
    "locations":["String","String"] //If it's null, calculate tasks for all locations, excluding 9999, 9998...
}
```
 
        
#### Response:
HTTP Status: 200 OK

**BATCH_THRESHOLD** : default is 60000


If the number of logs does not exceed the **BATCH_THRESHOLD**, will return excel file.
If the number of logs exceed the **BATCH_THRESHOLD**, will return a zip file which contain several excel files.