Posts
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
pagestringOptionalExample:
paging parameter
{{random_page}}onlystringOptionalExample:
Data parameter determine which fields of the post will be returned
id,titlehydratestringOptionalExample:
Data parameter determine which relations of the post will be returned
translationResponses
200
OK
application/json
get
/posts200
OK
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
and
anyOptionalExample:
{"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":""}Responses
201
Created
application/json
401
Unauthorized
application/json
422
Unprocessable Entity
application/json
500
Internal Server Error
application/json
post
/postsAuthorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired
Query parameters
onlystringOptionalExample:
Data parameter determine which fields of the post will be returned
id,titlehaydratestringOptionalExample:
Data parameter determine which relations of the post will be returned
translationsResponses
200
OK
application/json
401
Unauthorized
application/json
404
Not Found
application/json
get
/posts/{id}Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired
Body
and
anyOptionalExample:
{"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":""}Responses
200
OK
application/json
500
Internal Server Error
application/json
put
/posts/{id}Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
and
anyOptionalExample:
{"operation":"patch","items":[{"id":10006,"user_id":2,"form_id":1,"type":"report","author_email":"[email protected]","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":"[email protected]","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"]}]}Responses
200
OK
application/json
422
Unprocessable Entity
application/json
post
/posts/bulk