Skip to content

GET Projects Table

Ksenyia edited this page Nov 2, 2016 · 5 revisions

Resource URI

/project_table/{type}/{id}

Resource Properties

Property Description
id A string that uniquely identifies.
type Collection type( for example, request for getting projects are called at country page. projects have following type type="country"). Possible variants of the types: project,site,field,concession,contract,commodity.

Response Attribute

{
    projects: [
        {
            _id: String,
            proj_id: String,
            proj_name: String,
            proj_country: [
                {
                    source: String,
                    country:
                       {
                           iso2: String,
                           name: String,
                           _id: String,
                           country_aliases: Array
                        },
                    timestamp: Date
                }
            ],
            proj_commodity:[
                {
                    source: String,
                    commodity: 
                        {
                            _id: String,
                            commodity_name: String,
                            commodity_type: String,
                            commodity_id: String,
                            commodity_aliases: Array
                         },
                    timestamp: Date     
                }   
            ],
            proj_status:[
                {
                    source: String,
                    _id: String,
                    startTimestamp: Date,
                    timestamp: Date,
                    string: String     
                }
            ],        
            companies: Array
        }
    ]
}    

HTTP GET

Default Request

curl -GET http://end-point-uri/project_table/country/57100133bd08c40100abf6de

Response

HTTP Status Code 200

{
    projects: [
        {
            _id: "57100227bd08c40100ac1651",
            proj_id: "za-akan-dvdwqh",
            proj_name: "Akanani Project",
            proj_country: [
                {
                    source: "57100211bd08c40100ac0489",
                    country:
                       {
                           iso2: "ZA",
                           name: "South Africa",
                           _id: "57100133bd08c40100abf6de",
                           country_aliases: [ ]
                        }
                    timestamp: "2016-04-14T20:44:33.814Z"
                }
            ],
            proj_commodity:[
                {
                    source: "57100211bd08c40100ac0489",
                    commodity: 
                        {
                            _id: "57100132bd08c40100abf587",
                            commodity_name: "Platinum",
                            commodity_type: "mining",
                            commodity_id: "platinum",
                            commodity_aliases: [ ]
                         },
                    timestamp: "2016-04-14T20:44:33.814Z"     
                }   
            ],
            proj_status:[
                {
                    source: "57100211bd08c40100ac0489",
                    _id: "57100227bd08c40100ac1653",
                    startTimestamp: "1992-01-01T00:00:00.000Z",
                    timestamp: null,
                    string: "exploration"     
                }
            ],        
            companies: [
                {
                    _id: "580defc1ca9ab2a23e01d634",
                    company_name: "Albidon Limited"
                }
            ]
        },
        ...
    ]
}    
Clone this wiki locally