{"openapi":"3.0.3","info":{"title":"API Manage Kunci SOA","version":"1.0","description":"Dokumentasi API untuk autentikasi dan pengambilan kombinasi kunci ATM.\n"},"servers":[{"url":"https://ssi-soa.com/api_safina","description":"Production Server"}],"tags":[{"name":"Authentication"},{"name":"Key Management"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"LoginRequest":{"type":"object","required":["user_login","user_password"],"properties":{"user_login":{"type":"string","example":"admin"},"user_password":{"type":"string","example":"password123"}}},"LoginSuccessResponse":{"type":"object","properties":{"status":{"type":"boolean","example":true},"message":{"type":"string","example":"Login success"},"data":{"type":"object","properties":{"token":{"type":"string","example":"9a8bc7d6ef123456789"},"expired_at":{"type":"string","format":"date-time","example":"2026-06-18 10:00:00"},"user":{"type":"string","example":"Administrator"}}}}},"ErrorResponse":{"type":"object","properties":{"status":{"type":"boolean","example":false},"message":{"type":"string","example":"Unauthorized"}}},"KeyListItem":{"type":"object","properties":{"kunci_atm_id":{"type":"string","example":"ATM001"},"kunci_bank":{"type":"string","example":"BCA"},"jenis_kunci":{"type":"string","example":"SAFE"},"nomor_barcode_kunci":{"type":"string","example":"BCODE001"}}},"ReqKeyRequest":{"type":"object","required":["atmId","bank"],"properties":{"atmId":{"type":"string","example":"ATM001"},"bank":{"type":"string","example":"BCA"}}},"ReqKeySuccessResponse":{"type":"object","properties":{"status":{"type":"boolean","example":true},"kunci_atm_id":{"type":"string","example":"ATM001"},"kunci_bank":{"type":"string","example":"BCA"},"kunci_kombinasi":{"type":"string","example":"12-34-56"}}}}},"paths":{"/login":{"post":{"tags":["Authentication"],"summary":"Login user","description":"Login dan mendapatkan token API.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}}},"responses":{"200":{"description":"Login berhasil","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginSuccessResponse"}}}},"400":{"description":"Request invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Username/password salah","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/logout":{"get":{"tags":["Authentication"],"summary":"Logout user","description":"Logout dan menonaktifkan token API.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Logout berhasil","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","example":true},"message":{"type":"string","example":"Logout success"}}}}}},"401":{"description":"Token tidak valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/get_list_key":{"get":{"tags":["Key Management"],"summary":"Get list key","description":"Mengambil daftar kombinasi kunci yang tersedia.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Berhasil mengambil data","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/KeyListItem"}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Data tidak ditemukan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/req_key":{"post":{"tags":["Key Management"],"summary":"Request kombinasi kunci","description":"Mengambil kombinasi kunci berdasarkan ATM dan bank.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReqKeyRequest"}}}},"responses":{"200":{"description":"Berhasil mengambil kombinasi kunci","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReqKeySuccessResponse"}}}},"400":{"description":"Invalid JSON body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Kombinasi kunci tidak ditemukan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}