Postman
WARNING: Due to postman storing in remote servers in plaintext do not store production credentials in variables
Configuring postman
Import the Document Data Capture (DDC) collection /scripts/postman/Full_DDC_Ingest.postman_collection.json
Add environment configuration with and set the url, lpaId and courtReference variables
E.g Environment Name: Local * url: http://localhost:8080 * lpaId: 700000003520 * courtReference: 69023357
Note: If you are using localhost then build the environment with __INSECURE_COOKIES=1 make dev-up
or the xsrf token will not work
When sending requests to environment deployed to AWS the environment in the url should start with a “ddc.” prefix for production-like environments and “ddc-”
- Production: http://ddc.sirius-opg.uk/
- Preproduction: https://ddc.preproduction.sirius.opg.digital/
- On demand/development: http://ddc-sw-xxxx.dev.sirius.opg.digital/
Note: The lpaId and courtReference will need to match a valid case in Sirius
Getting valid IDs
Log in to the environment you are targeting Find a case (search for Dauphin in most environments) The long ID (7000-xxxx-xxxx-xxxx) can have the hyphens stripped and be used as an lpaId The courtReference is in the upper left labeled Court Reference
Credentials
Log in credentials are in the “Log in” test body and should work on all local, developer, and feature environments
XSRF/CSRF Cross Site Request Forgery
To make requests that successfully pass a CSRF check the x-xsrf-token header needs to be set
This is done for all existing tests in the DDC collection by getting the token in the “Log in” test
var xsrfCookie = postman.getResponseCookie("XSRF-TOKEN"); postman.setEnvironmentVariable('xsrfToken', decodeURIComponent(xsrfCookie.value));
under the “Tests” tab
and setting the header in the other requests
x-xsrf-token:{{xsrfToken}}