Bu endpoint ile ilgili servisinize ait trafik kullanım verilerini alabilirsiniz.
GET https://api.ni.net.tr/v2/traffic/data
| Parametre | Tip | Açıklama | Gereklilik |
|---|---|---|---|
| service_id | integer | Ürünler sorgusundan gelen servise ait id numarası | Zorunlu |
| month | integer | 0 : Şimdiki Ay / 1 : Geçmiş Ay / 3 : Üç Ay Önce | Zorunlu |
Trafik verileri byte tipinde dönmektedir.
{
"status": true,
"message": "Traffic Data",
"error": null,
//eğer burst ise response :
"data": {
"usage_type": "burst",
"tx_overflow": 3993134625000,
"rx_overflow": 11287110000,
"total_overflow": 4004421735000
},
//eğer monthly ise response :
"data": {
"usage_type": "monthly",
"tx_usage": 3993134625000,
"rx_usage": 11287110000,
"total_traffic_usage": 4004421735000,
"overage_bytes":11287110000,
}
}
Bu endpoint ile ilgili servisinize ait trafik grafiğini alabilirsiniz.
GET https://api.ni.net.tr/v2/traffic/graph
| Parametre | Tip | Açıklama | Gereklilik |
|---|---|---|---|
| service_id | integer | Ürünler sorgusundan gelen servise ait id numarası | Zorunlu |
| loop | integer | 1h: Canlı / 1d: Günlük / 30d: Aylık / 365d: Yıllık | Zorunlu |
Content-Type: image/png
<PNG binary data>