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.
Operaciones disponibles
Autenticación
| Clave | Descripción | Dónde | Ejemplo |
|---|---|---|---|
| Authorization | Clave API codificada en Base64 y secreto unidos por dos puntos. | Headers | Basic <base64> |
100/v0.1/vtc/queues/product/sms/currentEjemplo Respuesta
{
"_embedded": {
"data": {
"queue_size": 100
}
},
"_links": {
"self": {
"href": "/v0.1/vtc/queues/product/sms/current",
"templated": false
}
}
}Autenticación
| Clave | Descripción | Dónde | Ejemplo |
|---|---|---|---|
| Authorization | Clave API codificada en Base64 y secreto unidos por dos puntos. | 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.870ZEjemplo Respuesta
{
"_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
}
}
}Errores
La siguiente es una lista no exhaustiva de códigos de error que pueden producirse al utilizar esta API.
Estos códigos se suman a cualquiera de nuestros códigos de error genéricos.
| Código | Información |
|---|---|
| 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-provisioner-command | The path segment denoting the action to be performed is not valid. The only allowed actions are |
| invalid-date-format | Invalid date format. Please provide the |
| missing-query-param | One or more required query parameters was not specified. |