-
Notifications
You must be signed in to change notification settings - Fork 0
GET all Concessions
Ksenyia edited this page Feb 1, 2017
·
10 revisions
Getting list of the concessions limited by 2 parameters "limit" and "skip". To get the whole list, please set limit=0 and skip=50000 (Resource URI: 'concessions/0/50000')
Resource URI
concessions/{limit}/{skip}
Resource Properties
Parameter | Description |
---|---|
limit | It limit the search. Default is 50. Eg. concessions/50/0 |
skip | Offset of next page result. Default is 0. Eg. concessions/50/0 |
Response Attributes
{
count: Integer,
errorList: Array,
concessions: [
{
_id: String,
concession_name: String,
concession_commodity:[
{
_id: String,
commodity_name: String,
commodity_type: String,
commodity_id: String
}
],
concession_country: [
{
iso2: String,
name: String,
_id: String
}
],
concession_status: Array,
project_id: Array
project_count: Integer,
site_count: Integer,
field_count: Integer,
transfer_count: Integer,
production_count: Integer
}
]
}
HTTP GET
Default Request
curl -GET http://end-point-uri/concessions/50/0
Response
HTTP Status Code 200
{
count: 3,
data: [
{
_id: "56a2b8236e585b7316655794",
concession_name: "Block A",
concession_commodity:[
{
_id: "56f8c98288a702461470903c",
commodity_name: "Ferrochrome",
commodity_type: "mining",
commodity_id: "ferrochrome"
}
],
concession_country: [
{
iso2: "AD",
name: "Andorra",
_id: "56f8c98288a7024614708e98"
}
],
concession_status: null,
project_id: [
"56a2b8236e585b7316655794",
"56a930f41b5482a31231ef43",
"56a930f41b5482a31231ef42",
"56eb117c0007bf5b2a3e4b76"
],
project_count: 3,
site_count: 1,
field_count: 0,
transfer_count: 60,
production_count: 5
},
...
]
}