# Dashboard

# Agents Time Metrics and Usage Statistics

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

###  **Description**

This endpoint retrieves detailed time usage statistics for each agent, showing how much time was spent in different states such as talking, paused, available, and more. It also includes general usage averages across all agents.

## 🔗 **URL**

#### https://**DOMAIN**.croco-dial.net/goAPIv2/goDashboard/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%;"><colgroup> <col style="width: 23%;"></col> <col style="width: 20%;"></col> <col style="width: 57%;"></col> </colgroup><thead><tr><td>**Parameter**</td><td>**Value**</td><td>**Description**</td></tr></thead><tbody><tr><td>goAction</td><td>agentTimeUsage</td><td>Action to perform.</td></tr><tr><td>goUser</td><td>MyUser</td><td>API authorized user.</td></tr><tr><td>goPass</td><td>MyPass</td><td>Authorized user's password.</td></tr><tr><td>responsetype</td><td>json/xml</td><td>Format of the response (`json` recommended).</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/goDashboard/goAPI.php?goAction=agentTimeUsage&goUser=MyUser&goPass=MyPass&responsetype=json"

```

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

If you prefer to send the data as form parameters:

```bash
curl -X POST "https://DOMAIN.croco-dial.net/goAPIv2/goDashboard/goAPI.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "goAction=agentTimeUsage" \
  --data-urlencode "goUser=MyUser" \
  --data-urlencode "goPass=MyPass" \
  --data-urlencode "responsetype=json"

```

####  **Example Response**

```json
{
  "result": "success",
  "data": {
    "breakdown": [
      {
        "user": "john.doe",
        "first_login": 0,
        "last_logoff": 0,
        "login_time": 14.0,
        "after_call": 0,
        "break": 12.0,
        "pausa": 0,
        "avalible": 30.0,
        "talk": 37.14,
        "wrapup": 0,
        "cust_leave": 0,
        "total_calls": 25,
        "pause": 15.0,
        "ready": 25.0
      },
      {
        "user": "jane.smith",
        "first_login": 0,
        "last_logoff": 0,
        "login_time": 140,
        "after_call": 0,
        "break": 18.0,
        "pausa": 0,
        "avalible": 42.0,
        "talk": 57.54,
        "wrapup": 0,
        "cust_leave": 2,
        "total_calls": 30,
        "pause": 12.5,
        "ready": 30.5
      },
      ...
    ],
    "general": {
      "pause": 13.75,
      "ready": 27.75,
      "talk": 38.0
    }
  }
}

```

# Get Agents Availability Overview

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

###  **Description**

This endpoint retrieves the current status of agents in the system, including how many are connected, paused, ready, in a call, or offline.

## 🔗 **URL**

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

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

### **📝 Body Parameters**  


<table border="1" id="bkmrk-parameter-value-desc" style="border-collapse: collapse; width: 100%;"><colgroup> <col style="width: 25%;"></col> <col style="width: 25%;"></col> <col style="width: 50%;"></col> </colgroup><thead><tr><td>**Parameter**</td><td>**Value**</td><td>**Description**</td></tr></thead><tbody><tr><td>goAction</td><td>getAgentStatus</td><td>Action to perform. This parameter specifies the exact operation the API should execute.</td></tr><tr><td>goUser</td><td>MyUser</td><td>API authorized user.</td></tr><tr><td>goPass</td><td>MyPass</td><td>Authorized user's password.</td></tr><tr><td>responsetype</td><td>json/xml</td><td>Format of the response (`json` recommended).</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/goDashboard/goAPI.php?goAction=getAgentStatus&goUser=MyUser&goPass=MyPass&responsetype=json"
```

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

If you prefer to send the data as form parameters:

```bash
curl -X POST "https://DOMAIN.croco-dial.net/goAPIv2/goDashboard/goAPI.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "goAction=getAgentStatus" \
  --data-urlencode "goUser=MyUser" \
  --data-urlencode "goPass=MyPass" \
  --data-urlencode "responsetype=json"

```

####  **Example Response**

```json
{
  "result": "success",
  "data": {
    "total_live_agents": 61,
    "paused_agents": 9,
    "ready_agents": 24,
    "incall_agents": 28,
    "offline_agents": 42,
    "total_active_agents": 102
  }
}

```

# Get Total Number of Agents Currently in Call

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

###  **Description**

This endpoint retrieves the **total number of agents currently handling calls**. It specifically looks for agents that are in the following states: InCall, Queue, 3-Way and Park. Is perfect for **real-time monitoring** of agent activity. It allows you to quickly know how many agents are currently in action.

## 🔗 **URL**

#### https://**DOMAIN**.croco-dial.net/goAPIv2/goDashboard/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%;"><colgroup> <col style="width: 23%;"></col> <col style="width: 20%;"></col> <col style="width: 57%;"></col> </colgroup><thead><tr><td>**Parameter**</td><td>**Value**</td><td>**Description**</td></tr></thead><tbody><tr><td>goAction</td><td>goGetTotalAgentsCall</td><td>Action to perform.</td></tr><tr><td>goUser</td><td>MyUser</td><td>API authorized user.</td></tr><tr><td>goPass</td><td>MyPass</td><td>Authorized user's password.</td></tr><tr><td>responsetype</td><td>json/xml</td><td>Format of the response (`json` recommended).</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/goDashboard/goAPI.php?goAction=goGetTotalAgentsCall&goUser=MyUser&goPass=MyPass&responsetype=json"

```

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

If you prefer to send the data as form parameters:

```bash
curl -X POST "https://DOMAIN.croco-dial.net/goAPIv2/goDashboard/goAPI.php" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "goAction=goGetTotalAgentsCall" \
  --data-urlencode "goUser=MyUser" \
  --data-urlencode "goPass=MyPass" \
  --data-urlencode "responsetype=json"

```

####  **Example Response**

```json
{
    "result": "success",
    "data": 23
}

```