...
Parameter | Description | Example |
---|---|---|
sinceid | Least report id that should be returned |
|
maxid | Maximum report id that should be returned |
|
incidentid | Retrieve a single report using its id |
|
locname | Get reports tagged with a specific location name |
|
locid | Get reports tagged with a location with the specified id |
|
cat name | Get reports that belong to a specified category name |
|
catid | Get reports that belong to a category with a id |
|
Returned Values
API The reports request returns JSON with top-level fields payload, error.
- The error field contains message, code; a reports list with no errors should contain message="No Error" and code=0.
- The payload field contains the reports list, and has top-level fields domain, incidents. Domain contains the URL of the ushahidi instance; incidents contains the list of reports. So if your API result goes into variable "result", your incidents list will be in result['payload']['incidents']
- The top-level fields returned for each incident are media, incident, customfields, comments, categories.
- The fields in incident are:
Parameter | Description | Example |
---|---|---|
incidentid | ||
incidenttitle | ||
incidentdescription | ||
incidentdate | ||
incidentactive | Flag for report approved | 1=approved, 0=unapproved |
incidentverified | Flag for report verified | 1=verified, 0-unverified |
incidentmode | Method of report submission | 1=web, 2=sms, 3=email, 4=twitter |
locationid | ||
locationname | ||
locationlatitude | ||
locationlongitude |
Submitting a Report
...
A report is submitted by sending a HTTP POST request to the base URL with report as the task parameter. Additionally, the following parameters must also be specified
...