-
Notifications
You must be signed in to change notification settings - Fork 0
GET Sources Table
Ksenyia edited this page Feb 2, 2017
·
4 revisions
Resource URI
/source_table/{type}/{id}
Resource Properties
Property | Description |
---|---|
id | A string that uniquely identifies. |
type | Collection type( for example, request for getting sources are called at country page. sources have following type="country"). Possible variants of the types: project,site,field,concession,contract,commodity. |
Response Attribute
{
errorList: Array,
queries: Array,
sources: [
{
_id: String,
source_name: String,
source_type: String,
source_type_id:
{
_id: String,
source_type_name: String,
source_type_id :String,
source_type_authority: String,
source_type_examples: String,
source_type_url_type: String,
source_type_display: Boolean (true or false)
},
source_url: String,
source_archive_url: String,
source_notes: String,
create_date: Date,
create_author: Array,
retrieve_date: Date,
source_date: Date,
}
]
}
HTTP GET
Default Request
curl -GET http://end-point-uri/source_table/country/57100133bd08c40100abf6de
Response
HTTP Status Code 200
{
errorList: [],
queries: [],
sources: [
{
_id: "57100211bd08c40100ac0489",
source_name: "Africa Power–Mining Database 2014",
source_type: "Africa Power–Mining Database 2014",
source_type_id:
{
_id: "56e873691d1d2a3824141433",
source_type_name: "International organization report",
source_type_id :"ioreport",
source_type_authority: "authoritative",
source_type_examples: "IMF, WB, EIA reports",
source_type_url_type: "Direct link to data in PDF report",
source_type_display: false
},
source_url: "https://databox.worldbank.org/resource/yd4g-ie4d.json",
source_archive_url: "https://drive.google.com/open?id=0BwqM4Vkn0yovekt4dXJPRlRVamM",
source_notes: " ",
create_date: "2016-04-14T20:48:17.595Z",
create_author: [ ],
retrieve_date: "2016-02-17T00:00:00.000Z",
source_date: "2014-07-14T00:00:00.000Z",
},
...
]
}