API Reference — Face Enrollment
Endpoint untuk mengelola data Face Enrollment, NIK, custom field, alias, dan pencarian massal.
← Kembali ke Face Enrollment
Panduan operator: tambah, edit, hapus, batch import, custom field.
Otentikasi
Cara memperoleh dan menggunakan Bearer token JWT.
Semua endpoint memerlukan header Authorization: Bearer <token>. Basis URL mengikuti variabel lingkungan VITE_API_URL yang dikonfigurasi pada instalasi Lenz. Jika Anda belum punya token, lihat halaman Otentikasi.
CRUD Enrollment
Endpoint utama untuk membuat, membaca, memperbarui, dan menghapus data enrollment satu per satu.
Authorization
bearerAuth In: header
Query Parameters
Nomor halaman, dimulai dari 1
1Jumlah data per halaman
10Pencarian berdasarkan nama atau nomor identitas
Filter berdasarkan status enrollment
Filter berdasarkan face_id tertentu
Filter berdasarkan nilai custom field tertentu
Kolom untuk pengurutan
"id"Urutan menurun jika true
trueResponse Body
application/json
curl -X GET "https://lenz.example.com/api/enrollment"{ "ok": true, "message": "succesfully get enrolled person", "results": { "limit": 20, "current_page": 1, "total_data": 1, "total_page": 1, "enrollments": [ { "id": 1, "name": "Budi Santoso", "identity_number": "3201xxxxxxxxxxxx", "gender": "male", "birth_place": "Jakarta", "birth_date": "1990-05-20", "status": "whitelist", "face_id": "abc123def456", "alias_names": [ "Budi" ], "faces": [ { "id": 1, "enrolled_face_id": 1, "variation": "1234567890", "created_at": "2024-01-01T00:00:00Z" } ], "custom_field": {}, "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z", "deleted_at": null } ] }}Authorization
bearerAuth In: header
Request Body
multipart/form-data
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://lenz.example.com/api/enrollment" \ -F name="string" \ -F identity_number="string" \ -F images="[ \"string\" ]"{ "ok": true, "message": "Successfully enroll new person", "enrollment": { "id": 42, "name": "Budi Santoso", "identity_number": "3201xxxxxxxxxxxx", "face_id": "abc123def456", "keyspace": "default", "created_at": "2024-06-01T08:00:00Z", "updated_at": "2024-06-01T08:00:00Z", "deleted_at": null, "faces": [ { "id": 10, "variation": "9876543210", "image": "<base64>" } ] }}Authorization
bearerAuth In: header
Path Parameters
ID numerik enrollment
Response Body
application/json
curl -X GET "https://lenz.example.com/api/enrollment/0"{ "ok": true, "message": "Succesfully get detail enrolled faces", "enrollment": { "id": 42, "name": "Budi Santoso", "identity_number": "3201xxxxxxxxxxxx", "gender": "male", "birth_place": "Jakarta", "birth_date": "1990-05-20", "status": "whitelist", "face_id": "abc123def456", "alias_names": [ "Budi" ], "faces": [ { "id": 10, "enrolled_face_id": 42, "variation": "9876543210", "created_at": "2024-06-01T08:00:00Z" } ], "custom_field": { "departemen": "IT" }, "created_at": "2024-06-01T08:00:00Z", "updated_at": "2024-06-01T08:00:00Z", "deleted_at": null }}Authorization
bearerAuth In: header
Path Parameters
ID numerik enrollment
Request Body
multipart/form-data
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X PUT "https://lenz.example.com/api/enrollment/0" \ -F name="string" \ -F identity_number="string"Authorization
bearerAuth In: header
Path Parameters
ID numerik enrollment
Response Body
application/json
curl -X DELETE "https://lenz.example.com/api/enrollment/0"{ "ok": true, "message": "succesfully enrolled person"}Statistik & Status
Endpoint ringan untuk widget dashboard, filter status di toolbar, dan monitoring jumlah enrollment.
Authorization
bearerAuth In: header
Query Parameters
ID instance tertentu pada mode federation (opsional)
Response Body
application/json
curl -X GET "https://lenz.example.com/api/enrollment/total"{ "ok": true, "message": "success", "total": 1250}curl -X GET "https://lenz.example.com/api/enrolled-faces/statuses"{ "ok": true, "message": "success", "results": { "total": 1250, "statuses": [ { "status": "whitelist", "total": 800 }, { "status": "blacklist", "total": 150 }, { "status": "normal", "total": 300 } ] }}Bulk Lookup
Endpoint untuk mengambil banyak enrollment sekaligus, biasanya dipakai pada halaman event atau hasil pencarian saat me-resolve face_id ke detail orang.
Authorization
bearerAuth In: header
Query Parameters
Daftar face_id dipisahkan koma
Response Body
application/json
curl -X GET "https://lenz.example.com/api/enrolled-faces/get-by-face-ids?face_ids=string"{ "ok": true, "message": "success", "results": [ { "id": 42, "name": "Budi Santoso", "identity_number": "3201xxxxxxxxxxxx", "face_id": "abc123", "status": "whitelist", "faces": [] } ]}Face Enrollment
Daftarkan wajah ke sistem untuk dipakai dalam Face Recognition matching, lengkap dengan custom field, alias, dan batch import.
Plate Enrollment
Daftarkan plat nomor kendaraan ke sistem untuk dipakai dalam License Plate Recognition matching, lengkap dengan data kendaraan, foto, dan pengelolaan CRUD.