Skip to content

GET all Source Types

Ksenyia edited this page Nov 2, 2016 · 8 revisions

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

Resource URI

sourcetypes/{limit}/{skip}

Resource Properties

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

Response Attribute

{
   count: Integer,
   data: [
      {
          _id: String,
          source_type_authority: String,
          source_type_display: Boolean,
          source_type_examples: String,
          source_type_id: String,
          source_type_name: String,
          source_type_url_type: String
     }
   ]
}

HTTP GET

Default Request

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

Response

HTTP Status Code 200

{
   count: 16,
   data: [
      {
          _id: "56e873691d1d2a3824141428",
          source_type_authority: "authoritative",
          source_type_display: true,
          source_type_examples: "EITI report (eg. https://eiti.org/files/EITI-2010-2011-oil-final.pdf)",
          source_type_id: "eiti",
          source_type_name: "EITI report",
          source_type_url_type: "Direct link to data in XLS report"
     }
   ]
}
Clone this wiki locally