Skip to main content

 

 
8x8 Support

Contact Center Historical Analytics API Responds with 400 Bad Request X-Tenant-Info Header Missing

Symptom

Contact Center Historical Analytics API responds with a 400 error, "Bad request: X-Tenant-Info header is missing."

{
    "message": "Bad request: X-Tenant-Info header is missing."
}

Applies To

  • Contact Center Historical Analytics Summary Report
  • Contact Center Historical Analytics Detailed Report

Resolution

  1. Identify your Contact Center tenant name. For information on how to do this, see: How to identify Contact Centre Tenant Name and Cluster.
  2. Add your tenant name as the value of the X-Tenant-Info header in your API Request. For example:
curl --location 'https://api.8x8.com/eu/analytics/cc/v6/historical-metrics/detailed-reports' \
--header 'X-Tenant-Info: myTenantName' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer myAccessToken' \
--data '{
    "type": "detailed-reports-interaction-details",
    "title": "detailed-reports-interaction-details",
    "dateRange": {
        "start": "2023-06-01T00:00:00.000Z",
        "end": "2023-06-02T00:00:00.000Z"
    }
}'

Cause

If the API is used for a multi-tenant customer the requests should contain "X-Tenant-Info" header variable where needs to specify the desired tenantId. The "X-Tenant-Info" header is not mandatory in case of a single tenant customer.

The following error messages could be returned when dealing with a multi-tenant customer:

  • If for a multi-tenant customer request the "X-Tenant-Info" header is not provided the HTTP 400 code along with "Bad request: X-Tenant-Info header is missing." message will be returned.
  • If a wrong tenantId is provided the HTTP 400 code along with "Bad request: Invalid value for X-Tenant-Info header." message will be returned.
  • Was this article helpful?