The PAC Service schema is defined as below:
- basePath: /delegate
- schemes: [https]
Endpoint URL: /pulse
Method: POST
Success Response:
- Code: 200
- Content: {patientId: 1000003, activationCode: 1000067620, regionCode: R1}
- Match all:
- Pass JWT verification
- Pass parameters value verify
- Find activation code
- Match all:
Error Response:
-
Code: 404 NOT FOUND
-
Content: { error: "Patient Activation Code 1000067621 doesn't exist" }
- Match:
- Fail to find Patient Activation code.
- Match:
-
Code: 400 INVALID REQUEST
-
Content: { error: "Invalid request, check parameters or token payload." }
- Match One of them:
- Fail to verify require information in JWT payload.
- Fail to verify JWT signature
- Fail to verify JWT issuer
- Fail to verify JWT expiration
- Fail to verify JWT audience
- Pass non-applicable parameter values
- Match One of them:
-
Code: 403 FORBIDDEN
-
Content: { error: "You don't have permissions to access this resource." }
- Match:
- Failed on JWT verification for endpoint access.
- Match:
-
Code: 500 INTERNAL SERVER ERROR
-
Content: {error: "Internal Server Error. Please try again later."}
- Match:
- Any runtime exception.
- Match:
Sample Call:
$.ajax({
url: localhost:8091/delegate/,
dataType: json,
type : POST,
success : function(data) {
console.log(data);
}
});
- Command line (JAVA 8 must be installed)
- mvn clean install
- cd target
- java -jar "target/NH-PMA-PACRestService-Service.jar" --spring.profiles.active=development