Data parameter determine which fields of the post will be returned
id,title
Data parameter determine which relations of the post will be returned
translations
GET /api/v5/posts/{id} HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"results": [
{
"id": 1,
"form_id": 1,
"user_id": "text",
"type": "text",
"title": "text",
"slug": "text",
"content": "text",
"author_email": "text",
"author_realname": "text",
"status": "text",
"published_to": [
"text"
],
"locale": "text",
"created": "text",
"updated": "text",
"post_date": "text",
"categories": [
{
"id": 1,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"role": "text",
"priority": 1,
"created": "text",
"base_language": "text",
"pivot": {
"post_id": 1,
"tag_id": 1
}
}
],
"post_content": [
{
"id": 1,
"form_id": 1,
"label": "text",
"priority": 1,
"required": 1,
"type": "text",
"description": "text",
"show_when_published": true,
"task_is_internal_only": true,
"fields": [
{
"id": 1,
"key": "text",
"label": "text",
"instructions": "text",
"input": "text",
"type": "text",
"required": 1,
"default": "text",
"priority": 1,
"options": [
{
"id": 1,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 1,
"children": [
{
"id": 1,
"parent_id": 1,
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 1,
"children": [
"text"
],
"parent": {
"id": 1,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 1,
"parent": "text",
"translations": {
"es": {
"tag": "text"
}
}
},
"enabled_languages": {
"default": "text",
"available": [
"text"
]
},
"translations": {
"es": {
"tag": "text"
},
"enabled_languages": {
"es": {
"tag": "text"
}
}
}
}
],
"parent": {
"id": 1,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 1,
"parent": "text",
"translations": {
"es": {
"tag": "text"
}
},
"enabled_languages": {
"default": "text",
"available": [
"text"
]
}
}
}
],
"cardinality": 1,
"config": [
"text"
],
"form_stage_id": 1,
"response_private": 1,
"description": "text",
"translations": [
"text"
],
"value": {
"id": 1,
"post_id": 1,
"form_attribute_id": 1,
"value": {
"lon": "text",
"lat": "text"
},
"created": "text",
"translations": [
"text"
]
}
}
],
"translations": [
"text"
]
}
],
"completed_stages": [
{
"form_stage_id": 1,
"post_id": 1,
"completed": 1
}
],
"translations": [
"text"
],
"enabled_languages": {
"default": "text",
"available": [
"text"
]
},
"locks": [
"text"
],
"allowed_privileges": [
"text"
],
"message": {
"id": 1,
"url": "text"
},
"contact": {
"id": 1,
"url": "text"
}
}
],
"count": 1,
"links": {
"first": "text",
"last": "text",
"prev": "text",
"next": "text"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "text",
"per_page": 1,
"to": 1,
"total": 1
}
}
paging parameter
{{random_page}}
Data parameter determine which fields of the post will be returned
id,title
Data parameter determine which relations of the post will be returned
translation
GET /api/v5/posts HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
OK
{
"status": 1,
"message": "text"
}
{"title":"test title","content":"test description","description":"descrition","type":"report","form_id":1,"locale":"en_US","post_content":[{"id":1,"form_id":1,"label":"Main","priority":1,"required":false,"type":"post","show_when_published":true,"task_is_internal_only":false,"fields":[{"id":7,"key":"last_location","label":"Last Location","input":"text","type":"varchar","required":false,"priority":5,"cardinality":1,"response_private":false,"form_stage_id":1,"translations":[],"value":{"value":"Nairobi"}},{"id":8,"key":"last_location_point","label":"Last Location (point)","input":"location","type":"point","required":false,"priority":5,"cardinality":0,"response_private":false,"form_stage_id":1,"translations":[],"value":{}},{"id":9,"key":"geometry_test","label":"Geometry test","input":"text","type":"geometry","required":false,"priority":5,"cardinality":1,"response_private":false,"form_stage_id":1,"translations":[],"value":{}}],"translations":[]},{"id":2,"form_id":1,"label":"2nd step","priority":2,"required":false,"":"task","show_when_published":true,"task_is_internal_only":false,"fields":[{"id":13,"key":"person_status","label":"Person Status","input":"select","type":"varchar","required":false,"priority":5,"options":["information_sought","is_note_author","believed_alive","believed_missing","believed_dead"],"cardinality":0,"response_private":false,"form_stage_id":2,"translations":[],"value":{}}],"translations":[]}],"completed_stages":[],"published_to":[],"post_date":"2022-08-28T11:51:13","enabled_languages":{},"base_language":""}
POST /api/v5/posts HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 1547
{
"title": "test title",
"content": "test description",
"description": "descrition",
"type": "report",
"form_id": 1,
"locale": "en_US",
"post_content": [
{
"id": 1,
"form_id": 1,
"label": "Main",
"priority": 1,
"required": false,
"type": "post",
"show_when_published": true,
"task_is_internal_only": false,
"fields": [
{
"id": 7,
"key": "last_location",
"label": "Last Location",
"input": "text",
"type": "varchar",
"required": false,
"priority": 5,
"cardinality": 1,
"response_private": false,
"form_stage_id": 1,
"translations": [],
"value": {
"value": "Nairobi"
}
},
{
"id": 8,
"key": "last_location_point",
"label": "Last Location (point)",
"input": "location",
"type": "point",
"required": false,
"priority": 5,
"cardinality": 0,
"response_private": false,
"form_stage_id": 1,
"translations": [],
"value": {}
},
{
"id": 9,
"key": "geometry_test",
"label": "Geometry test",
"input": "text",
"type": "geometry",
"required": false,
"priority": 5,
"cardinality": 1,
"response_private": false,
"form_stage_id": 1,
"translations": [],
"value": {}
}
],
"translations": []
},
{
"id": 2,
"form_id": 1,
"label": "2nd step",
"priority": 2,
"required": false,
"": "task",
"show_when_published": true,
"task_is_internal_only": false,
"fields": [
{
"id": 13,
"key": "person_status",
"label": "Person Status",
"input": "select",
"type": "varchar",
"required": false,
"priority": 5,
"options": [
"information_sought",
"is_note_author",
"believed_alive",
"believed_missing",
"believed_dead"
],
"cardinality": 0,
"response_private": false,
"form_stage_id": 2,
"translations": [],
"value": {}
}
],
"translations": []
}
],
"completed_stages": [],
"published_to": [],
"post_date": "2022-08-28T11:51:13",
"enabled_languages": {},
"base_language": ""
}
{
"results": [
{
"id": 1,
"form_id": 1,
"user_id": "text",
"type": "text",
"title": "text",
"slug": "text",
"content": "text",
"author_email": "text",
"author_realname": "text",
"status": "text",
"published_to": [
"text"
],
"locale": "text",
"created": "text",
"updated": "text",
"post_date": "text",
"categories": [
{
"id": 1,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"role": "text",
"priority": 1,
"created": "text",
"base_language": "text",
"pivot": {
"post_id": 1,
"tag_id": 1
}
}
],
"post_content": [
{
"id": 1,
"form_id": 1,
"label": "text",
"priority": 1,
"required": 1,
"type": "text",
"description": "text",
"show_when_published": true,
"task_is_internal_only": true,
"fields": [
{
"id": 1,
"key": "text",
"label": "text",
"instructions": "text",
"input": "text",
"type": "text",
"required": 1,
"default": "text",
"priority": 1,
"options": [
{
"id": 1,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 1,
"children": [
{
"id": 1,
"parent_id": 1,
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 1,
"children": [
"text"
],
"parent": {
"id": 1,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 1,
"parent": "text",
"translations": {
"es": {
"tag": "text"
}
}
},
"enabled_languages": {
"default": "text",
"available": [
"text"
]
},
"translations": {
"es": {
"tag": "text"
},
"enabled_languages": {
"es": {
"tag": "text"
}
}
}
}
],
"parent": {
"id": 1,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 1,
"parent": "text",
"translations": {
"es": {
"tag": "text"
}
},
"enabled_languages": {
"default": "text",
"available": [
"text"
]
}
}
}
],
"cardinality": 1,
"config": [
"text"
],
"form_stage_id": 1,
"response_private": 1,
"description": "text",
"translations": [
"text"
],
"value": {
"id": 1,
"post_id": 1,
"form_attribute_id": 1,
"value": {
"lon": "text",
"lat": "text"
},
"created": "text",
"translations": [
"text"
]
}
}
],
"translations": [
"text"
]
}
],
"completed_stages": [
{
"form_stage_id": 1,
"post_id": 1,
"completed": 1
}
],
"translations": [
"text"
],
"enabled_languages": {
"default": "text",
"available": [
"text"
]
},
"locks": [
"text"
],
"allowed_privileges": [
"text"
],
"message": {
"id": 1,
"url": "text"
},
"contact": {
"id": 1,
"url": "text"
}
}
],
"count": 1,
"links": {
"first": "text",
"last": "text",
"prev": "text",
"next": "text"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "text",
"per_page": 1,
"to": 1,
"total": 1
}
}
{"title":"test title 2","content":"test description","description":"descrition","type":"report","form_id":1,"locale":"en_US","post_content":[{"id":1,"form_id":1,"label":"Main","priority":1,"required":false,"type":"post","show_when_published":true,"task_is_internal_only":false,"fields":[{"id":8,"key":"last_location_point","label":"Last Location (point)","input":"location","type":"point","required":false,"priority":5,"cardinality":0,"response_private":false,"form_stage_id":1,"translations":[],"value":{}},{"id":9,"key":"geometry_test","label":"Geometry test","input":"text","type":"geometry","required":false,"priority":5,"cardinality":1,"response_private":false,"form_stage_id":1,"translations":[],"value":{}}],"translations":[]},{"id":2,"form_id":1,"label":"2nd step","priority":2,"required":false,"":"task","show_when_published":true,"task_is_internal_only":false,"fields":[{"id":13,"key":"person_status","label":"Person Status","input":"select","type":"varchar","required":false,"priority":5,"options":["information_sought","is_note_author","believed_alive","believed_missing","believed_dead"],"cardinality":0,"response_private":false,"form_stage_id":2,"translations":[],"value":{}}],"translations":[]}],"completed_stages":[],"published_to":[],"post_date":"2022-12-28T11:51:13","enabled_languages":{},"base_language":""}
PUT /api/v5/posts/{id} HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 1327
{
"title": "test title 2",
"content": "test description",
"description": "descrition",
"type": "report",
"form_id": 1,
"locale": "en_US",
"post_content": [
{
"id": 1,
"form_id": 1,
"label": "Main",
"priority": 1,
"required": false,
"type": "post",
"show_when_published": true,
"task_is_internal_only": false,
"fields": [
{
"id": 8,
"key": "last_location_point",
"label": "Last Location (point)",
"input": "location",
"type": "point",
"required": false,
"priority": 5,
"cardinality": 0,
"response_private": false,
"form_stage_id": 1,
"translations": [],
"value": {}
},
{
"id": 9,
"key": "geometry_test",
"label": "Geometry test",
"input": "text",
"type": "geometry",
"required": false,
"priority": 5,
"cardinality": 1,
"response_private": false,
"form_stage_id": 1,
"translations": [],
"value": {}
}
],
"translations": []
},
{
"id": 2,
"form_id": 1,
"label": "2nd step",
"priority": 2,
"required": false,
"": "task",
"show_when_published": true,
"task_is_internal_only": false,
"fields": [
{
"id": 13,
"key": "person_status",
"label": "Person Status",
"input": "select",
"type": "varchar",
"required": false,
"priority": 5,
"options": [
"information_sought",
"is_note_author",
"believed_alive",
"believed_missing",
"believed_dead"
],
"cardinality": 0,
"response_private": false,
"form_stage_id": 2,
"translations": [],
"value": {}
}
],
"translations": []
}
],
"completed_stages": [],
"published_to": [],
"post_date": "2022-12-28T11:51:13",
"enabled_languages": {},
"base_language": ""
}
{
"results": [
{
"id": 1,
"form_id": 1,
"user_id": "text",
"type": "text",
"title": "text",
"slug": "text",
"content": "text",
"author_email": "text",
"author_realname": "text",
"status": "text",
"published_to": [
"text"
],
"locale": "text",
"created": "text",
"updated": "text",
"post_date": "text",
"categories": [
{
"id": 1,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"role": "text",
"priority": 1,
"created": "text",
"base_language": "text",
"pivot": {
"post_id": 1,
"tag_id": 1
}
}
],
"post_content": [
{
"id": 1,
"form_id": 1,
"label": "text",
"priority": 1,
"required": 1,
"type": "text",
"description": "text",
"show_when_published": true,
"task_is_internal_only": true,
"fields": [
{
"id": 1,
"key": "text",
"label": "text",
"instructions": "text",
"input": "text",
"type": "text",
"required": 1,
"default": "text",
"priority": 1,
"options": [
{
"id": 1,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 1,
"children": [
{
"id": 1,
"parent_id": 1,
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 1,
"children": [
"text"
],
"parent": {
"id": 1,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 1,
"parent": "text",
"translations": {
"es": {
"tag": "text"
}
}
},
"enabled_languages": {
"default": "text",
"available": [
"text"
]
},
"translations": {
"es": {
"tag": "text"
},
"enabled_languages": {
"es": {
"tag": "text"
}
}
}
}
],
"parent": {
"id": 1,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 1,
"parent": "text",
"translations": {
"es": {
"tag": "text"
}
},
"enabled_languages": {
"default": "text",
"available": [
"text"
]
}
}
}
],
"cardinality": 1,
"config": [
"text"
],
"form_stage_id": 1,
"response_private": 1,
"description": "text",
"translations": [
"text"
],
"value": {
"id": 1,
"post_id": 1,
"form_attribute_id": 1,
"value": {
"lon": "text",
"lat": "text"
},
"created": "text",
"translations": [
"text"
]
}
}
],
"translations": [
"text"
]
}
],
"completed_stages": [
{
"form_stage_id": 1,
"post_id": 1,
"completed": 1
}
],
"translations": [
"text"
],
"enabled_languages": {
"default": "text",
"available": [
"text"
]
},
"locks": [
"text"
],
"allowed_privileges": [
"text"
],
"message": {
"id": 1,
"url": "text"
},
"contact": {
"id": 1,
"url": "text"
}
}
],
"count": 1,
"links": {
"first": "text",
"last": "text",
"prev": "text",
"next": "text"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "text",
"per_page": 1,
"to": 1,
"total": 1
}
}
{"status":"draft"}
PATCH /api/v5/posts/{id} HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 18
{
"status": "draft"
}
{
"results": [
{
"id": 1,
"form_id": 1,
"user_id": "text",
"type": "text",
"title": "text",
"slug": "text",
"content": "text",
"author_email": "text",
"author_realname": "text",
"status": "text",
"published_to": [
"text"
],
"locale": "text",
"created": "text",
"updated": "text",
"post_date": "text",
"categories": [
{
"id": 1,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"role": "text",
"priority": 1,
"created": "text",
"base_language": "text",
"pivot": {
"post_id": 1,
"tag_id": 1
}
}
],
"post_content": [
{
"id": 1,
"form_id": 1,
"label": "text",
"priority": 1,
"required": 1,
"type": "text",
"description": "text",
"show_when_published": true,
"task_is_internal_only": true,
"fields": [
{
"id": 1,
"key": "text",
"label": "text",
"instructions": "text",
"input": "text",
"type": "text",
"required": 1,
"default": "text",
"priority": 1,
"options": [
{
"id": 1,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 1,
"children": [
{
"id": 1,
"parent_id": 1,
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 1,
"children": [
"text"
],
"parent": {
"id": 1,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 1,
"parent": "text",
"translations": {
"es": {
"tag": "text"
}
}
},
"enabled_languages": {
"default": "text",
"available": [
"text"
]
},
"translations": {
"es": {
"tag": "text"
},
"enabled_languages": {
"es": {
"tag": "text"
}
}
}
}
],
"parent": {
"id": 1,
"parent_id": "text",
"tag": "text",
"slug": "text",
"type": "text",
"color": "text",
"icon": "text",
"description": "text",
"role": "text",
"priority": 1,
"parent": "text",
"translations": {
"es": {
"tag": "text"
}
},
"enabled_languages": {
"default": "text",
"available": [
"text"
]
}
}
}
],
"cardinality": 1,
"config": [
"text"
],
"form_stage_id": 1,
"response_private": 1,
"description": "text",
"translations": [
"text"
],
"value": {
"id": 1,
"post_id": 1,
"form_attribute_id": 1,
"value": {
"lon": "text",
"lat": "text"
},
"created": "text",
"translations": [
"text"
]
}
}
],
"translations": [
"text"
]
}
],
"completed_stages": [
{
"form_stage_id": 1,
"post_id": 1,
"completed": 1
}
],
"translations": [
"text"
],
"enabled_languages": {
"default": "text",
"available": [
"text"
]
},
"locks": [
"text"
],
"allowed_privileges": [
"text"
],
"message": {
"id": 1,
"url": "text"
},
"contact": {
"id": 1,
"url": "text"
}
}
],
"count": 1,
"links": {
"first": "text",
"last": "text",
"prev": "text",
"next": "text"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "text",
"per_page": 1,
"to": 1,
"total": 1
}
}
{"operation":"patch","items":[{"id":10006,"user_id":2,"form_id":1,"type":"report","author_email":"admin@ushahidi.com","author_realname":"Admin","status":"published","created":"2022-09-02T11:52:01+00:00","locale":"en_us","values":{"test_point":[{"lon":28.410584460421,"lat":7.2229816056086}],"last_location":["Nairobi"]},"post_date":"2022-09-02T11:51:13+00:00","tags":[],"published_to":[],"completed_stages":[],"sets":["1"]},{"id":10005,"user_id":2,"form_id":1,"type":"report","author_email":"admin@ushahidi.com","author_realname":"Admin","status":"published","created":"2022-09-02T11:52:01+00:00","locale":"en_us","values":{"test_point":[{"lon":28.410584460421,"lat":7.2229816056086}],"last_location":["Nairobi"]},"post_date":"2022-09-02T11:51:13+00:00","tags":[],"published_to":[],"completed_stages":[],"sets":["1"]}]}
POST /api/v5/posts/bulk HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 819
{
"operation": "patch",
"items": [
{
"id": 10006,
"user_id": 2,
"form_id": 1,
"type": "report",
"author_email": "admin@ushahidi.com",
"author_realname": "Admin",
"status": "published",
"created": "2022-09-02T11:52:01+00:00",
"locale": "en_us",
"values": {
"test_point": [
{
"lon": 28.410584460421,
"lat": 7.2229816056086
}
],
"last_location": [
"Nairobi"
]
},
"post_date": "2022-09-02T11:51:13+00:00",
"tags": [],
"published_to": [],
"completed_stages": [],
"sets": [
"1"
]
},
{
"id": 10005,
"user_id": 2,
"form_id": 1,
"type": "report",
"author_email": "admin@ushahidi.com",
"author_realname": "Admin",
"status": "published",
"created": "2022-09-02T11:52:01+00:00",
"locale": "en_us",
"values": {
"test_point": [
{
"lon": 28.410584460421,
"lat": 7.2229816056086
}
],
"last_location": [
"Nairobi"
]
},
"post_date": "2022-09-02T11:51:13+00:00",
"tags": [],
"published_to": [],
"completed_stages": [],
"sets": [
"1"
]
}
]
}
{
"status": "completed"
}