Hackathon deck -_custom_api_policy

  • View
    22

  • Download
    0

  • Category

    Design

Preview:

Citation preview

ENTERPRISEAPPLICATION

S

3 May 2023

Enterprise Business

IntegrationHackathon InviteCREYATE

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

Proposed End State Architecture

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: “”}

}

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

Solution Result: Input and Output Parameters

3 May 2023

•Thank You