-
Notifications
You must be signed in to change notification settings - Fork 0
GET all Contracts
Ksenyia edited this page May 13, 2016
·
15 revisions
Getting list of the contracts limited by 2 parameters "limit" and "skip". To get the whole list, please set limit=0 and skip=0 (Resource URI: 'contracts/0/0')
Resource URI
contracts/{limit}/{skip}
Resource Properties
Parameter | Description |
---|---|
limit | It limit the search. Default is 50. Eg. contracts/50/0 |
skip | Offset of next page result. Default is 0. Eg. contracts/50/0 |
Response Attributes
{
count: Integer,
data: [
{
_id: String,
contract_id: String,
rc_info: [
{
contract_name: String,
contract_country:
{
code: String,
name: String
},
contract_commodity: Array,
contract_type: Array
}
],
commodities: Array
commodity: [
{
commodity_name: String,
commodity_type: String,
_id: String,
commodity_id: String
}
],
projects: Integer,
sites: Integer,
fields: Integer
}
]
}
HTTP GET
Default Request
curl -GET http://end-point-uri/contracts/50/0
Response
HTTP Status Code 200
{
count: 10,
data: [
{
_id: "56fcd5ef641ff90100865659"
contract_id: "ocds-591adf-GH0615661588RC",
rc_info: [
{ }
],
commodities: { },
commodity: { },
projects: 2,
sites: 0,
fields:0
},
{
_id: "56fcd5f0641ff90100865675"
contract_id: "ocds-591adf-GH1577304824RC",
rc_info: [
{
contract_name: "Tullow, Sabre, Kosmos, Ghana, 2006",
contract_country:
{
code: "GH",
name: "Ghana"
},
contract_commodity: ["Hydrocarbons"],
contract_type: ["Concession Agreement"]
}
],
commodities: ["Hydrocarbons"],
commodity: [
{
commodity_name: "Hydrocarbons",
commodity_type: "oil_and_gas",
_id: "56fcd1e3be65cd01000bd2dc",
commodity_id: "hydrocarbons"
}
],
projects: 2,
sites: 0,
fields:0
},
...
]
}