POST
https://ushahididocs.api.ushahidi.io/api/v3/collections
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
{
"id": 11,
"url": null,
"user": {
"id": 2,
"url": "http://localhost:8000/api/v3/users/2"
},
"name": "Test collection",
"description": "",
"view": "list",
"view_options": null,
"role": null,
"featured": false,
"created": "2022-11-01T08:13:25+00:00",
"updated": null,
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search"
]
}
PUT
https://ushahididocs.api.ushahidi.io/api/v3/collections/3
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
{
"id": 11,
"url": null,
"user": {
"id": 2,
"url": "http://localhost:8000/api/v3/users/2"
},
"name": "Test collection",
"description": "",
"view": "list",
"view_options": null,
"role": null,
"featured": false,
"created": "2022-11-01T08:13:25+00:00",
"updated": null,
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search"
]
}
Sorting parameter Available values : entity fields Default value : featured
name
Sorting parameter Available values : [ASC,DESC] !! Default value : Desc
Desc
Paging parameter Default value : null
2
Paging parameter Default value : 0
3
Filter parameter return collections which his name contian the q value
test
Filter parameter return collection with the user id value
9
GET /api/v3/collections HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
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
}
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 /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"
]
}