Custom Query API

Sakhi2.0 allows you to save the implementation-related queries in the custom query table. Right now, there is no UI, and the implementer needs to insert the query manually into the DB.

Sample insert statement

Once the query is saved in the DB one can fire the post request to /execute Query endpoint with the request body

Below is the output response

{
    "headers": [
        "Full name",
        "Gender"
    ],
    "data": [
        [
            "Hetram  Kewat Kewat",
            "Male"
        ],
        [
            "Reesham Kumar Panika",
            "Male"
        ],
        [
            "Ambika Prasad Panika",
            "Male"
        ],
        [
            "Shiv Prasad Panika",
            "Male"
        ],
        [
            "Aman Kumar Panika",
            "Male"
        ],
        [
            "Chandan Prasad Panika",
            "Male"
        ],
        [
            "Suraj Kumar Panika",
            "Male"
        ],
        [
            "Birendra Kumar Panika",
            "Male"
        ],
        [
            "Naresh Prasad Panika",
            "Male"
        ]
    ],
    "total": 9
}

Notes

Right now casts need to be handled in the query itself, for example in the above query casting of date param.