Historical Data Access

Executes a saved historic report and returns the results as structured data.

This endpoint is useful for pulling time-bounded call activity into external systems, generating custom exports, or feeding downstream reporting pipelines.

The report to execute is identified by its report_id, which corresponds to a report configured within the CCaaS platform.

The request body defines the output format and any report-specific parameters such as the time window or agent filter.


Endpoint

POST /rest/api/v1/historic-data/{report_id}

Path Parameters

ParameterTypeRequiredDescription
report_idstringYesThe unique identifier of the report to execute

Headers

HeaderValueRequiredDescription
Content-Typeapplication/jsonYesResponse returned as JSON
AuthorizationBearerYesThe Service User API bearer token
Host<hostname>.xima.cloudYesThe FQDN

Request Body

FieldTypeRequiredDescription
formatstringYesOutput format for the report; accepted values: JSON, CSV, HTML, XLS, PDF
parametersarrayYesList of report parameter objects; contents vary by report type

Parameter Object

Each object in the parameters array contains a name and a value.


Report Timeframe

FieldTypeDescription
namestringMust be "Report Timeframe"
value.typestringMust be "REPORT_TIMEFRAME"
value.formattedstringHuman-readable label for the timeframe
value.startstring (ISO 8601)Start of the reporting window; including timezone offset
value.endstring (ISO 8601)End of the reporting window; including timezone offset

Request

POST /rest/api/v1/historic-data/{report_id} HTTP/1.1
Host: <hostname>.xima.cloud
Content-Type: application/json
Authorization: Bearer <api_bearer_token>

{
    "format": "JSON",
    "parameters": [
        {
            "name": "Report Timeframe",
            "value": {
                "type": "REPORT_TIMEFRAME",
                "formatted": "Tuesday, June 2, 2026 12:00:00 AM - Tuesday, June 2, 2026 11:59:59 PM",
                "start": "2026-06-02T00:00:00-06:00",
                "end": "2026-06-03T00:00:00-06:00"
            }
        },
        {
            "name": "Rows (Agent)",
            "value": {
                "type": "PBX_USERS",
                "pbxUsers": [
                    {
                        "key": "Agent_001(999)"
                    }
                ]
            }
        }
    ]
}
curl -L -X POST 'https://<hostname>.xima.cloud/rest/api/v1/historic-data/{report_id}' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <api_bearer_token>' \
-d '{
    "format": "JSON",
    "parameters": [
        {
            "name": "Report Timeframe",
            "value": {
                "type": "REPORT_TIMEFRAME",
                "formatted": "Tuesday, June 2, 2026 12:00:00 AM - Tuesday, June 2, 2026 11:59:59 PM",
                "start": "2026-06-02T00:00:00-06:00",
                "end": "2026-06-03T00:00:00-06:00"
            }
        },
        {
            "name": "Rows (Agent)",
            "value": {
                "type": "PBX_USERS",
                "pbxUsers": [
                    {
                        "key": "Agent_001(999)"
                    }
                ]
            }
        }
    ]
}'

Response

Returns a JSON object containing the report results. The structure of the response varies based on the report type and the format specified in the request body.