-
Notifications
You must be signed in to change notification settings - Fork 0
GET Productions Table
Ksenyia edited this page Nov 2, 2016
·
11 revisions
Resource URI
/prod_table/{type}/{id}
OR
if type='country'
/prod_table/country/{iso2}
Resource Properties
Property | Description |
---|---|
id | A string that uniquely identifies. |
iso2 | 2 digit ISO country code |
type | Collection type( for example, request for getting productions are called at country page. productions have following type="country"). Possible variants of the types: project,site,field,concession,contract,commodity. |
Response Attribute |
{
production: [
{
_id: String,
production_year: Integer,
production_volume: Integer,
production_unit: String,
production_commodity:
{
_id: String,
commodity_name: String,
commodity_id: String
},
production_level: String,
proj_site:[
{
name: String,
_id: String,
type: String
}
]
}
],
production_query: Array
}
HTTP GET
Default Request
curl -GET http://end-point-uri/prod_table/project/57100133bd08c40100abf6de
OR
if type='country'
curl -GET http://end-point-uri/transfer_table/country/AD
Response
HTTP Status Code 200
{
production: [
{
_id: "5710022fbd08c40100ac1b62",
production_year: 2014,
production_volume: 184000,
production_unit: "tons",
production_commodity:
{
_id: "57100132bd08c40100abf54b",
commodity_name: "Aluminum",
commodity_id: "aluminum"
},
production_level: "project",
proj_site:[
{
name: "Jubilee Field",
_id: "ad-jufi-yqceeo",
type: "project"
}
]
},
...
],
production_query: [
"5710043b76c9bc01003ae1c7",
"57100216bd08c40100ac0775",
"57100216bd08c40100ac0780",
"57100217bd08c40100ac07f4",
"57100217bd08c40100ac07ff",
"57100217bd08c40100ac080a",
...
]
}