Konnect-Agri / consent-manager

APIs to manage and verify the consent artifact for accessing farmer details.
2 stars 0 forks source link

Auth work, KO integration, etc #29

Closed amit-s19 closed 1 year ago

amit-s19 commented 1 year ago

New Additions

Consent Manager is now generic and supports both REST and GQL operations. -It is now mandatory to provide a new parameter requestType which accepts two values for now, REST or GQL.

Sample Request Body For REST operation

{
    "caId": "6fdb3b47-58e1-46ae-85bb-9d546eb02693",
    "requestType": "REST",
    "queryObject": {
        "method": "POST",
        "headers": {},
        "body": {
             "aadhaar_no": "498279172952"
        },
        "data": ["intDay","intGender","intMaritalStatus","intMonth","intPrimaryMobileNumber"]
    }
}

Significance of fields inqueryObject

method : The type of request method for the database/api headers: Required headers for the request to be performed to fetch data body: Required body for the request to be performed to fetch data. In this case aadhaar_no is the where clause intended data: The information needed to from the entirety of data fetched.