Delete Device
API untuk menghapus device.
HTTP REQUEST
POST https://api.starsender.online/api/devices/{id}/delete
Header Parameters
| Parameter | Default | Description |
|---|---|---|
| Authorization | true | Account API key, anda bisa dapatkan di menu profile |
Query Parameters
| Parameter | Default | Description |
|---|---|---|
| ID | true | ID Device |
Implementasi dengan PHP
device.php
<?php
$curl = curl_init();
$idDevice = 10
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.starsender.online/api/devices/'.$idDevice.'/delete',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => array(
'Content-Type:application/json',
'Authorization: YOUR API KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Respon API
{
"success": true,
"data": {},
"message": "Success to delete device"
}