For the complete documentation index, see llms.txt. This page is also available as Markdown.

Collections

get_collections

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
orderbystringOptional

Sorting parameter Available values : entity fields Default value : featured

Example: name
orderstringOptional

Sorting parameter Available values : [ASC,DESC] !! Default value : Desc

Example: Desc
limitinteger · int32Optional

Paging parameter Default value : null

Example: 2
offsetinteger · int32Optional

Paging parameter Default value : 0

Example: 3
qstringOptional

Filter parameter return collections which his name contian the q value

Example: test
user_idinteger · int32Optional

Filter parameter return collection with the user id value

Example: 9
Responses
200

OK

application/json
countinteger · int32Required
limitstring · nullableRequired
offsetinteger · int32Required
orderstringRequired
orderbystringRequired
currstringRequired
nextstringRequired
prevstringRequired
total_countinteger · int32Required
get/api/v3/collections
GET /api/v3/collections HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

{
  "count": 1,
  "results": [
    {
      "id": 1,
      "url": "text",
      "user_id": "text",
      "name": "text",
      "description": "text",
      "view": "text",
      "view_options": "text",
      "role": [
        "text"
      ],
      "featured": true,
      "created": "text",
      "updated": "text",
      "allowed_privileges": [
        "text"
      ],
      "user": {
        "id": 1,
        "url": "text"
      }
    }
  ],
  "limit": "text",
  "offset": 1,
  "order": "text",
  "orderby": "text",
  "curr": "text",
  "next": "text",
  "prev": "text",
  "total_count": 1
}

add collection

POST https://ushahididocs.api.ushahidi.io/api/v3/collections

Request Body

Name
Type
Description

user_id

String

The user identifier

view

String

Type of view e.g. "list"

description

String

Collection description

name

String

The name of collection

view_options

String

View Option

role

String

Role

featured

Boolean

Set True to feature collection and False for unfeatured

edit collection

PUT https://ushahididocs.api.ushahidi.io/api/v3/collections/3

Request Body

Name
Type
Description

user_id

String

The user identifier

view

String

Type of view e.g. "list"

description

String

Collection description

name

String

The name of collection

view_options

String

View Option

role

String

Role

featured

Boolean

Set True to feature collection and False for unfeatured

get collection

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/json
idinteger · int32Required
urlstring · nullableRequired
user_idstring · nullableRequired
namestringRequired
descriptionstringRequired
viewstringRequired
view_optionsstring · nullableRequired
rolestring · nullableRequired
featuredbooleanRequired
createdstringRequired
updatedstring · nullableRequired
allowed_privilegesstring[]Required
get/api/v3/collections/1
GET /api/v3/collections/1 HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": 1,
  "name": "Test collection",
  "description": "",
  "view": "list",
  "featured": false,
  "created": "1970-01-01T00:00:00+00:00",
  "allowed_privileges": [
    "read",
    "create",
    "update",
    "delete",
    "search"
  ]
}

delete collection

delete
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

OK

application/json
idinteger · int32Required
urlstring · nullableRequired
namestringRequired
descriptionstringRequired
viewstringRequired
view_optionsstring · nullableRequired
rolestring · nullableRequired
featuredbooleanRequired
createdstringRequired
updatedstring · nullableRequired
allowed_privilegesstring[]Required
delete/api/v3/collections/3
DELETE /api/v3/collections/3 HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": 11,
  "user": {
    "id": 2,
    "url": "http://localhost:8000/api/v3/users/2"
  },
  "name": "Test collection",
  "description": "",
  "view": "list",
  "featured": false,
  "created": "2022-11-01T08:13:25+00:00",
  "allowed_privileges": [
    "read",
    "create",
    "update",
    "delete",
    "search"
  ]
}