Liquid-IoT Runtime Environemnt (LIoTRE) API Specifiction

Liquid IoT Runtime Environemnt (LIoTRE) is a Node.js HTTP server which turns an IoT device into an application server so that it can host and run IoT applications. LIoTRE offers a set of RESTFul APIs that can be used to deploy the IoT applications and manage their operations remotely. More information can be found in https://github.com/farshadahmadi/liquidiot-server.
Contact Info: farshad.ahmadi.gh@gmail.com
Version: 1.0
Copyright (c) TUT Tampere University of Technology 2015-2016, all rights reserved
http://apache.org/licenses/LICENSE-2.0.html

Access

Methods

[ Jump to Models ]

Table of Contents

  1. delete /app/{appId}
  2. get /app/{appId}
  3. get /app/{appId}/log
  4. post /app/{appId}
  5. put /app/{appId}
  6. delete /app
  7. get /app
  8. post /app
Up
delete /app/{appId}
Deletes an applications by ID. (appAppIdDelete)
Deletes a specific applications on the target device.

Path parameters

appId (required)
Path Parameter — ID of the application

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Application was deleted successfully.

404

No application with given id.

500

Unexpected error String

Up
get /app/{appId}
Returns an application by ID. (appAppIdGet)
Get the information of a specific application.

Path parameters

appId (required)
Path Parameter — ID of the application

Return type

Application

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

The description of the application Application

404

No application with given id.

Up
get /app/{appId}/log
Returns application log by ID. (appAppIdLogGet)
Returns the log of an specific application.

Path parameters

appId (required)
Path Parameter — ID of the application

Return type

String

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Application log String

404

No application with given id.

500

Unexpected error String

Up
post /app/{appId}
Updates an application by ID. (appAppIdPost)
Updates a previously deplyed application specified by its ID.

Path parameters

appId (required)
Path Parameter — ID of the application

Consumes

This API call consumes the following media types via the Content-Type request header:

Form parameters

filekey (required)
Form Parameter — The application package in .tgz format. For more information about the content of application package see section 4 (File structure of the liquid-IoT application) of the Liquid-IoT RE API specification document (https://github.com/farshadahmadi/liquidiot-server/blob/master/Documents/API%20Documentation%2025-05-2016.pdf)

Return type

Application

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Returns updated desciption of the application Application

500

Error in updating the application. String

Up
put /app/{appId}
Starts or stops an application by ID and the target status. (appAppIdPut)
Starts or stops a specific application based on the provided target status in the body of the request.

Path parameters

appId (required)
Path Parameter — ID of the application

Request body

status (required)
Body Parameter — Target status of the application

Return type

Application

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Application went to target status successfully. Application

404

No application with given id.

500

Unexpected error String

Up
delete /app
Deletes all applications (appDelete)
This endpoint deletes all applications deployed to the device.

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

All apps were deleted successfully

500

Unexpected error String

Up
get /app
Gets the list of deployed applications (appGet)
This endpoint returns the list of all IoT appplications deployed to the device.

Return type

array[Application]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

An array of applications

500

Unexpected error String

Up
post /app
Deploys an application (appPost)
Deploys an application to the device.

Consumes

This API call consumes the following media types via the Content-Type request header:

Form parameters

filekey (required)
Form Parameter — The application package in .tgz format. For more information about the content of application package see section 4 (File structure of the liquid-IoT application) of the Liquid-IoT RE API specification document (https://github.com/farshadahmadi/liquidiot-server/blob/master/Documents/API%20Documentation%2025-05-2016.pdf)

Return type

Application

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Returns desciption (including app ID and status) of the newly added application Application

500

Error in deploying the application String

Up

Models

[ Jump to Methods ]

Table of Contents

  1. Application
  2. Status

Application Up

name (optional)
version (optional)
description (optional)
main
String Name of the main file (entry point) of the application.
scripts (optional)
id
BigDecimal Uniqie indentifier assigned to every application for further references.
status
String Each application can be in three main status crashes, running, or paused.
Enum:
initializing
crashed
running
paused
applicationInterfaces
array[String] The list of application interfaces implemented by the application.

Status Up

status (optional)
Enum:
running
paused