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.
Verfügbare Operationen
Authentifizierung
| Schlüssel | Beschreibung | Wo | Beispiel |
|---|---|---|---|
| Authorization | Base64-kodierter API-Schlüssel und Geheimnis, verbunden durch einen Doppelpunkt. | Headers | Basic <base64> |
100/v0.1/vtc/queues/product/sms/currentBeispiel Antwort
{
"_embedded": {
"data": {
"queue_size": 100
}
},
"_links": {
"self": {
"href": "/v0.1/vtc/queues/product/sms/current",
"templated": false
}
}
}Authentifizierung
| Schlüssel | Beschreibung | Wo | Beispiel |
|---|---|---|---|
| Authorization | Base64-kodierter API-Schlüssel und Geheimnis, verbunden durch einen Doppelpunkt. | 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.870ZBeispiel Antwort
{
"_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
}
}
}Fehler
Im Folgenden finden Sie eine nicht erschöpfende Liste von Fehlercodes, die bei der Verwendung dieser API auftreten können.
Diese Codes gelten zusätzlich zu unseren generische Fehlercodes.
| Code | Informationen |
|---|---|
| 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. |