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

FEATURE: IN PROGRESS DOCS: UP TO DATE

POST media

Create a media

METHOD: POST
ENDPOINT: /api/v2/media/
AUTHENTICATED: YES

Make a multipart/form-data POST request with the following parameters.

Form Parameters
NameTypeDescription
fileRequiredThe path to the image. Supported types are gif,jpg,jpeg,png
captionOptionalA short title or caption for the image to be uploaded

 

 

POST https://ushv3.dev/api/v2/media

 

Response

 

Example request

GET media

Listing all media

METHOD: GET
ENDPOINT: /api/v2/media/
AUTHENTICATED: No

Query Parameters

Name

Type

Description

order

Optional

Returned media will be sorted in this order: ASC or DESC. Default: DESC

order_by

Optional

Returned media will be sorted by this field. Default: created

limit

Optional

Limit number of results returned. Default: 50. Max: 500

offset

Optional

Media returned will be offset by this number of results

Example Request

GET https://ushv3.dev/api/v2/media

Response

 

GET media/:id

Get a single media

METHOD: GET
ENDPOINT: /api/v2/media/:id
AUTHENTICATED: YES

Query Parameters

Name

Type

Description

id

Required

The numerical id of the media being updated.

Example Request

GET http://ushv3.dev/api/v2/media/1

Response

DELETE media/:id

Deleting a media

METHOD: DELETE
ENDPOINT: /api/v2/media/:id
AUTHENTICATED: YES

Query Parameters

Name

Type

Description

id

Required

The numerical id of the media being deleted.

Example request

DELETE /api/v2/media/2

Response
  • No labels