FOR ARCHIVAL PURPOSES ONLY

The information in this wiki hasn't been maintained for a good while. Some of the projects described have since been deprecated.

In particular, the "Ushahidi Platform v3.x" section contains information that is often misleading. Many details about this version of Platform have changed since.

This website is an extraction of the original Ushahidi wiki into a static form. Because of that, functions like logging in, commenting or searching will not work.

For more documentation, please refer to https://docs.ushahidi.com

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Overview

We'll store device details and store sensor readings over time.

...

Code Block
titlePOST /api/v2/posts/:id/updates
linenumberstrue
languagejs
{
    "form_id": 2,
    "locale":"en_US",
    "type": "update",
    "status": "published",
    "values":{
        "unit": "cpm",
        "value": 20,
        "captured_at": "2013-03-10T07:43:41Z"
    }
}

 

Forms

Image Added

At the core of Ushahidi is posts and posts are defined by forms. Forms are basically templates. They allow the system to structure the data correctly by defining what is expected along with making sure it is valid. Forms can have sub-forms. The reason for this is illustrated above. You want one form to define what a device is. Next you want another form to define the datastreams generated by this device.

Why not have a single form? Each time you receive a new sensor reading, having a single form with the device information and sensor readings just means you'd have a lot more columns and some like the device information that doesn't change over time being repeated over and over, consuming unnecessary resources.

Posts & Endpoints

Image Added

  • The device we created above is accessible at GET:/api/v2/posts/1, where 1 is the id of the device.
  • The endpoint that sensors would transmit readings to is accessible at POST:/api/v2/posts/1/updates
  • form_id lets the endpoint know which datastream is posting to. In this case form_id:1 is for the radiation readings and form_id:2 is for lat/lon