1.2.10. rest_api

This module provides the functionality exposed by the server application’s REST API.

1.2.10.1. Data

REST_API_BASE[source]

The base URI path for REST API requests.

1.2.10.2. Functions

generate_token()[source]

Generate the token to be checked when REST API requests are made.

Returns:The API token
Return type:str
rest_handler(handle_function)[source]

A function for decorating REST API handlers. The function checks the API token in the request and encodes the handler response in JSON to be sent to the client.

Parameters:handle_function – The REST API handler.