Qubicle Crossbar Reporting API

Introduction

This API provides a method for querying various reporting data from the Qubicle system. Data can be queried based on a date range, and in a variety of data periods.

Parameters

  • report: The report to run
  • start_date: iso8601 format date for beginning of reporting period
  • end_date: iso8601 format date for the end of reporting period (optional will use current date if not specified)
  • period: the time period to condense metrics down to for rendering the report, can be “daily”, “weekly”, or “monthly” (defaults to daily)
  • metrics: a list of the reporting metrics to return (see report specific information below) if not set all will be returned
  • identifiers: a list of ids corresponding to the entities to generate the report for
  • queue_ids: for RECIPIENT report only, a list of queue-id’s to filter and return queue specific values
  • format: the format to return the data in, options are “json” and “csv”, json is the default

Queue Report

“report”: “queues”

The queue report will provide various metrics for one or many queues.

Available Metrics

  • avg_wait: The average wait time per day
  • call_count: The number of calls per day
  • timeout_count: The number of calls that have timed out of queue per day
  • abandon_count: The number of calls that were abandoned per day

Recipient Report

“report”: “recipients”

The recipients report will provide various metrics for one or many recipients.

Available Metrics

  • call_count: The count of call the recipient handled
  • missed_call_count: The count of missed calls the recipient had (calls that were not answered)
  • rejected_call_count: The count of rejected calls the recipient had (call that were explicitly rejected)
  • avg_call_duration: The average duration of the calls the recipient took
  • avg_ring_duration: The average amount of time calls rang the recipient prior to being answered

Examples

Daily Queue Reports

Daily reports are the most granular offered at this time. When running a daily report for a large timeframe, keep in mind that the dataset returned could be very large.

POST /v2/accounts/{ACCOUNT_ID}/qubicle_reports

curl -v -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_reports -d '{"data":{"report":"queues", "start_date":"2017-01-01", "end_date":"2017-01-10", "period": "daily", "metrics": ["call_count"], "identifiers": ["{QUEUE_ID_1}"]}}'
{
    "data":[
        {
            "execution_times": {
                "load": {DOCUMENT_LOAD_TIME},
                "filter": {FILTER_TIME},
                "render": {RENDER_TIME}
            },
            "report": [
                {
                    "id": "{QUEUE_ID_1}",
                    "data": {
                        "call_count": {
                            "20170101": {COUNT1},
                            "20170102": {COUNT2},
                            "20170103": {COUNT3},
                            "20170104": {COUNT4},
                            "20170105": {COUNT5},
                            "20170106": {COUNT6},
                            "20170107": {COUNT7},
                            "20170108": {COUNT8},
                            "20170109": {COUNT9},
                            "20170110": {COUNT10}
                        }
                    }
                }
            ]
        }
    ],
    "request_id":"{REQUEST_ID}",
    "status":"success",
    "auth_token":"{AUTH_TOKEN}"
}

Weekly Queue Reports

When rendering weekly period reports, the data will be returned for each week tagged with the year and week number. NOTE weeks start on Sunday. Also note that in the event a date range is specified that results in incomplete weeks the values will reflect that, in the example below the last week (starting on 20170129) will only contain the data for 3 days (29th, 30th, 31st).

POST /v2/accounts/{ACCOUNT_ID}/qubicle_reports

curl -v -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_reports -d '{"data":{"report": "queues", "start_date":"2017-01-01", "end_date":"2017-01-31", "period": "weekly", "metrics": ["call_count"], "identifiers": ["{QUEUE_ID_1}"]}}'
{
    "data":[
        {
            "execution_times": {
                "load": {DOCUMENT_LOAD_TIME},
                "filter": {FILTER_TIME},
                "render": {RENDER_TIME}
            },
            "report": [
                {
                    "id": "{QUEUE_ID_1}",
                    "data": {
                        "call_count": {
                            "201701": {COUNT1},
                            "201702": {COUNT2},
                            "201703": {COUNT3},
                            "201704": {COUNT4},
                            "201705": {COUNT5}
                        }
                    }
                }
            ]
        }
    ],
    "request_id":"{REQUEST_ID}",
    "status":"success",
    "auth_token":"{AUTH_TOKEN}"
}

Monthly Queue Reports

Monthly reports provide a very high level view. Keep in mind that the returned data is constrained by the MoDB retention period, so there may not be a lot of historical information. The data is returned with the year and month number as the key. Date ranges that are not complete months will return data in the same manner as the weekly report.

POST /v2/accounts/{ACCOUNT_ID}/qubicle_reports/queues/

curl -v -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/qubicle_reports -d '{"data":{"report": "queues", "start_date":"2017-01-01", "end_date":"2017-03-31", "period": "monthly", "metrics": ["call_count"], "identifiers": ["{QUEUE_ID_1}"]}}'
{
    "data":[
        {
            "execution_times": {
                "load": {DOCUMENT_LOAD_TIME},
                "filter": {FILTER_TIME},
                "render": {RENDER_TIME}
            },
            "report": [
                {
                    "id": "{QUEUE_ID_1}",
                    "data": {
                        "call_count": {
                            "201701": {COUNT1},
                            "201702": {COUNT2},
                            "201703": {COUNT3}
                        }
                    }
                }
            ]
        }
    ],
    "request_id":"{REQUEST_ID}",
    "status":"success",
    "auth_token":"{AUTH_TOKEN}"
}

On this page