RW API Assessments

52 views
Skip to first unread message

fran6t...@gmail.com

unread,
Jul 29, 2017, 11:11:03 PM7/29/17
to ReliefWeb API Developers
Hello everyone,

Looking for an API for assessment on Cameroon.

1. Could anybody help me with API on assessment (filter could be format on reports) ?
2. Limits is not above 10 and whanever I try limit, impossible to go above 1000. Last time I checked on RW page assessment on Cameroon page were not more than 68. The problem is that nt all results are assessment from Cameroon
3. Is it possible to collect the assessment on reliefweb with the date of starts & date of end of the assessment ?

Help or guidelines will be really apreciated. Thanks

Francis T.

Andy Footner

unread,
Jul 31, 2017, 10:58:33 AM7/31/17
to ReliefWeb API Developers
Hi Francis, thanks for the question.

You're right - this needs a filter on `format`. I find it's useful to work out the query first using the advanced search on the site:

(This is using `primary_country` rather than just `country` to be more specific. And note it's using the id properties rather than the names)

{
 
"filter": {
   
"operator": "AND",
   
"conditions": [
     
{ "field": "format.id", "value": 5 },
     
{ "field": "primary_country.id", "value": 49 }
   
]
 
}
}

Using names rather than ids:
{
 
"filter": {
   
"operator": "AND",
   
"conditions": [
     
{ "field": "format", "value": "Assessment" },
     
{ "field": "primary_country", "value": "Cameroon" }
   
]
 
}
}


To include a date range, with advanced search, for 2014:


works out as:

{
 
"filter": {
   
"operator": "AND",
   
"conditions": [
     
{ "field": "format", "value": "Assessment" },
     
{ "field": "primary_country", "value": "Cameroon" },
     
{ "field": "date.created", "value": { "from": "2014-01-01T00:00:00+00:00", "to": "2014-12-31T23:59:59+00:00" } }
   
]
 
}
}

You can try the json out in http://apidoc.rwlabs.org/#filter

The `limit` "Must be between 0 and 1000, defaults to 10" - http://apidoc.rwlabs.org/#limit

for example:

{
 
"filter": {
   
"operator": "AND",  
   
"conditions": [    
   
{ "field": "format", "value": "Assessment" },
   
{ "field": "primary_country", "value": "Cameroon" }
   
]
 
},
 
"limit": 20
}


Hope that helps - and do let us know if there are parts of the documentation that are confusing. We're always looking for ways to make it more useful.

Andy

fran6t...@gmail.com

unread,
Aug 9, 2017, 12:49:40 PM8/9/17
to ReliefWeb API Developers
Thanks Andy but not really satisfied with the test. Not really working for me.

Andy Footner

unread,
Aug 10, 2017, 3:35:03 AM8/10/17
to ReliefWeb API Developers

Sorry to hear that, Francis - what isn't working? Would filtering by 'country' instead of 'primary_country' help? Can you be more specific about what you're hoping to find?
Reply all
Reply to author
Forward
0 new messages