-
Notifications
You must be signed in to change notification settings - Fork 0
GET Site or Field By ID
Ksenyia edited this page Feb 2, 2017
·
3 revisions
It gives the data of site or field like title, country, commodities and so on.
Resource URI
/sites/{id}
Resource Properties
Property | Description |
---|---|
id | A string that uniquely identifies the site or field. |
Response Attribute
{
concessions: [
{
_id: String,
concession_established_source: String,
concession_name: String,
concession_country: [
{
source: String,
country: String,
timestamp: Date
},
{
source: String,
country: String,
timestamp: Date
}
]
}
],
contracts: [
{
_id: String,
contract_title: String,
contract_id: String
}
],
errorList: Array,
site: {
_id: String,
field: Boolean (true or false),
site_established_source: String,
site_name: String,
site_company_share: String,
site_status: String,
site_coordinates: {
_id: String,
lat: Float,
lng: Float,
message: String,
timestamp: Date,
type: String
},
site_country: [
{
_id: String,
iso2: String,
name: String,
country_aliases: Array
}
],
site_commodity: Array
},
projects: [
{
_id: String,
proj_established_source: String",
proj_name: String,
proj_id: String,
proj_country: [
{
country: String,
source: String,
timestamp: Date
}
],
proj_status: [
{
source: String,
_id: String,
timestamp: Date,
string: String
}
],
proj_aliases: Array,
proj_commodity: {
source: String,
commodity: String,
timestamp: Date
}
}
],
site_commodity: [
{
_id: String,
commodity_name: String,
commodity_type: String,
commodity_id: String,
commodity_aliases: Array
}
]
}
HTTP GET
Default Request
curl -GET http://end-point-uri/sites/56fcd3d9be65cd01000bd886
Response
HTTP Status Code 200
{
concessions: [
{
_id: "585bb9e78bb3aa000f2121c1",
concession_established_source: "585bb9e68bb3aa000f2120fd",
concession_name: "Las Bambas",
concession_country: [
{
source: "585bb9e68bb3aa000f2120f7",
country: "5808851f5e0ba42fc79bd5c1",
timestamp: "2016-12-22T11:17:39.000Z"
},
{
source: "585bb9e68bb3aa000f2120fd",
country: "5808851f5e0ba42fc79bd5c1",
timestamp: "2016-12-22T11:17:39.000Z"
}
]
}
],
contracts: [
{
_id: "585bb9e78bb3aa000f2121c3",
contract_title: "Xtrata-Tintaya",
contract_id: "Xtrata-Tintaya"
}
],
errorList: [],
site: {
_id: "585bb9e78bb3aa000f2121c5",
field: false,
site_established_source: "585bb9e68bb3aa000f2120fd",
site_name: "Espinar",
site_company_share: null,
site_status: null,
site_coordinates: {
_id: "585bb9e78bb3aa000f2121c5",
lat: -14.96387164,
lng: -71.38617712,
message: "Espinar",
timestamp: "2016-12-22T11:17:39.000Z",
type: "site"
},
site_country: [
{
_id: "5808851f5e0ba42fc79bd5c1",
iso2: "PE",
name: "Peru",
country_aliases: []
}
],
site_commodity: []
},
projects: [
{
_id: "585bb9e78bb3aa000f212173",
proj_established_source: "585bb9e68bb3aa000f2120f3",
proj_name: "Las Bambas",
proj_id: "pe-las -5k6jsk",
proj_country: [
{
country: "5808851f5e0ba42fc79bd5c1",
source: "585bb9e68bb3aa000f2120f3",
timestamp: "2016-12-22T11:17:39.000Z"
}
],
proj_status: [
{
source: "585bb9e68bb3aa000f2120f3",
_id: "585bb9e78bb3aa000f212174",
timestamp: "2014-01-01T00:00:00.000Z",
string: "development"
}
],
proj_aliases: [],
proj_commodity: {
source: "585bb9e68bb3aa000f2120f3",
commodity: "5808851f5e0ba42fc79bd46b",
timestamp: "2016-12-22T11:17:39.000Z"
}
}
],
site_commodity: [
{
_id: "5808851f5e0ba42fc79bd46b",
commodity_name: "Copper",
commodity_type: "mining",
commodity_id: "copper",
commodity_aliases: []
}
]
}