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.

...

Panel

POST https://api.swiftapp.com/v1/accounts

POST DATA

Code Block
javascript
{
   "name":"Dexter Morgan",
   "account_path":"dexter",
   "email":"dexter@example.com",
   "password":"secret"
}

Response
Code Block
titleResponse
languagejavascript
{
   "id":12,
   "active":false,
   "owner":{
      "name":"Dexter Morgan",
      "email":"bmuita+dexter@gmail.com",
      "username":"bmuita+dexter@gmail.com",
      "avatar":"https://secure.gravatar.com/avatar/30e5ade87d8622944d6244e0fc1f0433?s=80&d=mm&r=g",
      "date_added":null
   },
   "rivers":[],
   "buckets":[],
   "token":"18012e9d-0e26-47f5-848f-ad81c96fc3f4",
   "follower":false,
   "account_path":"dexter",
   "date_added":[],
   "private":false,
   "river_quota_remaining":0,
   "follower_count":0,
   "following_count":0,
   "is_collaborator":false,
   "is_following":false,
   "collaborating_rivers":[],
   "following_rivers":null,
   "collaborating_buckets":[],
   "following_buckets":[]
}

...

Name

Type

Description

account_path

Optional

The name of the desired account.

email

Optional

The email of the desired account.

token

Optional

When present, a user token will be generated for the account.

q

Optional

A search query.

Example Request
Panel
GET https://api.swiftapp.com/v1/accounts?account_path=ushahidi
Code Block
titleResponse
languagejavascript
[{
   "id":1234,
   "account_path":"ushahidi",
   "active":true,
   "public":true,
   "river_quota_remaining":10,
   "date_added":"Mon, 07 Jan 2013 13:08:45 +0000",
   "owner":{
      "name":"Joe Public",
      "email":"joe.public@example.com",
      "date_added":"Mon, 07 Jan 2013 13:08:45 +0000"
   },
   "follower_count":10,
   "following_count":99,
   "is_owner":true,
   "is_collaborator":false,
   "is_subscribed":false,
   "buckets":[
      {
         "id":2,
         "name":"Another Bucket",
         "account_id":"1234567890",
         "subscriber_count":"1",
         "is_owner":true,
         "is_collaborator":false,
         "is_subscribed":false,
         "public":true
      },
      {
         "id":9,
         "name":"Yet Another Bucket",
         "account_id":"3",
         "subscriber_count":"10",
         "is_owner":false,
         "is_collaborator":true,
         "is_subscribed":false,
         "public":false
      }
   ],
   "rivers":[
      {
         "id":2,
         "name":"Another River",
         "account_id":"3",
         "subscriber_count":"1",
         "is_owner":true,
         "is_collaborator":false,
         "is_subscribed":false,
         "public":true,
         "active":false,
         "drop_count":100,
         "drop_quota":10000,
         "full":false,
         "date_added":"Mon, 07 Jan 2013 13:08:45 +0000",
         "expiry_date":"Thu, 07 Feb 2013 13:08:45 +0000",
         "extension_count":0
      },
      {
         "id":9,
         "name":"Yet Another River",
         "account_id":"3",
         "subscriber_count":"10",
         "is_owner":false,
         "is_collaborator":true,
         "is_subscribed":false,
         "public":false,
         "active":false,
         "drop_count":100,
         "drop_quota":10000,
         "full":false,
         "date_added":"Mon, 07 Jan 2013 13:08:45 +0000",
         "expiry_date":"Thu, 07 Feb 2013 13:08:45 +0000",
         "extension_count":0
      }
   ]
}]

...

Panel
GET https://api.swiftapp.com/v1/accounts/1234
Code Block
titleResponse
languagejavascript
{
   "id":1234,
   "account_path":"default",
   "active":true,
   "public":true,
   "river_quota_remaining":10,
   "date_added":"Mon, 07 Jan 2013 13:08:45 +0000",
   "owner":{
      "name":"Joe Public",
      "email":"joe.public@example.com",
      "date_added":"Mon, 07 Jan 2013 13:08:45 +0000"
   },
   "follower_count":10,
   "following_count":99,
   "is_owner":true,
   "is_collaborator":false,
   "is_subscribed":false,
   "buckets":[
      {
         "id":2,
         "name":"Another Bucket",
         "account_id":"1234567890",
         "subscriber_count":"1",
         "is_owner":true,
         "is_collaborator":false,
         "is_subscribed":false,
         "public":true
      },
      {
         "id":9,
         "name":"Yet Another Bucket",
         "account_id":"3",
         "subscriber_count":"10",
         "is_owner":false,
         "is_collaborator":true,
         "is_subscribed":false,
         "public":false
      }
   ],
   "rivers":[
      {
         "id":2,
         "name":"Another River",
         "account_id":"3",
         "subscriber_count":"1",
         "is_owner":true,
         "is_collaborator":false,
         "is_subscribed":false,
         "public":true,
         "active":false,
         "drop_count":100,
         "drop_quota":10000,
         "full":false,
         "date_added":"Mon, 07 Jan 2013 13:08:45 +0000",
         "expiry_date":"Thu, 07 Feb 2013 13:08:45 +0000",
         "extension_count":0
      },
      {
         "id":9,
         "name":"Yet Another River",
         "account_id":"3",
         "subscriber_count":"10",
         "is_owner":false,
         "is_collaborator":true,
         "is_subscribed":false,
         "public":false,
         "active":false,
         "drop_count":100,
         "drop_quota":10000,
         "full":false,
         "date_added":"Mon, 07 Jan 2013 13:08:45 +0000",
         "expiry_date":"Thu, 07 Feb 2013 13:08:45 +0000",
         "extension_count":0
      }
   ]
}

...

/accounts/me

Example Request
Panel
GET https://api.swiftapp.com/

...

v1/accounts/me
Code Block
titleResponse
languagejavascript
{
   "id":1234,
   "account_path":"default",
   "active":true,
   "public":true,
   "river_quota_remaining":10,
   "date_added":"Mon, 07 Jan 2013 13:08:45 +0000",
   "owner":{
      "name":"Joe Public",
      "email":"joe.public@example.com",
      "date_added":"Mon, 07 Jan 2013 13:08:45 +0000"
   },
   "follower_count":10,
   "following_count":99,
   "is_owner":true,
   "is_collaborator":false,
   "is_subscribed":false,
   "buckets":[
      {
         "id":2,
         "name":"Another Bucket",
         "account_id":"1234567890",
         "subscriber_count":"1",
         "is_owner":true,
         "is_collaborator":false,
         "is_subscribed":false,
         "public":true
      },
      {
         "id":9,
         "name":"Yet Another Bucket",
         "account_id":"3",
         "subscriber_count":"10",
         "is_owner":false,
         "is_collaborator":true,
         "is_subscribed":false,
         "public":false
      }
   ],
   "rivers":[
      {
         "id":2,
         "name":"Another River",
         "account_id":"3",
         "subscriber_count":"1",
         "is_owner":true,
         "is_collaborator":false,
         "is_subscribed":false,
         "public":true,
         "active":false,
         "drop_count":100,
         "drop_quota":10000,
         "full":false,
         "date_added":"Mon, 07 Jan 2013 13:08:45 +0000",
         "expiry_date":"Thu, 07 Feb 2013 13:08:45 +0000",
         "extension_count":0
      },
      {
         "id":9,
         "name":"Yet Another River",
         "account_id":"3",
         "subscriber_count":"10",
         "is_owner":false,
         "is_collaborator":true,
         "is_subscribed":false,
         "public":false,
         "active":false,
         "drop_count":100,
         "drop_quota":10000,
         "full":false,
         "date_added":"Mon, 07 Jan 2013 13:08:45 +0000",
         "expiry_date":"Thu, 07 Feb 2013 13:08:45 +0000",
         "extension_count":0
      }
   ]
}

...

Panel

POST https://api.swiftapp.com/v1/accounts/123

POST DATA

Code Block
javascript
{
   "name":"Joe Public Renamed",
}

code
Code Block
titleResponse
languagejavascript
{
   "id":1234,
   "active":true,
   "name":"Joe Public Renamed",
   "account_path":"joepublic",
   "avatar":"http://example.com/avatar.jpg",
   "email":"joe.public@example.com",
   "verified":"false",
   "password":"secret",
   "follower_count":0,
   "following_count":0,
   "is_owner":true,
   "is_collaborator":false,
   "is_subscribed":false,
   "public":true,
   "river_quota_remaining":10,
   "date_added":"Mon, 07 Jan 2013 13:08:45 +0000"
}

...

Panel

GET https://api.swiftapp.com/v1/accounts/9999/followers

code
Code Block
titleResponse
languagejavascript
[
   {
      "id":1234,
      "account_path":"default",
      "subscriber_count":10,
      "subscribed_count":99,
      "is_owner":true,
      "is_collaborator":false,
      "is_subscribed":false,
      "public":true,
      "date_added":"Mon, 07 Jan 2013 13:08:45 +0000"
   },
   {
      "id":43211,
      "account_path":"tluafed",
      "subscriber_count":10,
      "subscribed_count":99,
      "is_owner":true,
      "is_collaborator":false,
      "is_subscribed":false,
      "public":true,
      "date_added":"Mon, 07 Jan 2013 13:08:45 +0000"
   }
]

...

Returns a list of Account objects of accounts the specified account is following.

Resource Path

/accounts/:id/following

Request Parameters

Field

Type

Description

id

Required

The numerical id of the desired account

...

Panel

GET https://api.swiftapp.com/v1/accounts/9999/following

code
Code Block
titleResponse
languagejavascript
[
   {
      "id":1234,
      "account_path":"default",
      "subscriber_count":10,
      "subscribed_count":99,
      "is_owner":true,
      "is_collaborator":false,
      "is_subscribed":false,
      "public":true,
      "date_added":"Mon, 07 Jan 2013 13:08:45 +0000"
   },
   {
      "id":43211,
      "account_path":"tluafed",
      "subscriber_count":10,
      "subscribed_count":99,
      "is_owner":true,
      "is_collaborator":false,
      "is_subscribed":false,
      "public":true,
      "date_added":"Mon, 07 Jan 2013 13:08:45 +0000"
   }
]

...

It the authenticating user request their own account, the Activity stream is activities of accounts it is following. For requests on other accounts, the response is the Activity stream of the account requested.

Resource Path

/accounts/:id/activities

Request Parameters

Field

Type

Description

id

Required

The numerical id of the desired account

...

Panel

GET https://api.swiftapp.com/v1/accounts/9999/activities

code
Code Block
titleResponse
languagejavascript
[
   {
      "id":"1234",
      "account":{
         "id":"1234",
         "account_path":"default",
         "subscriber_count":10,
         "subscribed_count":99,
         "is_owner":true,
         "is_collaborator":false,
         "is_subscribed":false,
         "public":true,
         "date_added":"Mon, 07 Jan 2013 13:08:45 +0000"
      },
      "action_on":"bucket",
      "action_on_obj":{
         "id":"1234",
         "name":"Viva Riva",
         "account_id":"3",
         "follower_count":0,
         "is_owner":true,
         "is_collaborator":false,
         "is_following":false,
         "public":false,
         "active":true,
         "drop_count":0,
         "date_added":"Mon, 07 Jan 2013 13:08:45 +0000"
      }
   }
]

...

The request body is a JSON representation of the Application being added.

Request Parameters

...

Panel

POST https://api.swiftapp.com/v1/accounts/9999/apps

POST DATA

Code Block
javascript
{
   "name":"My App",
   "description":"App Description",
   "redirect_uri":"http://example.com",
   "homepage":"http://example.com"
}
Response
Code Block
javascript
{
   "id":4,
   "name":"My App",
   "description":"App Description",
   "homepage":"http://example.com",
   "client_id":"c755399c-6226-4183-9256-6df9ab439ef2",
   "client_secret":"59630b95-60ad-4700-b89e-fe0c88da5ab1",
   "redirect_uri":"http://example.com"
}

...

GET accounts/:id/apps

Returns a list of Applications registered in the specified account.

...

Panel

GET https://api.swiftapp.com/v1/accounts/9999/apps

Response
Code Block
javascript
[
   {
      "id":4,
      "name":"My App",
      "description":"App Description",
      "homepage":"http://example.com",
      "client_id":"c755399c-6226-4183-9256-6df9ab439ef2",
      "client_secret":"59630b95-60ad-4700-b89e-fe0c88da5ab1",
      "redirect_uri":"http://example.com"
   }
]

...

The request body is a JSON representation of the Application being modified.

NOTE: If the client_id field is set in the request body, the client's credentials will be reset.

...

Panel

PUT https://api.swiftapp.com/v1/accounts/1/apps/4

PUT DATA

Code Block
javascript
{
   "name":"My App",
   "description":"App Description",
   "redirect_uri":"http://example.com",
   "homepage":"http://example.com"
}
Response
Code Block
javascript
{
   "id":4,
   "name":"My App Renamed",
   "description":"App Description Renamed",
   "homepage":"http://example.com/home/renamed",
   "client_id":"c755399c-6226-4183-9256-6df9ab439ef2",
   "client_secret":"59630b95-60ad-4700-b89e-fe0c88da5ab1",
   "redirect_uri":"http://example.com/renamed"
}

...