Flow Manager API
From wiki.gpii
See Also |
For the most recent documentation (i.e. after the integration of "Fireball") see:
- Kasper's mail "C4A: Instructions for SP3 integrations using the GPII CloudBased Flowmanager", 2 December 2014;
- the Flow Manager documentation on GitHub.
Contents
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>
- saves a new preferences set
- returns a new user token
/user/<token>
Method: GET
- returns preference set JSON object
Method: PUT
- updates preference set
Login State
/user/<token>/login
Method: GET (should be POST)
- logs the user into the local device
/user/<token>/logout
Method: GET (should be POST)
- logs the user out of the local device
/token
Method: GET
- returns the user token of the currently-logged in user
Live Changes
#/save/[token]
Method: POST
- saves the current user's preference set to the preference server
/update/
Method: Web Sockets Payload: an updated NP set
- applies real-time settings (i.e. by the PCP)
Stateless Resources
/snapshot
Method: GET
- returns a NP set representing the current settings of the device
/<token>/settings/<device info payload>
Method: GET
- 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.