POST /api/v3/lightning/devices/{lcuid}/instructions/{instruction_lcuid}/acknowledge¶
Summary¶
POST /lightning/devices/{lcuid}/instructions/{instruction_lcuid}/acknowledge
Description¶
Acknowledge a remote instruction for a lightning device
Tags: lightning
Parameters¶
Header Parameters¶
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
Authorization |
string |
✓ Yes | Bearer {AuthToken} |
|
Content-Type |
string |
✓ Yes | application/json |
|
Accept |
string |
✓ Yes | application/json |
|
AppIdV3 |
string |
✓ Yes | LCUID-LAP-********-****-****-****-************ |
Request Body¶
Content Type: application/json¶
Schema¶
Type: object
Properties:
response_data(object): Any data related to this acknowledgement.
Responses¶
Response: 200¶
Description: Sample Response
Content Type: application/json¶
Schema¶
Type: object
Properties:
success(boolean): true
Example Response¶
Example Implementations¶
Bash (cURL)¶
curl --request POST \
--url "https://api.lucit.app/api/v3/lightning/devices/{lcuid}/instructions/{instruction_lcuid}/acknowledge" \
--header "Authorization: Bearer {AuthToken}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "AppIdV3: LCUID-LAP-********-****-****-****-************"
JavaScript (Fetch API)¶
const url = "https://api.lucit.app/api/v3/lightning/devices/{lcuid}/instructions/{instruction_lcuid}/acknowledge";
const headers = {
"Authorization": "Bearer {AuthToken}",
"Content-Type": "application/json",
"Accept": "application/json",
"AppIdV3": "LCUID-LAP-********-****-****-****-************"
};
fetch(url, {
method: "POST",
headers: headers
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
PHP (Guzzle)¶
<?php
require_once 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://api.lucit.app/api/v3/lightning/devices/{lcuid}/instructions/{instruction_lcuid}/acknowledge', [
'headers' => [
'Authorization' => 'Bearer {AuthToken}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'AppIdV3' => 'LCUID-LAP-********-****-****-****-************',
]
]);
$body = $response->getBody();
$data = json_decode($body, true);
print_r($data);
Python (Requests)¶
import requests
import json
url = "https://api.lucit.app/api/v3/lightning/devices/{lcuid}/instructions/{instruction_lcuid}/acknowledge"
headers = {
"Authorization": "Bearer {AuthToken}",
"Content-Type": "application/json",
"Accept": "application/json",
"AppIdV3": "LCUID-LAP-********-****-****-****-************"
}
response = requests.post(url, headers=headers)
print(response.json())