Skip to content

GET all Countries

Ksenyia edited this page May 13, 2016 · 5 revisions

Getting list of the countries limited by 2 parameters "limit" and "skip". To get the whole list, please set limit=0 and skip=0 (Resource URI: 'countries/0/0')

Resource URI

countries/{limit}/{skip}

Resource Properties

Parameter Description
limit It limit the search. Default is 50. Eg. countries/50/0
skip Offset of next page result. Default is 0. Eg. countries/50/0

Response Attribute

{
   count: Integer,
   data: [
      {
         iso2: String,
         name: String,
         _id: String,
         country_aliases: Array,
         project_count: Integer,
         site_count: Integer,
         field_count: Integer,
         concession_count: Integer
      }
   ] 
}

HTTP GET

Default Request

curl -GET http://end-point-uri/countries/50/0

Response

HTTP Status Code 200

{
   count: 50,
   data: [
     {
         iso2: "MX",
         name: "Mexico",
         _id: "56f8c98288a7024614708f34",
         country_aliases: [ ],
         project_count: 50,
         site_count: 0,
         field_count: 0,
         concession_count: 1
      },
      ...
   ]
}
Clone this wiki locally