Examples:

  1. Basic call with defaults
  2. http://api.dhsprogram.com/rest/dhs/v8/countries

  3. How to specify response type as json or xml
  4. http://api.dhsprogram.com/rest/dhs/v8/countries/.json (return json for any call)
    http://api.dhsprogram.com/rest/dhs/v8/countries?f=json

    http://api.dhsprogram.com/rest/dhs/v8/countries/.xml (return xml for any call)
    http://api.dhsprogram.com/rest/dhs/v8/countries?f=xml

  5. Countries filtered by country or countries of interest
  6. http://api.dhsprogram.com/rest/dhs/v8/countries?countryIds=EG (Egypt)

    http://api.dhsprogram.com/rest/dhs/v8/countries/BJ,BF,CV,CI,GH,GN,LB,ML,MR,NI,NG,SN,SL,TG (Western Africa)

  7. Countries limited to a specific survey
  8. http://api.dhsprogram.com/rest/dhs/v8/countries/TZ2010DHS

    http://api.dhsprogram.com/rest/dhs/v8/countries?surveyIds=TZ2010DHS

  9. Filter on a specific year
  10. http://api.dhsprogram.com/rest/dhs/v8/countries?surveyYear=2010

  11. Find Countries in for a specific range of years
  12. http://api.dhsprogram.com/rest/dhs/v8/countries/PK?surveyYearStart=2006

    http://api.dhsprogram.com/rest/dhs/v8/countries/PK?surveyYearStart=1991&surveyYearEnd=2006

  13. Pagination
  14. http://api.dhsprogram.com/rest/dhs/v8/countries?perpage=50 (returns first 50 entries)

    http://api.dhsprogram.com/rest/dhs/v8/countries?perpage=50&page=2 (returns second page of 50 entries)