Traffic Control API
The Traffic Control API is a RESTful API that provides access to real-time and historical queue size data for the Vonage Traffic Control service. The API allows you to retrieve the current queue size for a specific product, as well as historical queue size data for a specific product over a specified date range.
Available Operations
Authentication
| Key | Description | Where | Example |
|---|---|---|---|
| Authorization | Base64 encoded API key and secret joined by a colon. | Headers | Basic <base64> |
100/v0.1/vtc/queues/product/sms/currentExample Response
{
"_embedded": {
"data": {
"queue_size": 100
}
},
"_links": {
"self": {
"href": "/v0.1/vtc/queues/product/sms/current",
"templated": false
}
}
}Authentication
| Key | Description | Where | Example |
|---|---|---|---|
| Authorization | Base64 encoded API key and secret joined by a colon. | Headers | Basic <base64> |
302024-06-12T15:59:22.870Z/v0.1/vtc/queues/product/sms/historical?start_date=2024-06-12T15:59:22.870Z&end_date=2024-06-12T15:59:42.870ZExample Response
{
"_embedded": {
"historical_data": [
{
"queue_size": 30,
"timestamp": "2024-06-12T15:59:22.870Z"
}
]
},
"_links": {
"self": {
"href": "/v0.1/vtc/queues/product/sms/historical?start_date=2024-06-12T15:59:22.870Z&end_date=2024-06-12T15:59:42.870Z",
"templated": false
}
}
}Errors
The following is a non-exhaustive list of error codes that may occur while using this API.
These codes are in addition to any of our generic error codes.
| Code | Information |
|---|---|
| throttled | Your request rate exceeds the allowed limit for this account. |
| internal-error | An internal error occurred. Please try again later. |
| invalid-product | Path parameter |
| invalid-date-format | Invalid date format. Please provide the |
| missing-query-param | One or more required query parameters was not specified. |