Integration using Simulator
This page outlines the usage of Response Simulator by AA, FIU or FIP with entity APIs for the integration of Proxy. This Response Simulator will simulate the behaviour of the actual entity APIs to facilitate Sahamati proxy usage and testing.
Overview:
The Response Simulator is designed to simulate the behaviour of real Entity’s Protocol APIs. It provides a controlled environment for developers to test and verify proxy service without relying on an actual entity.
The sample workflow diagram below illustrates the usage of the Response Simulator by including a simulated response with the expected response.
The following two details are required in the request to use the APIs with Response Simulator:
x-recipient-id: This header specifies the proxy that will route the request to the respective response simulator. The available options are,
AA-SIMULATOR
FIU-SIMULATOR and
FIP-SIMULATOR.
x-simulate-res: This header should contain a hint for the expected response from the response simulator. It can be any of the options listed in the specific entity tables. If this is not included, the response simulator will default to returning a 200 OK response.
Sample Request Headers:
API Specifications:
AA - Response Simulator:
This AA response simulator will support all the APIs listed under this ReBIT Spec - https://api.rebit.org.in/viewSpec/AA_2_1_0.yaml
API | Expected Response | x-simulate-res Header Options |
---|---|---|
All | 200 OK | Ok |
All | 400 Bad Request | BadRequest |
All | 401 Unauthorized Access | Unauthorized |
All | 404 Not Found | NotFound |
All | 409 Conflict | Conflict |
All | 412 Precondition failed | PreconditionFail |
All | 501 Not Implemented | NotImplemented |
All | 503 Service Unavailable | ServiceUnavailable |
FI/fetch | 403 Forbidden (DataFetchRequestInProgress) | Forbidden |
FI/fetch | 410 Data Gone | DataGone |
All | Timeout Scenario (delay in sending response) | TimeOut |
Sample FI/fetch workflow using AA-SIMULATOR:
FIU Response Simulator
This FIU response simulator will support all the APIs listed under this ReBIT Spec - https://api.rebit.org.in/viewSpec/FIU_2_0_0.yaml
API | Expected Response | x-simulate-res Header Options |
---|---|---|
All | 200 OK | Ok |
All | 400 Bad Request | BadRequest |
All | 401 Unauthorized Access | Unauthorized |
All | 404 Not Found | NotFound |
All | 409 Conflict | Conflict |
All | 412 Precondition failed | PreconditionFail |
All | 501 Not Implemented | NotImplemented |
All | 503 Service Unavailable | ServiceUnavailable |
All | Timeout Scenario (delay in sending response) | TimeOut |
FIP Response Simulator:
This FIP response simulator will support all the APIs listed under this ReBIT Spec - https://api.rebit.org.in/viewSpec/FIP_2_1_0.yaml
API | Expected Response | x-simulate-res Header Options |
---|---|---|
All | 200 OK | Ok |
All | 400 Bad Request | BadRequest |
All | 401 Unauthorized Access | Unauthorized |
All | 404 Not Found | NotFound |
All | 409 Conflict | Conflict |
All | 412 Precondition failed | PreconditionFail |
All | 501 Not Implemented | NotImplemented |
All | 503 Service Unavailable | ServiceUnavailable |
FI/fetch | 403 Forbidden (DataFetchRequestInProgress) | Forbidden |
All | Timeout Scenario (delay in sending response) | TimeOut |
Last updated