Write api to get data

Signed-off-by: Ramnique Singh <mail@ramniquesingh.name>