Skip to content

Latest commit

 

History

History
executable file
·
111 lines (80 loc) · 2.79 KB

server-rest.md

File metadata and controls

executable file
·
111 lines (80 loc) · 2.79 KB

TabPy REST Interface

The server process exposes several REST APIs to get status and to execute Python code and query deployed methods.

GET /info

Get static information about the server. The method doesn't require any authentication and returns supported API versions which the client can use together with optional and required features.

URL

/info

Method

GET

URL parameters

None.

Data Parameters

None.

Response

For a successful call:

  • Status: 200

  • Content:

    {
        "description": "",
        "creation_time": "0",
        "state_path": "e:\\dev\\TabPy\\tabpy-server\\tabpy_server",
        "server_version": "0.4.1",
        "name": "TabPy Server",
        "versions": {
            "v1": {
                "features": {
                    "authentication": {
                        "required": true,
                        "methods": {
                            "basic-auth": {}
                        }
                    }
                }
            }
        }
    }

Response fields:

Property Description
description String that is hardcoded in the state.ini file and can be edited there.
creation_time Creation time in seconds since 1970-01-01, hardcoded in the state.ini file, where it can be edited.
state_path State file path of the server (the value of the TABPY_STATE_PATH at the time the server was started).
server_version TabPy Server version tag. Clients can use this information for compatibility checks.
name TabPy server instance name. Can be edited in state.ini file.
version Collection of API versions supported by the server. Each entry in the collection is an API version which has a corresponding list of properties.
version.<ver> Set of properties for an API version.
version.<ver>.features Set of an API's available features.
version.<ver>.features.<feature> Set of a feature's properties. For specific details for a particular property meaning of a feature, check the documentation for the specific API version.
version.<ver>.features.<feature>.required If true the feature is required to be used by client.

See TabPy Configuration section for more information on modifying the settings.

  • Examples

Calling the method with curl:

curl -X GET http://localhost:9004/info

API versions

TabPy supports the following API versions: