You can find the code in the “Get List of all docs available” API. Link