Sistem API
API sistem kami hadir untuk menyederhanakan pengelolaan perangkat Anda. Anda tidak perlu lagi masuk ke aplikasi WHAPI untuk melihat, menghapus, menambah, atau mengubah Kunci API (API Key). Semua bisa Anda lakukan dengan cepat dan efisien, langsung dari sistem Anda.
Menampilkan seluruh device
Body
secretstringOptionalExample:
api_key_sistem
Responses
200
Response 200
application/json
get
GET /api/listDevice HTTP/1.1
Host: localhost
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 27
"secret='api_key_sistem'"
200
Response 200
{
"data": [
{
"apiKey": "xxxxx",
"id": "xxxxx",
"name": "xxxxx",
"settings": {
"autoreply_status": false,
"autostartdevice_status": false,
"downtimenotif_status": false,
"restoresession_status": true,
"webhook_status": false,
"webhookmedia_status": false
},
"state_status": "SERVICE_OFF",
"telegram": {
"idTelegram": "",
"tele_push_changestate": true,
"tele_push_connect": true,
"tele_push_disconnect": true,
"tele_push_reminderlicense": true
},
"webhook": {
"urlWebhook": ""
}
}
],
"status": true
}
Menambah device
Body
namestringOptionalExample:
Device from API
secretstringOptionalExample:
api_key_sistem
Responses
200
Response 200
application/json
post
POST /api/addDevice HTTP/1.1
Host: localhost
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 52
"name='Device from API'&secret='api_key_sistem'"
200
Response 200
{
"message": "Device successfully added",
"status": true
}
Mengubah device
Body
namestringOptionalExample:
Device from API
secretstringOptionalExample:
api_key_sistem
Responses
200
Response 200
application/json
post
POST /api/editDevice HTTP/1.1
Host: localhost
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 52
"name='Device from API'&secret='api_key_sistem'"
200
Response 200
{
"message": "Device successfully updated",
"status": true
}
Melihat detail device
Body
idstringOptionalExample:
id_device
secretstringOptionalExample:
api_key_sistem
Responses
200
Response 200
application/json
post
POST /api/detailDevice HTTP/1.1
Host: localhost
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 44
"id='id_device'&secret='api_key_sistem'"
200
Response 200
{
"data": {
"apiKey": "xxxxx",
"id": "xxxxx",
"name": "xxxxx",
"settings": {
"autoreply_status": false,
"autostartdevice_status": false,
"downtimenotif_status": false,
"restoresession_status": true,
"webhook_status": false,
"webhookmedia_status": false
},
"state_status": "SERVICE_OFF",
"telegram": {
"idTelegram": "",
"tele_push_changestate": true,
"tele_push_connect": true,
"tele_push_disconnect": true,
"tele_push_reminderlicense": true
},
"webhook": {
"urlWebhook": ""
}
},
"status": true
}
Ubah API Key Device untuk mengakses API Whatsapp
Body
idstringOptionalExample:
id_device
secretstringOptionalExample:
api_key_sistem
Responses
200
Response 200
application/json
post
POST /api/changeApiKey HTTP/1.1
Host: localhost
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 44
"id='id_device'&secret='api_key_sistem'"
200
Response 200
{
"data": {
"apiKey": "xxxxx"
},
"message": "Your API Key updated successfully",
"status": true
}
Hapus device
Body
idstringOptionalExample:
id_device
secretstringOptionalExample:
api_key_sistem
Responses
200
Response 200
application/json
post
POST /api/deleteDevice HTTP/1.1
Host: localhost
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 44
"id='id_device'&secret='api_key_sistem'"
200
Response 200
{
"message": "Device deleted successfully",
"status": true
}