DHS-Mock-API

(0 reviews)

home

Overview:

Mule Soft API’s exposed to retrieve assessment events, create a new account and enroll candidates to assessments using Janison API’s.

API MethodREST EndpointDescriptionConsumers
1.GET/{version}/assessments/eventsRetrieves list of assessment events- Not Used anymoreMock Exam Portal
2.POST/{version}/candidatesCreates new account for candidates -Not Used anymoreMock Exam Portal
3.POST/{version}/candidates/{candidateId}/enrollmentsEnroll candidates into an assessment -Not Used anymoreMock Exam Portal
4.POST/{version}/billingsMigrate manual billing process from mock portal to SAP.Mock Exam Portal

1. Flow Diagram and Description:

Mock exam portal sends request to DHS mock experience API to get list of assessment event, to create a new account for candidate and to enroll a candidate into an assessment event.

resources/DHS-Interaction-3b9e439c-e4e9-455d-b47f-2be908d06e22.png

Sequence Diagram and Description:

No.StepsDescription
1.Input Request MessageThe Mock exam portal invokes the mule services along with credentials (client id and client secret) and X-TRANSACTION-ID(A code to track API calls end to end) via Mule Soft Secure API layer with the proper query params
2Validate the user CredentialsClient credentials are validated by the security API mule gateway layer
3.If Validation fails, service returns specific fault responseIf Validation fails, service returns specific fault response
4.Send the request to specific Led layered apiThe Mule soft experience API secure layer validated users request query parameters will redirect to the specific Process API.
5.Validate the requestThe request is validated in the Mule System service API and if passed only then it is processed further to Process Api.
6.If Validation fails, service returns specific fault responseIf the request gets failed during the validation the exception is thrown by the Process API to the Experience API secure layer.
7.Fault message redirection by the UserWhen Experience API layer Fails then it returns error message to the consumers
8.Connect to the JanisonProcess API tries to make connection with Janison using X-API-KEY. Connection would be successful if API key is valid
9.On successful connection, Data is retrievedOnce the data is retrieved successfully, the Mule API send it back to Mock exam portal
10.Fault message redirection by the UserWhen Experience API layer Fails then it returns error message to the consumers

resources/DHS-Sequence-9963103d-be16-4b37-99e2-56ad5da296f7.png

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.
  • SQS has been enabled with DLQ and zero message loss is ensured.

End Point details:

DHS Experience API : api/v1/assessments/events

TopicDetails
1.Operation DescriptionRetrieve the Assessments events list from Janison
2.URIGET: /{version}/assessments/events
3.Interface SourceMock exam portal
4.Interface TargetJanison web API
5.Synchronous/AsynchronousSynchronous
6.ProtocolHTTPs
7.URLhttps://apis-sandbox.cambridgeassessment.org.uk/cupa-dhs-mock-xapi-qa1/api/v1/assessments/events?top=20&search=lower
8.Mode of Communication☐ Batch ☐ Message ☒ Real Time
9.Interface Pattern☐ Publish / Subscribe ☒ Request / Reply

DHS Experience API : api/v1/candidates

TopicDetails
1.Operation DescriptionCreates a new Janison Account for a candidate
2.URIPOST: /{version}/candidates
3.Interface SourceMock exam portal
4.Interface TargetJanison web API
5.Synchronous/AsynchronousSynchronous
6.ProtocolHTTPs
7.URLhttps://apis-sandbox.cambridgeassessment.org.uk/cupa-dhs-mock-xapi-qa1/api/v1/candidates
8.Mode of Communication☐ Batch ☐ Message ☒ Real Time
9.Interface Pattern☐ Publish / Subscribe ☒ Request / Reply

DHS Experience API : api/v1/candidates/{candidateId}/enrollments

TopicDetails
1.Operation DescriptionEnroll a candidate into an assessment event
2.URIPOST: /{version}/candidates/{candidateId}/enrollments
3.Interface SourceMock exam portal
4.Interface TargetJanison web API
5.Synchronous/AsynchronousSynchronous
6.ProtocolHTTPs
7.URLhttps://apis-sandbox.cambridgeassessment.org.uk/cupa-dhs-mock-xapi-qa1/api/v1/candidates/{candidateId}/enrollments
8.Mode of Communication☐ Batch ☐ Message ☒ Real Time
9.Interface Pattern☐ Publish / Subscribe ☒ Request / Reply

DHS Experience API : api/v1/billings

TopicDetails
1.Operation DescriptionMigrates manual billing process from mock portal to SAP
2.URIPOST: /{version}/billings
3.Interface Sourcemock portal
4.Interface TargetSAP
5.Synchronous/AsynchronousSynchronous
6.ProtocolHTTPs
7.URLhttps://apis-sandbox.cambridgeassessment.org.uk/cupa-dhs-mock-xapi-dev/api/v1/billings
8.Mode of Communication☐ Batch ☐ Message ☒ Real Time
9.Interface Pattern☐ Publish / Subscribe ☒ Request / Reply

Reviews