Sessions API
Session - A period of time in which assessments are taking place
home
Overview:
Sessions API is used to fetch sessions data from EPS and CAMS based upon query parameters provided with the request.
| API Method | REST Endpoint | Description | Consumers | |
|---|---|---|---|---|
| 1. | GET | /{version}/businessStreams/{businessStreamId}/sessions | List of sessions in a year for a business stream | EMOD, Teach Cambridge | 
| 2. | GET | /{version}/businessStreams/{businessStreamId}/sessions/{sessionId} | Get details of a particular session for CI, CE or OCR | EMOD, Teach Cambridge | 
| 3. | GET | /{version}/vocational-qualifications/sessions | Get details of Vocational Qualification Sessions | Not Used | 
| 4. | GET | /{version}/epsStatus | Get server status of MEPS and OEPS , whether the server is UP or DOWN | EMOD | 
Flow Diagram and Description:

- Get list of Sessions : Get List of sessions for any business stream. Also Session data could be filtered for a year, qualification and assessment
 - Get Session details : Get session details start date, end date, Session Type and status for one Session Id
 - Get Vocational Qualification Session Details : Get vocational qualification details Annual or specific period, start date, end date.. etc. Also data can be filtered for one Qualification Group (Say, Cambridge Technicals)
 - Get EPS Status Session Details : Get Eps status details is used to check the meps and oeps database servers are up
 
Sequence Diagram:

Steps In Sequence Diagram
| No | Steps | Description | 
|---|---|---|
| 1. | Input Request Message | The sessions invokes the mule services along with credentials (client id and client secret) and XTRANSACTION-ID(A code to track API calls end to end) via Mule Soft Secure API layer with the proper query params | 
| 2. | Validate the user Credentials | Desktop user credentials are validated by the security API mule gateway layer | 
| 3. | If validation fails, service returns specific fault response | If validation fails, service returns specific fault response | 
| 4. | Send the request to specific Led layered api | The Mule soft experience API secure layer validated users request query parameters will redirect to the specific system API. | 
| 5. | Validate the request | The request is validated in the Mule System service API and if passed only then it is processed further to ca-eps-sapi/ca-cams-sapi | 
| 6. | If Validation fails, service returns specific fault response | If the request gets failed during the validation the exception is thrown by the System API to the Experience API secure layer. | 
| 7. | Fault message redirection by the User | When Experience API layer Fails then it returns error message to the consumers | 
| 8. | Connect to the database | Eps/Cams Service System API establishes the connection with the database to retrieve the data from the database. | 
| 9. | a) Oracle connection Exception b) On Oracle connection failure, return error message | If there is any connection failure during the step 5, the Oracle Exception is thrown by the service. | 
| 10. | On successful connection, retrieve the data of entries, components, sessions, qualifications and center from database. | After establishing successful DB connection, data of specific resource is retrieved from respective views. | 
| 11. | Return response | Returns the success response. | 
Exception Handling:
- Custom Error handler is used to handle API Kit errors as well as user defined errors.
 - HTTP endpoints have been configured with reconnection strategies with maximum of 2 retry attempts.
 
End Point details:
Sessions Experience API : /v1/businessStreams/{businessStreamId}/sessions
| Topic | Details | |
|---|---|---|
| 1. | Operation Description | Retrieve sessions details from EPS | 
| 2. | URI | GET: /{version}/businessStreams/{businessStreamId}/sessions | 
| 3. | Interface Source | Sessions Application | 
| 4. | Interface Target | ca-eps-sapi | 
| 5. | Synchronous/Asynchronous | Synchronous | 
| 6. | Protocol | HTTPS | 
| 7. | URL | https://apis-sandbox.cambridgeassessment.org.uk/ca-sessions-qa1/v1/businessStreams/01/sessions | 
| 8. | Mode of Communication | ☐ Batch ☐ Message ☒ Real Time | 
| 9. | Interface Pattern | ☐ Publish / Subscribe ☒ Request / Reply | 
Sessions Experience API : /v1/businessStreams/{businessStreamId}/sessions/{sessionId}
| Topic | Details | |
|---|---|---|
| 1. | Operation Description | Retrieve sessions data with session ID from EPS | 
| 2. | URI | GET: /{version}/businessStreams/{businessStreamId}/sessions/{sessionId} | 
| 3. | Interface Source | Sessions Application | 
| 4. | Interface Target | ca-eps-sapi | 
| 5. | Synchronous/Asynchronous | Synchronous | 
| 6. | Protocol | HTTPS | 
| 7. | URL | https://apis-sandbox.cambridgeassessment.org.uk/ca-sessions-qa1/v1/businessStreams/01/sessions/8 | 
| 8. | Mode of Communication | ☐ Batch ☐ Message ☒ Real Time | 
| 9. | Interface Pattern | ☐ Publish / Subscribe ☒ Request / Reply | 
Sessions Experience API : /v1/vocational-qualifications/sessions
| Topic | Details | |
|---|---|---|
| 1. | Operation Description | Return a list of data based on query params provided in request from CAMS. | 
| 2. | URI | GET: /{version}/vocational-qualifications/sessions | 
| 3. | Interface Source | Sessions Application | 
| 4. | Interface Target | ca-cams-sapi | 
| 5. | Synchronous/Asynchronous | Synchronous | 
| 6. | Protocol | HTTPS | 
| 7. | URL | https://apis-sandbox.cambridgeassessment.org.uk/ca-sessions-qa1/v1/vocational-qualifications/sessions | 
| 8. | Mode of Communication | ☐ Batch ☐ Message ☒ Real Time | 
| 9. | Interface Pattern | ☐ Publish / Subscribe ☒ Request / Reply | 
Sessions Experience API : /v1/epsStatus
| Topic | Details | |
|---|---|---|
| 1. | Operation Description | Get server status of MEPS and OEPS , whether the server is UP or DOWN | 
| 2. | URI | GET: /{version}/epsStatus | 
| 3. | Interface Source | Sessions Application | 
| 4. | Interface Target | ca-eps-sapi | 
| 5. | Synchronous/Asynchronous | Synchronous | 
| 6. | Protocol | HTTPs | 
| 7. | URL | https://apis-sandbox.cambridgeassessment.org.uk/ca-sessions-qa1/v1/epsStatus | 
| 8. | Mode of Communication | ☐ Batch ☐ Message ☒ Real Time | 
| 9. | Interface Pattern | ☐ Publish / Subscribe ☒ Request / Reply |