7
ENTERPRISE APPLICATIONS 24/06/22 Enterpri se Business Integrat ion Hackathon Invite CREYATE

Hackathon deck -_custom_api_policy

Embed Size (px)

Citation preview

Page 1: Hackathon deck -_custom_api_policy

ENTERPRISEAPPLICATION

S

3 May 2023

Enterprise Business

IntegrationHackathon InviteCREYATE

Page 2: Hackathon deck -_custom_api_policy

TOPIC: Generic policy to restrict the response of the API using JSONPath• Problem Statement• API Policy to take JSON Path elements as input to the

API call and based on the input paths, restricts the output values to be shared with the client. For example: Imagine if the response of actual API would have been {"Customer": { "id": 1, "name": "Unilever", "website": "www.unilever.com"}}, then adding the API policy and sending in Customer.id as input should return only {"Customer":{"id": 1}} as response. If we send Customer[id, name], it should send {"Customer": {"id":1, "name": "unilever"}} as response

Page 3: Hackathon deck -_custom_api_policy

Proposed End State Architecture

Page 4: Hackathon deck -_custom_api_policy

Solution Approach: Custom API Policy Creation

• Request calls to API with the filter parameters in query parameters• We process request through java object • This API takes any json path Ex: customer, Employee, Account• Fetch child object upto one level, for example:

Customer:{Id: “”,

Lastname: “”,Office: {city : “”, postalCode: “”}

}

Page 5: Hackathon deck -_custom_api_policy

Solution Approach : JSON Response

• Response comes from backend system

• Traverse response message and create based on input parameters(Query Params)

• Fetch child objects up to one level Ex: Address, Phone number

Page 6: Hackathon deck -_custom_api_policy

Solution Result: Input and Output Parameters

Page 7: Hackathon deck -_custom_api_policy

3 May 2023

•Thank You