Elastic Access Workflow When Using Sessions
The basic workflow consists of calls to the /sessions REST APIs, which are initiated by the client application. The calls are described in the following table:
API Call |
Session Status |
Client Application Activity |
Elastic Access Service Activity |
POST |
IDLE |
Initiate a session. |
None. |
PUT |
ACTIVE |
Make access requests for items during a session at any time, repeatedly. |
Keep record of items that client application is using. Make automatic charge every hour. Send usage and automatic charge information to data warehouse. |
GET |
ACTIVE |
Send heartbeat within 30 minutes of last automatic charge to indicate that item is still being used (otherwise session ends). Client needs to read response. If 204, continue. Any other reponse, close application. See also Sending a Heartbeat. |
If no heartbeat received within 30 minutes of last automatic charge, terminate the session. |
DELETE |
TERMINATED |
End the session. |
Terminate the session. Make refunds to adjust charge to time; send information to data warehouse. |
The following diagram illustrates the workflow:
Diagram showing a simple workflow when using sessions.
For workflows showing automatic charges and sending a heartbeat, see the sections Automatic Charging Concepts and Sending a Heartbeat, respectively.
See also
Dynamic Monetization REST APIs