---
title: "How to call report API"
slug: "guides-how-to-call-report-api"
updated: 2022-06-08T09:01:39Z
published: 2022-06-08T09:01:39Z
canonical: "developer.comm100.com/guides-how-to-call-report-api"
---
> ## Documentation Index
> Fetch the complete documentation index at: https://developer.comm100.com/llms.txt
> Use this file to discover all available pages before exploring further.
# How to call report API
### Comm100 Reports
Comm100 provides robust reports which focus on the data and metrics that matter most to your chat quality, agent performance, visitor satisfaction, Chatbot performance, Ticketing & Messaging performance so that you can make informed decisions for improvement. You can login to control panel with comm100 account to check details. To learn more for reports, see [this article](https://dash11.comm100.io/kb/100/f9627b0c-6ff8-45c5-bdf5-b627f234d9bf/a/e2391eb1-1d42-40c6-8d3e-ff8a89a0148b/comm100-reports).
### Comm100 Report API
The comm100 report APIs allow you to share data seamlessly with third party systems. To learn more, check out [report API reference](/docs/reporting).
### Prerequisites to call report API:
1.All report API is using the same end point reportingquery/reports/query, for exmple if you're on the US ent platform(dash12.comm100.io), the full endpoint would be https://api12.comm100.io/v4/reportingquery/reports/query. 2.Call Method is POST 3.The **JSON** request payload is required, different report needs to use different request payload.There're **two ways** to get the JSON request payload:
- 3.1. We have provided report API examples for different reports, check out [report API reference](/docs/server-api-reporting-report) to get the JSON request payload for corresponding report and adjust properly based your own need. 
- 3.2. You can also login to Comm100 [control panel](https://secure.comm100.com/login.aspx), open browser Devtools(right click the mouse ->Inspect ->Network) and Navigate to report, take Live Chat chat volume as example, you follow the similar steps to get JSON request payload for other reports: a) Right click mouse **Inspect ->Network tab.** b) Navigate to **Reporting->Live Chat ->Chat Volume ->By Time -> Display by Day and select "site“** (you can also select Campaign, Department). c) Filter by **"query"** and find name **"query?siteid={your siteID}"**, then **Payload -> Request Payload->view source**. If you find multiple **"query?siteid={your siteID}"**, mean have navigated multiple reports, you need check the request payload to find the correct one you want to use. d) Once click the **view source**, then scroll down, then you double click mouse to select whole JSON request payload and copy. If find **Show more** which mean request payload not displayed completely, click the **Show more**, double click mouse to select whole JSON request payload and copy.



**Once you finish the prerequisites to call report API, you can proceed the following to call the report API**
### POSTMAN to call report API
1. Log in to [Postman](https://www.postman.com/).
2. Go to **New > Request ** to create the reuqest.(Menu might be differect on different Postman version)
3. Select the **POST** method and provide the API request URL. The following example requests a **Chat Volume** report API: **https://api12.comm100.io/v4/reportingquery/reports/query?siteid=10100000**
**Note:When using API key to call the interface, you need to bring the parameter siteId**
4. Go to the **Authorization** tab and choose the authentication type as **Basic Auth** as [API Key authentication](/docs/guides-how-to-connect-with-api-key-authentication) or Oauth 2.0 as [Oauth authentication](/docs/guides-how-to-connect-with-oauth-authentication)
5. Go to the **Headers** tab, input key as **"Content-Type"** and value as **"application/json"**
6. Go to the **Body** tab, select **Raw -> JSON(application/json)**, input JSON request payload which you can get it based on **[Prerequisites to call report API](/docs/guides-how-to-call-report-api#prerequisites-to-call-report-api)**.
7. Click **Send**.
Note:You can use "Beautify" function to format the JSON request payload.


### CURL to call report API
```
curl https://api12.comm100.io/v4/reportingquery/reports/query \
-X 'POST' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D ''{"cubeEntities":[{"name":"Chat","fields":[{"name":"chats","calculationType":"count","valueType":"int","expression":"","fieldName":"Status","conditionExpression":"Status0","conditions":[{"name":"Status0","fieldName":"Status","operate":"equals","values":["0"]}]},{"name":"missedChats","calculationType":"count","valueType":"int","expression":"","fieldName":"Status","conditionExpression":"missedChatStatus","conditions":[{"name":"missedChatStatus","fieldName":"Status","operate":"equals","values":["2","3"]}]},{"name":"refusedChats","calculationType":"count","valueType":"int","expression":"","fieldName":"Status","conditionExpression":"refusedChatStatus","conditions":[{"name":"refusedChatStatus","fieldName":"Status","operate":"equals","values":["1"]}]},{"name":"chatRequests","calculationType":"expression","valueType":"int","expression":"chats + missedChats + refusedChats","fieldName":"","conditionExpression":"","conditions":[]},{"name":"chatAcceptanceRate","calculationType":"expression","valueType":"percent","expression":"chats / chatRequests","fieldName":"","conditionExpression":"","conditions":[]},{"name":"time","calculationType":"originalValue","valueType":"string","expression":"","fieldName":"","conditionExpression":"","conditions":[]}],"rowGroups":[{"name":"time","fieldName":"RequestedTime","isFull":true,"timeDisplayType":"day"}],"filters":[{"fieldName":"RequestedTime","matchType":"between","value":["2021/03/25","2021/04/23"]}]},{"name":"VisitsStatistics","fields":[{"name":"visits","calculationType":"sum","valueType":"int","expression":"","fieldName":"VisitCount","conditionExpression":"","conditions":[]}],"rowGroups":[{"name":"time","fieldName":"LogTime","isFull":true,"timeDisplayType":"day"}],"filters":[{"fieldName":"LogTime","matchType":"between","value":["2021/03/25","2021/04/23"]}]}],"mergeType":"column","timezone":-420}'
'
```