# Agent Activity Report

## <span style="color: rgb(2, 106, 73);">**API: exportAgentReport**</span>

### **Description**

This API provides detailed reporting data for agents over a specified date range. It returns various statistics such as activity times, call durations, and sales for individual users, as well as aggregated summaries for specific parameters.

## 🔗 **URL**

#### https://**DOMAIN**.croco-dial.net/goAPIv2/goReports/goAPI.php

<p class="callout info align-left">**Note:** Replace `DOMAIN` with the specific domain you want to query.</p>

### **📝 Required Parameters**

<table border="1" id="bkmrk-parameter-value-desc" style="border-collapse: collapse; width: 100%; height: 241.784px;"><colgroup><col style="width: 23.0008%;"></col><col style="width: 27.9976%;"></col><col style="width: 48.9896%;"></col></colgroup><thead><tr style="height: 29.7167px;"><td style="height: 29.7167px;">**Parameter**</td><td style="height: 29.7167px;">**Value**</td><td style="height: 29.7167px;">**Description**</td></tr></thead><tbody><tr style="height: 29.7167px;"><td style="height: 29.7167px;">goAction</td><td style="height: 29.7167px;">exportAgentReport</td><td style="height: 29.7167px;">Action to perform</td></tr><tr style="height: 29.7167px;"><td style="height: 29.7167px;">goUser</td><td style="height: 29.7167px;">MyUser</td><td style="height: 29.7167px;">API authorized user.</td></tr><tr style="height: 29.7167px;"><td style="height: 29.7167px;">goPass</td><td style="height: 29.7167px;">MyPass</td><td style="height: 29.7167px;">Authorized user's password.</td></tr><tr style="height: 31.0667px;"><td style="height: 31.0667px;">responsetype</td><td style="height: 31.0667px;">json/xml</td><td style="height: 31.0667px;">Format of the response (`json` recommended).</td></tr></tbody></table>

### **Optional Parameters**

<table border="1" id="bkmrk-parameter-value-desc-1" style="border-collapse: collapse; width: 100%; height: 241.784px;"><colgroup><col style="width: 23.0008%;"></col><col style="width: 27.9976%;"></col><col style="width: 48.9896%;"></col></colgroup><thead><tr style="height: 29.7167px;"><td style="height: 29.7167px;">**Parameter**</td><td style="height: 29.7167px;">**Value**</td><td style="height: 29.7167px;">**Description**</td></tr></thead><tbody><tr style="height: 31.0667px;"><td style="height: 31.0667px;">fromDate</td><td style="height: 31.0667px;">`YYYY-MM-DD`</td><td style="height: 31.0667px;">The start date for the report.</td></tr><tr style="height: 31.0667px;"><td style="height: 31.0667px;">toDate</td><td style="height: 31.0667px;">`YYYY-MM-DD`</td><td style="height: 31.0667px;">The end date for the report.</td></tr><tr style="height: 29.7167px;"><td style="height: 29.7167px;">user</td><td style="height: 29.7167px;">\['example.user1', 'example.user2'\]</td><td style="height: 29.7167px;">A list of specific users to include in the report.</td></tr></tbody></table>

**Note:** This endpoint uses body parameters for authentication instead of tokens or headers.

### **Request Examples:**

#### **GET:**

```bash
curl -X GET "https://DOMAIN.croco-dial.net/goAPIv2/goReports/goAPI.php?goAction=exportAgentReport&goUser=MyUser&goPass=MyPass&responsetype=json&fromDate=2025-05-01&toDate=2025-05-14&user=example.user1
```

#### **POST (Form Data)**

If you prefer to send the data as form parameters:

```bash
curl -X POST "https://DOMAIN.croco-dial.net/goAPIv2/goReports/goAPI.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "goAction=exportAgentReport" \
  --data-urlencode "goUser=MyUser" \
  --data-urlencode "goPass=MyPass" \
  --data-urlencode "responsetype=json" \
  --data-urlencode "fromDate=2025-05-09" \
  --data-urlencode "toDate=2025-05-10" \
  --data-urlencode "user[]=Example.User1" \
  --data-urlencode "user[]=Example.User2"
```

####  **Example Response**

```json
{
    "result": "success",
    "data": {
        "headers": [
            {
                "title": "User",
                "field": "user",
                "frozen": true
            },
            {
                "title": "First Activity",
                "field": "first_activity",
                "minWidth": 125
            },
           ...
        ],
        "rows": [
            {
                "user": "Example.User1",
                "portfolio": "CSC",
                "first_activity": "2025-05-05 10:39:25",
                "last_activity": "2025-05-05 20:00:41",
                "avalible": "6708",
                "avail_between_calls": "10",
                "talk": "21066",
                "avg_talk": "30",
                "talk_+_avail": "27774",
                "wp_sec": null,
                "aftercall": "2203",
                "total_calls": "684",
                "break": "3699",
                "pause": "6",
                "login_time": "33685",
                "sales": "3",
                "denied": "0",
                "lip": "0",
                "vrf": "0",
                "profile": "Servers"
            },
            {
                "user": "Example.User1",
                "portfolio": "GAL",
                "first_activity": "2025-05-05 12:06:13",
                "last_activity": "2025-05-05 20:57:27",
                "avalible": "5542",
                "avail_between_calls": "19",
                "talk": "15440",
                "avg_talk": "42",
                "talk_+_avail": "20982",
                "wp_sec": null,
                "aftercall": "3263",
                "total_calls": "299",
                "break": "6394",
                "pause": "125",
                "login_time": "30926",
                "sales": "4",
                "denied": "0",
                "lip": "0",
                "vrf": "0",
                "profile": "Mul Portfo"
            }
        ],
        "summary_headers": [
            {
                "title": "Type",
                "field": "type",
                "frozen": true
            },
            {
                "title": "Login Time",
                "field": "login_time"
            },
           ...
        ],
        "summary_rows": [
            {
                "type": "Summary",
                "user": 0,
                "portfolio": 0,
                "first_activity": 4050,
                "last_activity": 4050,
                "avalible": 12250,
                "avail_between_calls": 29,
                "talk": 36506,
                "avg_talk": 72,
                "talk_+_avail": 48756,
                "wp_sec": 0,
                "aftercall": 5466,
                "total_calls": 983,
                "break": 10093,
                "pause": 131,
                "login_time": 64611,
                "sales": 7,
                "denied": 0,
                "lip": 0,
                "vrf": 0,
                "profile": 0
            },
            {
                "type": "Average",
                "user": 0,
                "portfolio": 0,
                "first_activity": 2025,
                "last_activity": 2025,
                "avalible": 6125,
                "avail_between_calls": 14.5,
                "talk": 18253,
                "avg_talk": 36,
                "talk_+_avail": 24378,
                "wp_sec": 0,
                "aftercall": 2733,
                "total_calls": 491.5,
                "break": 5046.5,
                "pause": 65.5,
                "login_time": 32305.5,
                "sales": 3.5,
                "denied": 0,
                "lip": 0,
                "vrf": 0,
                "profile": 0
            },
            {
                "type": "Max",
                "user": 0,
                "portfolio": 0,
                "first_activity": 2025,
                "last_activity": 2025,
                "avalible": 5542,
                "avail_between_calls": 19,
                "talk": 15440,
                "avg_talk": 42,
                "talk_+_avail": 20982,
                "wp_sec": 0,
                "aftercall": 3263,
                "total_calls": 299,
                "break": 6394,
                "pause": 125,
                "login_time": 30926,
                "sales": 4,
                "denied": 0,
                "lip": 0,
                "vrf": 0,
                "profile": 0
            },
            {
                "type": "Min",
                "user": 0,
                "portfolio": 0,
                "first_activity": 2025,
                "last_activity": 2025,
                "avalible": 5542,
                "avail_between_calls": 10,
                "talk": 15440,
                "avg_talk": 30,
                "talk_+_avail": 20982,
                "wp_sec": 0,
                "aftercall": 2203,
                "total_calls": 299,
                "break": 3699,
                "pause": 6,
                "login_time": 30926,
                "sales": 3,
                "denied": 0,
                "lip": 0,
                "vrf": 0,
                "profile": 0
            }
        ]
    }
}
```