REST API

From wiki.gpii
Jump to: navigation, search

All architecture components communicate via a RESTful API with each other. This page lists some suggestions for the API calls that each component exposes. Please note that the API is not final and will be changed/expanded.

User listener

This component doesn't expose an API as it is never called. Communication is outbound only from the user listener to the flow manager.

Flow manager

The Flow manager exposes the following URLs for communication:

  • GET /user/:token/:action is called from a user listener to notify the flow manager that a user has logged in/out. A unique token assigned to the user is passed as well as 'login' or 'logout' for the action.

Preferences server

  • GET /user/:token is called from the flow manager to retrieve the user preferences. A unique token assigned to the user is passed.
  • POST /user/<TOKEN> (where <TOKEN> is the token for the preference set) is used to add a new preference set or modifying an existing one.
    • An example of server-side code that writes to the Preferences Server is available in the EASIT repository.