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

Skip to end of metadata
Go to start of metadata

Ushahidi V2 has an extensible API; that means you can add new components to it (e.g. add new models to the API etc). 

To do this, you need to:

  1. Add your new API component to the API configuration file, application/config/api.php, so the API knows which files to call when it sees your new type in the API call.  For example, this lines were added to include Messages in the API:
    •  "messages" => "Admin_Messages",
  2. Add a file for your new API component to directory application/libraries/api, e.g. this file was added for Messages API: 
    • application/libraries/api/MY_Messages_Api_Object.php
    • then add code specific to your new API type
  3. Optional: if you want admin-only for all or part of your API to be admin-access-only, then add a file for that too. e.g. this file was added for Admin Messages API: 
    • application/libraries/api/MY_Admin_Messages_Api_Object.php
    • and add code specific to your new API type
  4. Add any new functions needed by the API to your model files, e.g. for Messages API, this file was edited: 
    • application/models/message.php

That's it.