Skip to content

POST /api/v3/lightning/devices/{lcuid}/instructions/{instruction_lcuid}/failed

Summary

POST /lightning/devices/{lcuid}/instructions/{instruction_lcuid}/failed

Description

Mark a remote instruction as failed

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:

  • message (string): Any message related to this failured.
  • response_data (object): Any data related to this failure.

Responses

Response: 200

Description: Sample Response

Content Type: application/json

Schema

Type: object

Properties:

  • success (boolean): true
Example Response
{
    "success": true
}

Example Implementations

Bash (cURL)

curl --request POST \
  --url "https://api.lucit.app/api/v3/lightning/devices/{lcuid}/instructions/{instruction_lcuid}/failed" \
  --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}/failed";

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}/failed', [
  '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}/failed"

headers = {
  "Authorization": "Bearer {AuthToken}",
  "Content-Type": "application/json",
  "Accept": "application/json",
  "AppIdV3": "LCUID-LAP-********-****-****-****-************"
}

response = requests.post(url, headers=headers)
print(response.json())

← Back to lightning index | Back to main index