Lulify (still KISS) Docs

API v1


Introduction

  • API Name : Lulify Execution API
  • API Version : v1
  • Author : Toni Vega

Requirements

You will need the following tools

  1. curl or any other HTTP REST capable tool
  2. Optionally jq for parsing JSON from requests

Quickstart #back to top

  1. Create an account and enroll a device in the "Add Devices" section
  2. Get an API key from "Account" section
  3. Execute the next request after registering, adding a device and getting an API key

Request

                                    curl "https://exec.lulify.com/rssh-fanout" --data \
                                        '{"nameIds": [ "***" ],"command": "ls","apiKey": "YOUR_APIKEY"}'
                                

Note that "nameIds" with a triple asterisk ("***") means that all currently connected devices within your account will receive and execute the command.

Response

                                    {
                                      "status": "OK",
                                      "code": 0,
                                      "executionId": "tAXs3OknY...",
                                      "requests": [
                                        {
                                          "nameId": "r1000",
                                          "command": "ls",
                                          "status": 0
                                        }
                                      ],
                                      "responses": [
                                        {
                                          "command": "ls",
                                          "id": "tAXs3OknY...",
                                          "type": "command",
                                          "stdout": "_MEITlrB3o\nsystemd-private-001335ceb453473eb01bda0de5b9981c-systemd-timesyncd.service-tkmU91\ntmp4taw3v87\ntmp6qz8wnt8\ntmpbdnukl1g\ntmplkxqe6w5\ntmpo618lfam\n",
                                          "nameId": "r1000",
                                          "code": 0
                                        }
                                      ]
                                    }
                                

Basic usage #back to top

Request a command to multiple devices

Just add your device's "nameId" to the "nameIds" arrays of the JSON request

                                    curl "https://exec.lulify.com/rssh-fanout" --data \
                                        '{"nameIds": [ "android07","server01","raspberri02" ],"command": "ls","apiKey": "YOUR_APIKEY"}'
                                

Note that "nameIds" are an array of names that are equal to the "nameId" of your devices.
It is recommended to use only alphanumeric, hyphen and dot characters.

Status codes #back to top

HTTP Status CodeJSON Status CodeMeaning
2000No errors detected
4014Invalid API key
4002No one nameId matches a device in your account
5Invalid JSON parameters (check case, misspelled or if missing any of the following properties: 'apiKey', 'nameIds', 'command')
6Invalid JSON
7Invalid HTTP method, only allowed POST