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.

Status
colourGreen
titleFeature: complete
 
Status
colourYellowGreen
titleDocs: Need UPDATEUP TO DATE
subtletrue

 

Excerpt
Panel
Table of Contents
maxlevel2

...

METHOD: GET
ENDPOINT: /api/v2/forms/:form_id/groups/
AUTHENTICATED: No

Query Parameters (Not implemented yet)

Name

Type

Description

order

Optional

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

order_by

Optional

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

limit

Optional

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

offset

Optional

groups returned will be offset by this number of results

...

METHOD: GET
ENDPOINT: /api/v2/forms/:form_id/groups/:id
AUTHENTICATED: Yes

Query Parameters

Name

Type

Description

id

Required

The numerical id of the group being updated.

...

METHOD: PUT
ENDPOINT: /api/v2/forms/:form_id/groups/:id
AUTHENTICATED: Yes

Query Parameters

Name

Type

Description

id

Required

The numerical id of the group being updated.

...

METHOD: DELETE
ENDPOINT: /api/v2/forms/:form_id/groups/:id
AUTHENTICATED: YES

Query Parameters

Name

Type

Description

id

Required

The numerical id of the group being deleted.

...

The request data should be JSON object, containing either the full representation of a new attribute, or the id of an existing attribute.

Query Parameters

Name

Type

Description

id

Required

The numerical id of the group being updated.

Create a new attribute and add to the group
Example Request
Panel

POST http://ushv3.dev/api/v2/forms/1/groups/1/attributes

Code Block
titlePost Data
languagejavascript
{
    "key":"new_group_attr",
    "label":"Full Name",
    "type":"varchar",
    "input":"text",
    "required":true,
    "priority":1
}
Code Block
titleResponse
languagejavascript
{
    "id": 2,
    "url": "http:\/\/ushv3.dev\/api\/v2\/attributes\/2",
    "key": "new_group_attr",
    "label": "Full Name",
    "input": "text",
    "type": "varchar",
    "required": false,
    "default": null,
    "unique": false,
    "priority": null,
    "options": null
}

...

METHOD: GET
ENDPOINT: /api/v2/forms/:form_id/groups/:group_id/attributes
AUTHENTICATED: Yes

Query Parameters (Not implemented)

Name

Type

Description

order

Optional

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

order_by

Optional

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

limit

Optional

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

offset

Optional

groups returned will be offset by this number of results

...

METHOD: GET
ENDPOINT: /api/v2/forms/:form_id/groups/:group_id/attributes/:id
AUTHENTICATED: Yes

Query Parameters

Name

Type

Description

id

Required

The numerical id of the group being updated.

...

Note: This just removes the attribute from the group, it doesn't delete the attribute entirely.

Query Parameters

Name

Type

Description

id

Required

The numerical id of the group being updated.

...