HMI REST API Reference

Application API

This API manages the whole application lifecycle, from creation, through edit and use up to its removal from the server.

ENDPOINTS:

GET /application/remove/(string: application_name)

Remove the application named application_name from the database.

GET /application/all/specs

returns all the applications present in the database

GET /application/set/(string: application_name)

set the application named application_name as the current one.

GET /application/digest

Return a digest that specifies the version of the application database

POST /application/add

Add the application passed as a parameter to the database

POST /application/add

Edit a field of an application in the database

GET /application/get/(string: application_name)

Retrn a specific application specification

Plot API

This API implements the on screen oscilloscope feature,

ENDPOINTS:

/channels/ POST /channels/widths POST

GET /plot/capture

return the previously captured data

POST /plot/capture

Start a single capture run on the enabled channels

GET /plot/channels/specs

returns the specs of the currently available channels

POST /plot/channels/params

Modify channel parameters

GET /plot/channels/data

returns the last set of acquired data

POST /plot/channels/status

Modify the status of one or more channels

POST /plot/channels/widths

Moidfy the widths of one or more channel, this is used for sign extension. The values of 1 to 100 represent the width of a signed integer while 100 to 200 represent unsigned integers (subtract 100 to get the width in bits)

Registers API

This API is used to access the memory mapped registers on the programmable logic part of the SoC.

ENDPOINTS:

GET /registers/(string: peripheral)/value

Reads the value of a register, specified in the parameters from the supplied peripheral

POST /registers/(string: peripheral)/value

Writes the value of a register, specified in the parameters from the supplied peripheral

GET /registers/(string: peripheral)/descriptions

Returns the info of the registers of the specified peripheral

GET /registers/all_peripheral/descriptions

Returns the info of all the registers in all the peripherals

POST /registers/bulk_write

Writes specified values to multiple registers in multiple peripherals

GET /registers/digest

Returns an Hash of all the current peripheral specifications

Peripherals API

This API manages the manages the peripherals definitions, allowing their creation update and removal.

ENDPOINTS:

POST /tab_creator/diagram

Upload the diagram for a peripheral

POST /tab_creator/create_peripheral

Add a peripheral, specified as a parameter, to the database

POST /tab_creator/edit_peripheral

Modify a specific field in the specified peripheral

GET /tab_creator/remove_peripheral/(string: peripheral)

Removes the specified peripheral from the database

Authentication API

This API manages users and their authentication

ENDPOINTS:

POST /auth/login

Log in a user, either due to user action or automatically with remember me function

GET /auth/logout

Logs out a user

GET /auth/user

Get users list

POST /auth/user

Create a new user

DELETE /auth/user

Remove a user

GET /auth/onboarding

Returns whether the onboarding flow needs to be run or not, allowing the creation of a single user without being logged in since no users are present in the database

POST /auth/onboarding

Creates a user account during the onboarding flow

Database API

This API allows import and export of the database

ENDPOINTS:

GET /database/export

Dumps the database to a Json object

POST /database/import

Loads the database from a Json object

Programs API

This API allows the management, compilation and loading of femtoCore programs

ENDPOINTS:

GET /program/hash

Returns a digest indicating the programs store version

POST /program/Apply/(string: program_id)

Loads loads a specified program to a femtoCore

GET /program/compile/(string: program_id)

Compiles the specified program and returns either success or a compilation error

GET /program/(string: program_id)

Returns the specified program

POST /program/(string: program_id)

Create a new program with the specified id

PATCH /program/(string: program_id)

Edit the program with the specified id

DELETE /program/(string: program_id)

Delete the program with the specified id

Scripts API

This API allows the management, of user scripts

ENDPOINTS:

GET /script/hash

Returns a digest indicating the scripts store version

GET /script/(string: script_id)

Returns the specified script

POST /script/(string: script_id)

Create a new script with the specified id

PATCH /script/(string: script_id)

Edit the script with the specified id

DELETE /script/(string: script_id)

Delete the script with the specified id