Flow Manager API

From wiki.gpii
Jump to: navigation, search
See Also

Flow Manager

For the most recent documentation (i.e. after the integration of "Fireball") see:

RESTful APIs

Local Deployment

  • Logging in the user on a particular device/platform
    // HTTP GET
    {url_to_Flow_Manager}/user/{user_token}/login

    // For example:
    // localhost:8081/user/carla/login
  • Logging out the user of a particular device/platform
    // HTTP GET
    {url_to_Flow_Manager}/user/{user_token}/logout

    // For example:
    // localhost:8081/user/carla/logout

Cloud Based Deployment

  • Getting the solutions and settings for the particular platform/app:
    // HTTP GET
    {url_to_Flow_Manager}/{user_token}/settings/:device
    // where :device is an url encoded {device: "..."} block.

    // For example:
    // flowmanager.gpii.net/carla/settings/%7B%22OS%22%3A%20%7B%7D%2C%20%22solutions%22%3A%20%5B%5D%7D
    // GET with {
    //     "OS": {},
    //     "solutions": []
    // }


Full List of Flow Manager Resources

User Preferences

/user/

Provides a proxy to the preference server Method: POST Payload: <preference set>

  1. saves a new preferences set
  2. returns a new user token
/user/<token>

Method: GET

  1. returns preference set JSON object

Method: PUT

  1. updates preference set

Login State

/user/<token>/login

Method: GET (should be POST)

  1. logs the user into the local device
/user/<token>/logout

Method: GET (should be POST)

  1. logs the user out of the local device
/token

Method: GET

  1. returns the user token of the currently-logged in user

Live Changes

#/save/[token]

Method: POST

  1. saves the current user's preference set to the preference server
/update/

Method: Web Sockets Payload: an updated NP set

  1. applies real-time settings (i.e. by the PCP)

Stateless Resources

/snapshot

Method: GET

  1. returns a NP set representing the current settings of the device
/<token>/settings/<device info payload>

Method: GET

  1. statelessly returns settings for a remote client

Technical Notes on the Cloud-Based Flow Manager

  • The configuration for the cloud-based Flow Manager is built upon the configuration for the production Flow Manager.
  • The cloud-based Flow Manager provides CORS support.
  • The configuration for the cloud-based Flow Manager strips off support for the Device reporter and Lifecycle Manager server data source, and disables user login and logout.