Dokumentasi / AI Box Dan Software Analitik Video / Referensi API
API Traffic Monitor
API Traffic Monitor: jumlah, kelas, kecepatan dan nomor polisi kendaraan pada kamera di suatu ruas jalan. API ini memberikan volume dan trennya, analitik koridor (jam puncak, kecepatan, porsi kelas, arah datang), insiden (melaju terlalu cepat, melawan arah, kendaraan berhenti, kemacetan, temuan daftar pantau), log kendaraan dengan potongan gambar setiap lintasan, daftar pantau nomor polisi, dan umpan DATEX II v3 lokasi untuk pusat manajemen lalu lintas.
Kecepatan adalah perkiraan untuk manajemen lalu lintas; angka ini tidak dapat menjadi dasar penegakan hukum.
Data pribadi. Nomor polisi adalah data pribadi. Token hanya melihat nomor polisi dan potongan gambar dengan cakupan personal_data; tanpa cakupan itu, log, ekspornya dan insiden dijawab tanpa nomor polisi dan potongan gambar, serta pencarian nomor polisi dan daftar pantau ditolak. Pencarian nomor polisi dicatat di log audit.
Memanggil API
Sama seperti API platform: token akun API sebagai Authorization: Bearer <API_KEY>. Id lokasi dan kamera berasal dari API platform (GET /api/v1/sites, GET /api/v1/cameras). Setiap operasi menyebutkan siapa yang dapat memanggilnya dan cakupan yang diperlukan. Galat, waktu, halaman dan batas laju mengikuti API platform.
Umpan dengan Kredensialnya Sendiri
Dua operasi ditujukan bagi sistem lain dan memakai kredensialnya sendiri, yang dibuat oleh Admin lokasi di dasbor: umpan tarik DATEX II (token umpan) dan kiriman daftar pantau bertanda tangan (kunci daftar pantau lokasi, tanda tangan Standard Webhooks).
1.0.0
Lalu Lintas
Volume, tren, analitik koridor dan insiden.
Kendaraan, Kecepatan, Nomor Polisi Terbaca, Insiden, Lajur Yang Macet Saat Ini
GET/sites/{id}/overview
Siapa yang dapat memanggil: Akun dengan peran (Pemantau atau Admin) di lokasi tersebut. Cakupan token: read.
Parameter
| Kolom | Tipe | Deskripsi |
|---|---|---|
idwajib path | integer | |
fromwajib query | string | RFC 3339 |
towajib query | string | RFC 3339 |
Respons
| Status | Arti |
|---|---|
200 | OK |
401 | Problem details RFC 9457 |
403 | Problem details RFC 9457 |
404 | Problem details RFC 9457 |
409 | Problem details RFC 9457 |
422 | Problem details RFC 9457 |
502 | Problem details RFC 9457 |
Permintaan
curl -s -X GET "https://<BOX_HOST>/api/traffic/v1/sites/1/overview?from=2026-11-01T00%3A00%3A00%2B07%3A00&to=2026-11-02T00%3A00%3A00%2B07%3A00" \
-H "Authorization: Bearer <API_KEY>"import requests
r = requests.get(
"https://<BOX_HOST>/api/traffic/v1/sites/1/overview?from=2026-11-01T00%3A00%3A00%2B07%3A00&to=2026-11-02T00%3A00%3A00%2B07%3A00",
headers={"Authorization": "Bearer <API_KEY>"},
)
print(r.status_code, r.text)const r = await fetch("https://<BOX_HOST>/api/traffic/v1/sites/1/overview?from=2026-11-01T00%3A00%3A00%2B07%3A00&to=2026-11-02T00%3A00%3A00%2B07%3A00", {
method: "GET",
headers: { "Authorization": "Bearer <API_KEY>" },
});
console.log(r.status, await r.text());Respons 200
{
"vehicles": 18452,
"by_class": {
"car": 7311,
"motorcycle": 9870,
"bus": 212,
"truck": 1003,
"bicycle": 56
},
"flow_per_min": 12.8,
"speeds_measured": 15207,
"mean_speed_kmh": 38.6,
"p85_speed_kmh": 51,
"plates_read_pct": 0,
"incidents": {
"speeding": 41,
"wrong_way": 3,
"stopped": 5,
"congestion": 2,
"watchlist": 0
},
"congested_now": [
{
"camera_id": 21,
"lane": "Lane 2",
"occupancy": 82,
"since": "2026-11-02T09:41:00Z"
}
]
}Kendaraan Dan Kecepatan Rata-Rata Per Jam Atau Hari
GET/sites/{id}/trend
Siapa yang dapat memanggil: Akun dengan peran (Pemantau atau Admin) di lokasi tersebut. Cakupan token: read.
Parameter
| Kolom | Tipe | Deskripsi |
|---|---|---|
idwajib path | integer | |
fromwajib query | string | RFC 3339 |
towajib query | string | RFC 3339 |
bucket query | string | hour atau day |
Respons
| Status | Arti |
|---|---|
200 | OK |
401 | Problem details RFC 9457 |
403 | Problem details RFC 9457 |
404 | Problem details RFC 9457 |
409 | Problem details RFC 9457 |
422 | Problem details RFC 9457 |
502 | Problem details RFC 9457 |
Permintaan
curl -s -X GET "https://<BOX_HOST>/api/traffic/v1/sites/1/trend?from=2026-11-01T00%3A00%3A00%2B07%3A00&to=2026-11-02T00%3A00%3A00%2B07%3A00" \
-H "Authorization: Bearer <API_KEY>"import requests
r = requests.get(
"https://<BOX_HOST>/api/traffic/v1/sites/1/trend?from=2026-11-01T00%3A00%3A00%2B07%3A00&to=2026-11-02T00%3A00%3A00%2B07%3A00",
headers={"Authorization": "Bearer <API_KEY>"},
)
print(r.status_code, r.text)const r = await fetch("https://<BOX_HOST>/api/traffic/v1/sites/1/trend?from=2026-11-01T00%3A00%3A00%2B07%3A00&to=2026-11-02T00%3A00%3A00%2B07%3A00", {
method: "GET",
headers: { "Authorization": "Bearer <API_KEY>" },
});
console.log(r.status, await r.text());Respons 200
{
"bucket": "hour",
"buckets": [
{
"start": "<start>",
"vehicles": 12,
"mean_speed_kmh": 12
}
]
}Analitik Koridor: Jam Puncak Dan Faktornya, Peta Panas, Histogram Kecepatan, Porsi Kelas, Arah Datang
GET/sites/{id}/analytics
Siapa yang dapat memanggil: Akun dengan peran (Pemantau atau Admin) di lokasi tersebut. Cakupan token: read.
Parameter
| Kolom | Tipe | Deskripsi |
|---|---|---|
idwajib path | integer | |
fromwajib query | string | RFC 3339 |
towajib query | string | RFC 3339 |
Respons
| Status | Arti |
|---|---|
200 | OK |
401 | Problem details RFC 9457 |
403 | Problem details RFC 9457 |
404 | Problem details RFC 9457 |
409 | Problem details RFC 9457 |
422 | Problem details RFC 9457 |
502 | Problem details RFC 9457 |
Permintaan
curl -s -X GET "https://<BOX_HOST>/api/traffic/v1/sites/1/analytics?from=2026-11-01T00%3A00%3A00%2B07%3A00&to=2026-11-02T00%3A00%3A00%2B07%3A00" \
-H "Authorization: Bearer <API_KEY>"import requests
r = requests.get(
"https://<BOX_HOST>/api/traffic/v1/sites/1/analytics?from=2026-11-01T00%3A00%3A00%2B07%3A00&to=2026-11-02T00%3A00%3A00%2B07%3A00",
headers={"Authorization": "Bearer <API_KEY>"},
)
print(r.status_code, r.text)const r = await fetch("https://<BOX_HOST>/api/traffic/v1/sites/1/analytics?from=2026-11-01T00%3A00%3A00%2B07%3A00&to=2026-11-02T00%3A00%3A00%2B07%3A00", {
method: "GET",
headers: { "Authorization": "Bearer <API_KEY>" },
});
console.log(r.status, await r.text());Respons 200
{
"summary": {
"vehicles": 12,
"daily_average": 12,
"mean_speed_kmh": 12,
"p85_speed_kmh": 12,
"peak_hour": {
"start": "<start>",
"vehicles": 12,
"phf": 12
}
},
"heatmap": [
{
"day": "<day>",
"hours": [
7
]
}
],
"speed_histogram": {
"bucket_kmh": 12,
"counts": [
12
]
},
"class_share": [
{
"day": "<day>",
"counts": {
"car": 12,
"motorcycle": 12,
"bus": 12,
"truck": 12,
"bicycle": 12
}
}
],
"approaches": [
{
"camera_id": 1,
"line": "<line>",
"direction": "in",
"vehicles": 12,
"mean_speed_kmh": 12
}
]
}Kendaraan Melaju Terlalu Cepat, Melawan Arah, Kendaraan Berhenti, Kemacetan Dan Temuan Daftar Pantau, Terbaru Lebih Dulu
GET/sites/{id}/incidents
Siapa yang dapat memanggil: Akun dengan peran (Pemantau atau Admin) di lokasi tersebut. Cakupan token: read. Tanpa personal_data jawabannya berbentuk anonim: tanpa nama, nomor polisi, gambar atau rekaman.
Parameter
| Kolom | Tipe | Deskripsi |
|---|---|---|
idwajib path | integer | |
fromwajib query | string | RFC 3339 |
towajib query | string | RFC 3339 |
kind query | string | |
limit query | integer |
Respons
| Status | Arti |
|---|---|
200 | OK |
401 | Problem details RFC 9457 |
403 | Problem details RFC 9457 |
404 | Problem details RFC 9457 |
409 | Problem details RFC 9457 |
422 | Problem details RFC 9457 |
502 | Problem details RFC 9457 |
Permintaan
curl -s -X GET "https://<BOX_HOST>/api/traffic/v1/sites/1/incidents?from=2026-11-01T00%3A00%3A00%2B07%3A00&to=2026-11-02T00%3A00%3A00%2B07%3A00&limit=50" \
-H "Authorization: Bearer <API_KEY>"import requests
r = requests.get(
"https://<BOX_HOST>/api/traffic/v1/sites/1/incidents?from=2026-11-01T00%3A00%3A00%2B07%3A00&to=2026-11-02T00%3A00%3A00%2B07%3A00&limit=50",
headers={"Authorization": "Bearer <API_KEY>"},
)
print(r.status_code, r.text)const r = await fetch("https://<BOX_HOST>/api/traffic/v1/sites/1/incidents?from=2026-11-01T00%3A00%3A00%2B07%3A00&to=2026-11-02T00%3A00%3A00%2B07%3A00&limit=50", {
method: "GET",
headers: { "Authorization": "Bearer <API_KEY>" },
});
console.log(r.status, await r.text());Respons 200
{
"items": [
{
"id": "<id>",
"time": "2026-11-02T08:00:00Z",
"camera_id": 1,
"kind": "speeding",
"lane": "Lane 1",
"zone": "Loading bay",
"class": "car",
"plate": "B 1234 XYZ",
"speed_kmh": 12,
"limit_kmh": 12,
"state": "ok",
"occupancy": 12,
"stopped_s": 60
}
]
}Log Kendaraan
Setiap lintasan dengan kelas, kecepatan, lajur dan nomor polisinya; ekspor dan potongan gambar.
Log Kendaraan, Terbaru Lebih Dulu, Per Halaman; Pencarian Nomor Polisi Dicatat Di Log Audit
GET/sites/{id}/logs
Siapa yang dapat memanggil: Akun dengan peran (Pemantau atau Admin) di lokasi tersebut. Cakupan token: read. Tanpa personal_data jawabannya berbentuk anonim: tanpa nama, nomor polisi, gambar atau rekaman.
Parameter
| Kolom | Tipe | Deskripsi |
|---|---|---|
idwajib path | integer | |
fromwajib query | string | RFC 3339 |
towajib query | string | RFC 3339 |
plate query | string | pencarian nomor polisi; token API memerlukan personal_data untuk ini |
class query | string | |
camera query | integer | |
limit query | integer | |
before query | string | next_before dari halaman sebelumnya |
Respons
| Status | Arti |
|---|---|
200 | OK |
401 | Problem details RFC 9457 |
403 | Problem details RFC 9457 |
404 | Problem details RFC 9457 |
409 | Problem details RFC 9457 |
422 | Problem details RFC 9457 |
502 | Problem details RFC 9457 |
Permintaan
curl -s -X GET "https://<BOX_HOST>/api/traffic/v1/sites/1/logs?from=2026-11-01T00%3A00%3A00%2B07%3A00&to=2026-11-02T00%3A00%3A00%2B07%3A00&camera=1&limit=50&before=2026-11-02T08%3A00%3A00Z" \
-H "Authorization: Bearer <API_KEY>"import requests
r = requests.get(
"https://<BOX_HOST>/api/traffic/v1/sites/1/logs?from=2026-11-01T00%3A00%3A00%2B07%3A00&to=2026-11-02T00%3A00%3A00%2B07%3A00&camera=1&limit=50&before=2026-11-02T08%3A00%3A00Z",
headers={"Authorization": "Bearer <API_KEY>"},
)
print(r.status_code, r.text)const r = await fetch("https://<BOX_HOST>/api/traffic/v1/sites/1/logs?from=2026-11-01T00%3A00%3A00%2B07%3A00&to=2026-11-02T00%3A00%3A00%2B07%3A00&camera=1&limit=50&before=2026-11-02T08%3A00%3A00Z", {
method: "GET",
headers: { "Authorization": "Bearer <API_KEY>" },
});
console.log(r.status, await r.text());Respons 200
{
"items": [
{
"id": "21:90311",
"time": "2026-11-02T09:44:12Z",
"camera_id": 21,
"line": "count",
"direction": "in",
"lane": "Lane 1",
"class": "car",
"colour": "white",
"speed_kmh": 42.5,
"plate": null,
"media": null,
"photo": null
},
{
"id": "21:90310",
"time": "2026-11-02T09:44:09Z",
"camera_id": 21,
"line": "count",
"direction": "in",
"lane": "Lane 2",
"class": "motorcycle",
"colour": null,
"speed_kmh": null,
"plate": null,
"media": null,
"photo": null
}
],
"next_before": "2026-11-02T09:44:09Z"
}Log Kendaraan Sebagai CSV Atau XLSX (EN/ID, Waktu Lokal, Paling Banyak 20 000 Baris; Dicatat Di Log Audit)
GET/sites/{id}/logs/export
Siapa yang dapat memanggil: Akun dengan peran (Pemantau atau Admin) di lokasi tersebut. Cakupan token: read, export. Tanpa personal_data jawabannya berbentuk anonim: tanpa nama, nomor polisi, gambar atau rekaman.
Parameter
| Kolom | Tipe | Deskripsi |
|---|---|---|
idwajib path | integer | |
fromwajib query | string | RFC 3339 |
towajib query | string | RFC 3339 |
format query | string | csv atau xlsx |
language query | string | en atau id |
Respons
| Status | Arti |
|---|---|
200 | OK |
401 | Problem details RFC 9457 |
403 | Problem details RFC 9457 |
404 | Problem details RFC 9457 |
409 | Problem details RFC 9457 |
422 | Problem details RFC 9457 |
502 | Problem details RFC 9457 |
Permintaan
curl -s -X GET "https://<BOX_HOST>/api/traffic/v1/sites/1/logs/export?from=2026-11-01T00%3A00%3A00%2B07%3A00&to=2026-11-02T00%3A00%3A00%2B07%3A00" \
-H "Authorization: Bearer <API_KEY>"import requests
r = requests.get(
"https://<BOX_HOST>/api/traffic/v1/sites/1/logs/export?from=2026-11-01T00%3A00%3A00%2B07%3A00&to=2026-11-02T00%3A00%3A00%2B07%3A00",
headers={"Authorization": "Bearer <API_KEY>"},
)
print(r.status_code, r.text)const r = await fetch("https://<BOX_HOST>/api/traffic/v1/sites/1/logs/export?from=2026-11-01T00%3A00%3A00%2B07%3A00&to=2026-11-02T00%3A00%3A00%2B07%3A00", {
method: "GET",
headers: { "Authorization": "Bearer <API_KEY>" },
});
console.log(r.status, await r.text());Potongan Gambar Suatu Lintasan (Kendaraan Dan Nomor Polisinya); Hanya Referensi Yang Dimiliki Lintasan Di Lokasi Ini
GET/sites/{id}/media/{ref}
Siapa yang dapat memanggil: Akun dengan peran (Pemantau atau Admin) di lokasi tersebut. Cakupan token: read, personal_data.
Parameter
| Kolom | Tipe | Deskripsi |
|---|---|---|
idwajib path | integer | |
refwajib path | string |
Respons
| Status | Arti |
|---|---|
200 | OK |
401 | Problem details RFC 9457 |
403 | Problem details RFC 9457 |
404 | Problem details RFC 9457 |
409 | Problem details RFC 9457 |
422 | Problem details RFC 9457 |
502 | Problem details RFC 9457 |
Permintaan
curl -s -X GET "https://<BOX_HOST>/api/traffic/v1/sites/1/media/{ref}" \
-H "Authorization: Bearer <API_KEY>"import requests
r = requests.get(
"https://<BOX_HOST>/api/traffic/v1/sites/1/media/{ref}",
headers={"Authorization": "Bearer <API_KEY>"},
)
print(r.status_code, r.text)const r = await fetch("https://<BOX_HOST>/api/traffic/v1/sites/1/media/{ref}", {
method: "GET",
headers: { "Authorization": "Bearer <API_KEY>" },
});
console.log(r.status, await r.text());Daftar Pantau
Nomor polisi yang dipantau, temuan, impor CSV dan umpan bertanda tangan dari sistem lain.
Impor CSV (plate,reason[,notes]): Menambah Atau Memperbarui Entri; Dicatat Di Log Audit
POST/sites/{id}/watchlist/upload
Siapa yang dapat memanggil: Akun yang menjadi Admin di lokasi tersebut. Cakupan token: write, personal_data.
Parameter
| Kolom | Tipe | Deskripsi |
|---|---|---|
idwajib path | integer |
Respons
| Status | Arti |
|---|---|
200 | OK |
401 | Problem details RFC 9457 |
403 | Problem details RFC 9457 |
404 | Problem details RFC 9457 |
409 | Problem details RFC 9457 |
422 | Problem details RFC 9457 |
502 | Problem details RFC 9457 |
Permintaan
curl -s -X POST "https://<BOX_HOST>/api/traffic/v1/sites/1/watchlist/upload" \
-H "Authorization: Bearer <API_KEY>"import requests
r = requests.post(
"https://<BOX_HOST>/api/traffic/v1/sites/1/watchlist/upload",
headers={"Authorization": "Bearer <API_KEY>"},
)
print(r.status_code, r.text)const r = await fetch("https://<BOX_HOST>/api/traffic/v1/sites/1/watchlist/upload", {
method: "POST",
headers: { "Authorization": "Bearer <API_KEY>" },
});
console.log(r.status, await r.text());Respons 200
{
"added": 12,
"updated": 12,
"removed": 12
}Pembaruan Daftar Pantau Bertanda Tangan Dari Sistem Lain
POST/feeds/watchlist/{site}
Menambah atau memperbarui nomor polisi (upsert) dan menghapus nomor polisi (remove) di daftar pantau lokasi. Panggilan ditandatangani dengan kunci daftar pantau lokasi dengan cara Standard Webhooks: webhook-id, webhook-timestamp (dalam 5 menit) dan webhook-signature: v1,<base64 HMAC-SHA256 dari id.timestamp.body>. Id pesan yang berulang, tanda tangan yang salah dan lokasi tanpa kunci semuanya mendapat 401 yang sama. Setiap impor dicatat di log audit.
Autentikasi: Kunci daftar pantau lokasi (dibuat oleh Admin lokasi di dasbor); tanpa token API.
Parameter
| Kolom | Tipe | Deskripsi |
|---|---|---|
sitewajib path | integer | |
webhook-idwajib header | string | Id unik untuk pesan ini, paling banyak 128 karakter. Id yang berulang ditolak. |
webhook-timestampwajib header | string | Waktu penandatanganan dalam detik Unix; harus dalam 5 menit dari jam perangkat. |
webhook-signaturewajib header | string | v1, diikuti HMAC-SHA256 dalam base64 atas <webhook-id>.<webhook-timestamp>.<body> dengan kunci lokasi (bagian base64 setelah whsec_). Beberapa tanda tangan boleh diberikan, dipisahkan spasi. |
Body
| Kolom | Tipe | Deskripsi |
|---|---|---|
upsert | object[] | |
upsert[].platewajib | string | nomor polisi Indonesia, disimpan sebagai B 1234 XYZ |
upsert[].reasonwajib | enum | stolen, wanted, tax_arrears, other |
upsert[].notes | string | |
remove | string[] |
Respons
| Status | Arti |
|---|---|
200 | OK |
401 | Problem details RFC 9457 |
403 | Problem details RFC 9457 |
404 | Problem details RFC 9457 |
409 | Problem details RFC 9457 |
422 | Problem details RFC 9457 |
502 | Problem details RFC 9457 |
Permintaan
curl -s -X POST "https://<BOX_HOST>/api/traffic/v1/feeds/watchlist/1" \
-H "webhook-id: <WEBHOOK_ID>" \
-H "webhook-timestamp: <WEBHOOK_TIMESTAMP>" \
-H "webhook-signature: <WEBHOOK_SIGNATURE>" \
-H "Content-Type: application/json" \
-d '{"upsert":[{"plate":"B 1234 XYZ","reason":"stolen","notes":"Blue pickup"}],"remove":["D 5678 AB"]}'import requests
r = requests.post(
"https://<BOX_HOST>/api/traffic/v1/feeds/watchlist/1",
headers={"webhook-id": "<WEBHOOK_ID>", "webhook-timestamp": "<WEBHOOK_TIMESTAMP>", "webhook-signature": "<WEBHOOK_SIGNATURE>"},
json={
"upsert": [
{
"plate": "B 1234 XYZ",
"reason": "stolen",
"notes": "Blue pickup"
}
],
"remove": [
"D 5678 AB"
]
},
)
print(r.status_code, r.text)const r = await fetch("https://<BOX_HOST>/api/traffic/v1/feeds/watchlist/1", {
method: "POST",
headers: { "webhook-id": "<WEBHOOK_ID>", "webhook-timestamp": "<WEBHOOK_TIMESTAMP>", "webhook-signature": "<WEBHOOK_SIGNATURE>", "Content-Type": "application/json" },
body: JSON.stringify({
"upsert": [
{
"plate": "B 1234 XYZ",
"reason": "stolen",
"notes": "Blue pickup"
}
],
"remove": [
"D 5678 AB"
]
}),
});
console.log(r.status, await r.text());Respons 200
{
"added": 12,
"updated": 12,
"removed": 12
}Daftar Pantau Lokasi
GET/sites/{id}/watchlist
Siapa yang dapat memanggil: Akun dengan peran (Pemantau atau Admin) di lokasi tersebut. Cakupan token: read, personal_data.
Parameter
| Kolom | Tipe | Deskripsi |
|---|---|---|
idwajib path | integer | |
q query | string | sebagian nomor polisi |
Respons
| Status | Arti |
|---|---|
200 | OK |
401 | Problem details RFC 9457 |
403 | Problem details RFC 9457 |
404 | Problem details RFC 9457 |
409 | Problem details RFC 9457 |
422 | Problem details RFC 9457 |
502 | Problem details RFC 9457 |
Permintaan
curl -s -X GET "https://<BOX_HOST>/api/traffic/v1/sites/1/watchlist" \
-H "Authorization: Bearer <API_KEY>"import requests
r = requests.get(
"https://<BOX_HOST>/api/traffic/v1/sites/1/watchlist",
headers={"Authorization": "Bearer <API_KEY>"},
)
print(r.status_code, r.text)const r = await fetch("https://<BOX_HOST>/api/traffic/v1/sites/1/watchlist", {
method: "GET",
headers: { "Authorization": "Bearer <API_KEY>" },
});
console.log(r.status, await r.text());Respons 200
{
"items": [
{
"id": 1,
"entry_id": "<entry_id>",
"plate": "B 1234 XYZ",
"reason": "stolen",
"notes": "Shift A",
"active": true,
"added_by": "<added_by>",
"source": "manual",
"created": "<created>",
"updated": "<updated>"
}
],
"key": true
}Tambahkan Nomor Polisi Ke Daftar Pantau (Dikirim Ke Kamera Lokasi; Dicatat Di Log Audit)
POST/sites/{id}/watchlist
Siapa yang dapat memanggil: Akun yang menjadi Admin di lokasi tersebut. Cakupan token: write, personal_data.
Parameter
| Kolom | Tipe | Deskripsi |
|---|---|---|
idwajib path | integer |
Body
| Kolom | Tipe | Deskripsi |
|---|---|---|
platewajib | string | nomor polisi Indonesia, disimpan sebagai B 1234 XYZ |
reasonwajib | enum | stolen, wanted, tax_arrears, other |
notes | string |
Respons
| Status | Arti |
|---|---|
200 | OK |
401 | Problem details RFC 9457 |
403 | Problem details RFC 9457 |
404 | Problem details RFC 9457 |
409 | Problem details RFC 9457 |
422 | Problem details RFC 9457 |
502 | Problem details RFC 9457 |
Permintaan
curl -s -X POST "https://<BOX_HOST>/api/traffic/v1/sites/1/watchlist" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{"plate":"B 1234 XYZ","reason":"stolen","notes":"Shift A"}'import requests
r = requests.post(
"https://<BOX_HOST>/api/traffic/v1/sites/1/watchlist",
headers={"Authorization": "Bearer <API_KEY>"},
json={
"plate": "B 1234 XYZ",
"reason": "stolen",
"notes": "Shift A"
},
)
print(r.status_code, r.text)const r = await fetch("https://<BOX_HOST>/api/traffic/v1/sites/1/watchlist", {
method: "POST",
headers: { "Authorization": "Bearer <API_KEY>", "Content-Type": "application/json" },
body: JSON.stringify({
"plate": "B 1234 XYZ",
"reason": "stolen",
"notes": "Shift A"
}),
});
console.log(r.status, await r.text());Respons 200
{
"id": 1,
"entry_id": "<entry_id>",
"plate": "B 1234 XYZ",
"reason": "stolen",
"notes": "Shift A",
"active": true,
"added_by": "<added_by>",
"source": "manual",
"created": "<created>",
"updated": "<updated>"
}Ubah, Jeda Atau Lanjutkan Satu Entri (Dicatat Di Log Audit)
PATCH/watchlist/{entry}
Siapa yang dapat memanggil: Akun yang menjadi Admin di lokasi tersebut. Cakupan token: write, personal_data.
Parameter
| Kolom | Tipe | Deskripsi |
|---|---|---|
entrywajib path | integer |
Body
| Kolom | Tipe | Deskripsi |
|---|---|---|
reason | enum | stolen, wanted, tax_arrears, other |
notes | string | |
active | boolean |
Respons
| Status | Arti |
|---|---|
200 | OK |
401 | Problem details RFC 9457 |
403 | Problem details RFC 9457 |
404 | Problem details RFC 9457 |
409 | Problem details RFC 9457 |
422 | Problem details RFC 9457 |
502 | Problem details RFC 9457 |
Permintaan
curl -s -X PATCH "https://<BOX_HOST>/api/traffic/v1/watchlist/1" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{"reason":"stolen","notes":"Shift A","active":true}'import requests
r = requests.patch(
"https://<BOX_HOST>/api/traffic/v1/watchlist/1",
headers={"Authorization": "Bearer <API_KEY>"},
json={
"reason": "stolen",
"notes": "Shift A",
"active": True
},
)
print(r.status_code, r.text)const r = await fetch("https://<BOX_HOST>/api/traffic/v1/watchlist/1", {
method: "PATCH",
headers: { "Authorization": "Bearer <API_KEY>", "Content-Type": "application/json" },
body: JSON.stringify({
"reason": "stolen",
"notes": "Shift A",
"active": true
}),
});
console.log(r.status, await r.text());Respons 200
{
"id": 1,
"entry_id": "<entry_id>",
"plate": "B 1234 XYZ",
"reason": "stolen",
"notes": "Shift A",
"active": true,
"added_by": "<added_by>",
"source": "manual",
"created": "<created>",
"updated": "<updated>"
}Hapus Satu Entri (Dicatat Di Log Audit)
DELETE/watchlist/{entry}
Siapa yang dapat memanggil: Akun yang menjadi Admin di lokasi tersebut. Cakupan token: write, personal_data.
Parameter
| Kolom | Tipe | Deskripsi |
|---|---|---|
entrywajib path | integer |
Respons
| Status | Arti |
|---|---|
204 | OK |
401 | Problem details RFC 9457 |
403 | Problem details RFC 9457 |
404 | Problem details RFC 9457 |
409 | Problem details RFC 9457 |
422 | Problem details RFC 9457 |
502 | Problem details RFC 9457 |
Permintaan
curl -s -X DELETE "https://<BOX_HOST>/api/traffic/v1/watchlist/1" \
-H "Authorization: Bearer <API_KEY>"import requests
r = requests.delete(
"https://<BOX_HOST>/api/traffic/v1/watchlist/1",
headers={"Authorization": "Bearer <API_KEY>"},
)
print(r.status_code, r.text)const r = await fetch("https://<BOX_HOST>/api/traffic/v1/watchlist/1", {
method: "DELETE",
headers: { "Authorization": "Bearer <API_KEY>" },
});
console.log(r.status, await r.text());Temuan Daftar Pantau Terbaru
GET/sites/{id}/watchlist/hits
Siapa yang dapat memanggil: Akun dengan peran (Pemantau atau Admin) di lokasi tersebut. Cakupan token: read, personal_data.
Parameter
| Kolom | Tipe | Deskripsi |
|---|---|---|
idwajib path | integer | |
limit query | integer |
Respons
| Status | Arti |
|---|---|
200 | OK |
401 | Problem details RFC 9457 |
403 | Problem details RFC 9457 |
404 | Problem details RFC 9457 |
409 | Problem details RFC 9457 |
422 | Problem details RFC 9457 |
502 | Problem details RFC 9457 |
Permintaan
curl -s -X GET "https://<BOX_HOST>/api/traffic/v1/sites/1/watchlist/hits?limit=50" \
-H "Authorization: Bearer <API_KEY>"import requests
r = requests.get(
"https://<BOX_HOST>/api/traffic/v1/sites/1/watchlist/hits?limit=50",
headers={"Authorization": "Bearer <API_KEY>"},
)
print(r.status_code, r.text)const r = await fetch("https://<BOX_HOST>/api/traffic/v1/sites/1/watchlist/hits?limit=50", {
method: "GET",
headers: { "Authorization": "Bearer <API_KEY>" },
});
console.log(r.status, await r.text());Respons 200
{
"items": [
{
"id": "<id>",
"time": "2026-11-02T08:00:00Z",
"camera_id": 1,
"plate": "B 1234 XYZ",
"reason": "Unpaid toll",
"entry_id": "<entry_id>"
}
]
}DATEX II
Umpan DATEX II v3 lokasi: lokasi kamera, token tarik, tujuan kirim.
Lokasi Kamera Untuk Umpan DATEX II
GET/cameras/{id}/location
Siapa yang dapat memanggil: Akun dengan peran (Pemantau atau Admin) di lokasi tersebut. Cakupan token: read.
Parameter
| Kolom | Tipe | Deskripsi |
|---|---|---|
idwajib path | integer |
Respons
| Status | Arti |
|---|---|
200 | OK |
401 | Problem details RFC 9457 |
403 | Problem details RFC 9457 |
404 | Problem details RFC 9457 |
409 | Problem details RFC 9457 |
422 | Problem details RFC 9457 |
502 | Problem details RFC 9457 |
Permintaan
curl -s -X GET "https://<BOX_HOST>/api/traffic/v1/cameras/1/location" \
-H "Authorization: Bearer <API_KEY>"import requests
r = requests.get(
"https://<BOX_HOST>/api/traffic/v1/cameras/1/location",
headers={"Authorization": "Bearer <API_KEY>"},
)
print(r.status_code, r.text)const r = await fetch("https://<BOX_HOST>/api/traffic/v1/cameras/1/location", {
method: "GET",
headers: { "Authorization": "Bearer <API_KEY>" },
});
console.log(r.status, await r.text());Respons 200
{
"camera": 12,
"latitude": -6.2,
"longitude": 106.8,
"road": "<road>",
"direction": "in",
"version": 3
}Atur Lokasi Kamera (Lintang, Bujur, Jalan, Arah DATEX II); Dicatat Di Log Audit
PUT/cameras/{id}/location
Siapa yang dapat memanggil: Akun yang menjadi Admin di lokasi tersebut. Cakupan token: write.
Parameter
| Kolom | Tipe | Deskripsi |
|---|---|---|
idwajib path | integer |
Body
| Kolom | Tipe | Deskripsi |
|---|---|---|
latitudewajib | number | |
longitudewajib | number | |
road | string | |
direction | enum | northBound, northEastBound, eastBound, southEastBound, southBound, southWestBound, westBound, northWestBound, bothWays, inboundTowardsTown, outboundFromTown, unknown |
Respons
| Status | Arti |
|---|---|
200 | OK |
401 | Problem details RFC 9457 |
403 | Problem details RFC 9457 |
404 | Problem details RFC 9457 |
409 | Problem details RFC 9457 |
422 | Problem details RFC 9457 |
502 | Problem details RFC 9457 |
Permintaan
curl -s -X PUT "https://<BOX_HOST>/api/traffic/v1/cameras/1/location" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{"latitude":-6.2,"longitude":106.8,"road":"<road>","direction":"northBound"}'import requests
r = requests.put(
"https://<BOX_HOST>/api/traffic/v1/cameras/1/location",
headers={"Authorization": "Bearer <API_KEY>"},
json={
"latitude": -6.2,
"longitude": 106.8,
"road": "<road>",
"direction": "northBound"
},
)
print(r.status_code, r.text)const r = await fetch("https://<BOX_HOST>/api/traffic/v1/cameras/1/location", {
method: "PUT",
headers: { "Authorization": "Bearer <API_KEY>", "Content-Type": "application/json" },
body: JSON.stringify({
"latitude": -6.2,
"longitude": 106.8,
"road": "<road>",
"direction": "northBound"
}),
});
console.log(r.status, await r.text());Respons 200
{
"camera": 12,
"latitude": -6.2,
"longitude": 106.8,
"road": "<road>",
"direction": "in",
"version": 3
}Umpan DATEX II Lokasi: Token Tarik Sudah Diatur Atau Belum, Tujuan Kirim, Interval, Kiriman Terakhir
GET/sites/{id}/datex
Siapa yang dapat memanggil: Akun yang menjadi Admin di lokasi tersebut. Cakupan token: read.
Parameter
| Kolom | Tipe | Deskripsi |
|---|---|---|
idwajib path | integer |
Respons
| Status | Arti |
|---|---|
200 | OK |
401 | Problem details RFC 9457 |
403 | Problem details RFC 9457 |
404 | Problem details RFC 9457 |
409 | Problem details RFC 9457 |
422 | Problem details RFC 9457 |
502 | Problem details RFC 9457 |
Permintaan
curl -s -X GET "https://<BOX_HOST>/api/traffic/v1/sites/1/datex" \
-H "Authorization: Bearer <API_KEY>"import requests
r = requests.get(
"https://<BOX_HOST>/api/traffic/v1/sites/1/datex",
headers={"Authorization": "Bearer <API_KEY>"},
)
print(r.status_code, r.text)const r = await fetch("https://<BOX_HOST>/api/traffic/v1/sites/1/datex", {
method: "GET",
headers: { "Authorization": "Bearer <API_KEY>" },
});
console.log(r.status, await r.text());Respons 200
{
"site": 12,
"pull_token": true,
"pull_url": "https://<RECEIVER_HOST>/hooks/arsa",
"push_url": "https://<RECEIVER_HOST>/hooks/arsa",
"interval_s": 60,
"last_push": "<last_push>",
"last_status": "<last_status>",
"push_secret": "<push_secret>",
"shown_once": true
}Atur Tujuan Kirim Dan Intervalnya; Tujuan Baru Mendapat Rahasia Penandatanganan Baru, Ditampilkan Satu Kali; Dicatat Di Log Audit
PUT/sites/{id}/datex
Siapa yang dapat memanggil: Akun yang menjadi Admin di lokasi tersebut. Cakupan token: write.
Parameter
| Kolom | Tipe | Deskripsi |
|---|---|---|
idwajib path | integer |
Body
| Kolom | Tipe | Deskripsi |
|---|---|---|
push_url | string | |
interval_swajib | integer |
Respons
| Status | Arti |
|---|---|
200 | OK |
401 | Problem details RFC 9457 |
403 | Problem details RFC 9457 |
404 | Problem details RFC 9457 |
409 | Problem details RFC 9457 |
422 | Problem details RFC 9457 |
502 | Problem details RFC 9457 |
Permintaan
curl -s -X PUT "https://<BOX_HOST>/api/traffic/v1/sites/1/datex" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{"push_url":"https://<RECEIVER_HOST>/hooks/arsa","interval_s":60}'import requests
r = requests.put(
"https://<BOX_HOST>/api/traffic/v1/sites/1/datex",
headers={"Authorization": "Bearer <API_KEY>"},
json={
"push_url": "https://<RECEIVER_HOST>/hooks/arsa",
"interval_s": 60
},
)
print(r.status_code, r.text)const r = await fetch("https://<BOX_HOST>/api/traffic/v1/sites/1/datex", {
method: "PUT",
headers: { "Authorization": "Bearer <API_KEY>", "Content-Type": "application/json" },
body: JSON.stringify({
"push_url": "https://<RECEIVER_HOST>/hooks/arsa",
"interval_s": 60
}),
});
console.log(r.status, await r.text());Respons 200
{
"site": 12,
"pull_token": true,
"pull_url": "https://<RECEIVER_HOST>/hooks/arsa",
"push_url": "https://<RECEIVER_HOST>/hooks/arsa",
"interval_s": 60,
"last_push": "<last_push>",
"last_status": "<last_status>",
"push_secret": "<push_secret>",
"shown_once": true
}Umpan DATEX II v3 Lokasi
GET/feeds/datex/{site}/{doc}
XML DATEX II v3 (EN 16157, valid terhadap skema v3.7): measurement-sites, measured-data (interval lengkap terakhir) atau situations (saat ini). Kirim token umpan lokasi sebagai Authorization: Bearer <FEED_TOKEN>.
Autentikasi: Token umpan DATEX II lokasi (dibuat oleh Admin lokasi di dasbor); tanpa token API.
Parameter
| Kolom | Tipe | Deskripsi |
|---|---|---|
sitewajib path | integer | |
docwajib path | enum | measurement-sites, measured-data, situations |
Respons
| Status | Arti |
|---|---|
200 | d2:payload DATEX II |
401 | Problem details RFC 9457 |
403 | Problem details RFC 9457 |
404 | Problem details RFC 9457 |
409 | Problem details RFC 9457 |
422 | Problem details RFC 9457 |
502 | Problem details RFC 9457 |
Permintaan
curl -s -X GET "https://<BOX_HOST>/api/traffic/v1/feeds/datex/1/measurement-sites" \
-H "Authorization: Bearer <FEED_TOKEN>"import requests
r = requests.get(
"https://<BOX_HOST>/api/traffic/v1/feeds/datex/1/measurement-sites",
headers={"Authorization": "Bearer <FEED_TOKEN>"},
)
print(r.status_code, r.text)const r = await fetch("https://<BOX_HOST>/api/traffic/v1/feeds/datex/1/measurement-sites", {
method: "GET",
headers: { "Authorization": "Bearer <FEED_TOKEN>" },
});
console.log(r.status, await r.text());Pengaturan
Batas kecepatan, kendaraan lambat dan berhenti, kemacetan, retensi statistik dan nomor polisi.
Pengaturan Traffic Monitor Di Lokasi
GET/sites/{id}/settings
Siapa yang dapat memanggil: Akun dengan peran (Pemantau atau Admin) di lokasi tersebut. Cakupan token: read.
Parameter
| Kolom | Tipe | Deskripsi |
|---|---|---|
idwajib path | integer |
Respons
| Status | Arti |
|---|---|
200 | OK |
401 | Problem details RFC 9457 |
403 | Problem details RFC 9457 |
404 | Problem details RFC 9457 |
409 | Problem details RFC 9457 |
422 | Problem details RFC 9457 |
502 | Problem details RFC 9457 |
Permintaan
curl -s -X GET "https://<BOX_HOST>/api/traffic/v1/sites/1/settings" \
-H "Authorization: Bearer <API_KEY>"import requests
r = requests.get(
"https://<BOX_HOST>/api/traffic/v1/sites/1/settings",
headers={"Authorization": "Bearer <API_KEY>"},
)
print(r.status_code, r.text)const r = await fetch("https://<BOX_HOST>/api/traffic/v1/sites/1/settings", {
method: "GET",
headers: { "Authorization": "Bearer <API_KEY>" },
});
console.log(r.status, await r.text());Respons 200
{
"passage_hold_s": 60,
"stopped_s": 60,
"slow_kmh": 12,
"speed_limit_kmh": 12,
"congestion_window_s": 60,
"stats_days": 30,
"plate_days": 12,
"version": 3
}Ubah Pengaturan Traffic Monitor Di Lokasi (Diterapkan Ke Setiap Kamera Di Lokasi)
PUT/sites/{id}/settings
Siapa yang dapat memanggil: Akun yang menjadi Admin di lokasi tersebut. Cakupan token: write.
Parameter
| Kolom | Tipe | Deskripsi |
|---|---|---|
idwajib path | integer |
Body
| Kolom | Tipe | Deskripsi |
|---|---|---|
passage_hold_swajib | number | |
stopped_swajib | number | |
slow_kmhwajib | number | |
speed_limit_kmh | number | |
congestion_window_swajib | number | |
stats_dayswajib | integer | |
plate_dayswajib | integer | nomor polisi dikosongkan setelah ini |
version | integer |
Respons
| Status | Arti |
|---|---|
200 | OK |
401 | Problem details RFC 9457 |
403 | Problem details RFC 9457 |
404 | Problem details RFC 9457 |
409 | Problem details RFC 9457 |
422 | Problem details RFC 9457 |
502 | Problem details RFC 9457 |
Permintaan
curl -s -X PUT "https://<BOX_HOST>/api/traffic/v1/sites/1/settings" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{"passage_hold_s":60,"stopped_s":60,"slow_kmh":12,"speed_limit_kmh":12,"congestion_window_s":60,"stats_days":30,"plate_days":12,"version":3}'import requests
r = requests.put(
"https://<BOX_HOST>/api/traffic/v1/sites/1/settings",
headers={"Authorization": "Bearer <API_KEY>"},
json={
"passage_hold_s": 60,
"stopped_s": 60,
"slow_kmh": 12,
"speed_limit_kmh": 12,
"congestion_window_s": 60,
"stats_days": 30,
"plate_days": 12,
"version": 3
},
)
print(r.status_code, r.text)const r = await fetch("https://<BOX_HOST>/api/traffic/v1/sites/1/settings", {
method: "PUT",
headers: { "Authorization": "Bearer <API_KEY>", "Content-Type": "application/json" },
body: JSON.stringify({
"passage_hold_s": 60,
"stopped_s": 60,
"slow_kmh": 12,
"speed_limit_kmh": 12,
"congestion_window_s": 60,
"stats_days": 30,
"plate_days": 12,
"version": 3
}),
});
console.log(r.status, await r.text());Respons 200
{
"passage_hold_s": 60,
"stopped_s": 60,
"slow_kmh": 12,
"speed_limit_kmh": 12,
"congestion_window_s": 60,
"stats_days": 30,
"plate_days": 12,
"version": 3
}