Skip to content

GET Projects

Ksenyia edited this page Feb 1, 2017 · 2 revisions

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

Resource URI

all_projects/{limit}/{skip}

Resource Properties

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

Response Attribute

{
   count: Integer,
   errorList: Array,
   projects: [
     {
         _id: String,
         proj_id: String,
         proj_name: String,
         proj_country: [
           {
                iso2: String,
                name: String,
                _id: String,
            },
         ],
         companies: [
           {
                company_name: String,
                _id: String,
            },
         ]
     }
  ]
}

HTTP GET

Default Request

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

Response

HTTP Status Code 200

{
   count: 54,
   errorList: [],
   projects: [
     {
         _id: "570f7b1f935d3b3dd5dbe701",
         proj_id: "adar-gok3sd",
         proj_name: "Adargas",
         proj_country: [
           {
                iso2: "MX",
                name: "Mexico",
                _id: "56f8c98288a7024614708f34"
            },
            ...
         ],
         companies: [
           {
                company_name: "Suncor Energy UK Limited",
                _id: "585bb82d8bb3aa000f20b77a",
            },
            ...
         ]
     },
     ...
  ]
}
Clone this wiki locally