POST
https://ushahididocs.api.ushahidi.io /api/v3/posts
form_id
String
Form unique identifier
slug
String
Post slug
type
String
Post type
message
String
Additiong message for post
url
String
Post URL
author_email
String
Email address of source
title
String
Title of the new post
content
String
Post content
user_id
Integer
The user's unique Identifier
author_realname
String
The full name of the Post source
status
String
The status of post
locale
String
Post local language
color
String
Post color
id
String
Unique identifier for new post
parent_id
Integer
Parent ID for new post
values
Object
This is an array containing two items, one for the title and the description
completed_stages
Array
Contains an array of post-completed stage
published_to
Array
This contains an array of where the post was published
source
String
Source of post
sets
Array
An array of set id's
tags
Array
Contains an object of tag Id's
contact
String
Post contact
{
"id": 0,
"url": "string",
"user_id": 0,
"parent_id": 0,
"form_id": 0,
"title": "string",
"content": "string",
"message": "string",
"color": "string",
"type": "string",
"slug": "string",
"author_email": "string",
"author_realname": 0,
"status": "string",
"created": "string",
"updated": "string",
"locale": "string",
"values": [
"string"
],
"post_date": "string",
"tags": [
"string"
],
"published_to": [
0
],
"completed_stages": [
0
],
"sets": [
0
],
"lock": "string",
"source": "string",
"data_source_message_id": "string",
"allowed_privileges": [
"string"
]
}
PUT
https://ushahididocs.api.ushahidi.io/api/v3/posts/{id}
id*
integer
The post identifier
form_id
Integer
Form unique identifier
slug
String
Post slug
type
String
Post type
message
String
Additiong message for post
url
String
Post URL
author_email
String
Email address of source
title
String
Title of the new post
content
String
Post content
user_id
Integer
The user's unique Identifier
author_realname
String
The full name of the Post source
status
String
The status of post
locale
String
Post local language
color
String
Post color
id
String
Unique identifier of post
values
String
This is an array containing two items, one for the title and the description
published_to
Array
This contains an array of where the post was published
source
String
Source of post
sets
String
An array of set id's
tags
String
Contains an array of tag Id's
contact
String
Post contact
{
"id": 0,
"url": "string",
"user_id": 0,
"parent_id": 0,
"form_id": 0,
"title": "string",
"content": "string",
"message": "string",
"color": "string",
"type": "string",
"slug": "string",
"author_email": "string",
"author_realname": 0,
"status": "string",
"created": "string",
"updated": "string",
"locale": "string",
"values": [
"string"
],
"post_date": "string",
"tags": [
"string"
],
"published_to": [
0
],
"completed_stages": [
0
],
"sets": [
0
],
"lock": "string",
"source": "string",
"data_source_message_id": "string",
"allowed_privileges": [
"string"
]
}
POST
https://ushahididocs.api.ushahidi.io/api/v3/posts/{parent_id}/translations
parent_id**
String
Parent Identifier
content
String
Post content
type
String
Post type
author_email
String
Email address of source
message
String
Additional message for post
url
String
Post URL
id
String
Post unique identifier
slug
String
Post slug
user_id
String
Post user indentifier
color
String
Post color
title
String
Post Tiitle
locale
String
The local language of postÂ
status
String
Post status
author_realname
String
The full name of the Post source
published_to
Array
This contains an array of where the post was published
completed_stages
Array
Contains an array of post-completed stage
source
String
The Source of the post contains an array of post-completed stage
{
"id": 10000,
"url": "http://localhost:8000/api/v3/posts/10000",
"parent": {
"id": 97,
"url": "http://localhost:8000/api/v3/posts/97"
},
"form": null,
"user_id": null,
"message": null,
"color": null,
"type": "report",
"title": "creat post",
"slug": "test-create6",
"content": "test: create new post",
"author_email": "er@et.com",
"author_realname": null,
"status": "draft",
"created": "2022-09-02T08:34:57+00:00",
"updated": null,
"locale": "fr_fr",
"values": {
"markdown": [
"#markdowny"
]
},
"post_date": "2022-09-02T08:34:57+00:00",
"tags": [],
"published_to": [],
"completed_stages": [],
"sets": [],
"lock": null,
"source": null,
"contact": null,
"data_source_message_id": null,
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search",
"change_status",
"read_full"
]
}
PUT
https://ushahididocs.api.ushahidi.io/api/v3/posts/{parent_id}/translations/{translation_id}
parent_id*
Integer
Parent Identifier
translation_id*
integer
Translation Identifier
id
String
Post unique identifier
published_to
Array
Contains an array of post-completed stage
locale
String
The local language of the postÂ
status
String
Post status
author_realname
String
The full name of the Post source
author_email
String
The full name of the Post source
type
String
Post type
color
String
Post color
message
String
Post message
content
String
Content of post
title
String
Post title
user_id
String
Post user identifier
url
String
Post URL
source
String
The Source of the post contains an array of post-completed stage
{
"id": 10000,
"url": "http://localhost:8000/api/v3/posts/10000",
"parent": {
"id": 97,
"url": "http://localhost:8000/api/v3/posts/97"
},
"form": null,
"user_id": null,
"message": null,
"color": null,
"type": "report",
"title": "creat post",
"slug": "test-create6",
"content": "test: create new post",
"author_email": "er@et.com",
"author_realname": null,
"status": "draft",
"created": "2022-09-02T08:34:57+00:00",
"updated": null,
"locale": "fr_fr",
"values": {
"markdown": [
"#markdowny"
]
},
"post_date": "2022-09-02T08:34:57+00:00",
"tags": [],
"published_to": [],
"completed_stages": [],
"sets": [],
"lock": null,
"source": null,
"contact": null,
"data_source_message_id": null,
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search",
"change_status",
"read_full"
]
}
PUT
https://ushahididocs.api.ushahidi.io/api/v3/posts/{parent_id}/translations/(local)
parent_id*
Integer
Parent Identifier
local*
String
Post locale
id
String
Post unique identifier
published_to
Array
Contains an array of post-completed stage
locale
String
The local language of the postÂ
status
String
Post status
author_realname
String
The full name of the Post source
author_email
String
The full name of the Post source
type
String
Post type
color
String
Post color
message
String
Post message
content
String
Content of post
title
String
Post title
user_id
Integer
Post user identifier
url
String
Post URL
source
String
The Source of the post contains an array of post-completed stage
form_id
Integer
Post form identifier
{
"id": 10000,
"url": "http://localhost:8000/api/v3/posts/10000",
"parent": {
"id": 97,
"url": "http://localhost:8000/api/v3/posts/97"
},
"form": null,
"user_id": null,
"message": null,
"color": null,
"type": "report",
"title": "creat post",
"slug": "test-create6",
"content": "test: create new post",
"author_email": "er@et.com",
"author_realname": null,
"status": "draft",
"created": "2022-09-02T08:34:57+00:00",
"updated": null,
"locale": "fr_fr",
"values": {
"markdown": [
"#markdowny"
]
},
"post_date": "2022-09-02T08:34:57+00:00",
"tags": [],
"published_to": [],
"completed_stages": [],
"sets": [],
"lock": null,
"source": null,
"contact": null,
"data_source_message_id": null,
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search",
"change_status",
"read_full"
]}
Sorting parameter Available values : entity fields Default value : id
Sorting parameter Available values : [ASC,DESC] !! Default value : ASC "default not working"
Paging parameter Default value : null
Paging parameter Default value : 0
!!! Paging parameter to activate the limit of posts or not Default value : 0 Note: if it is true then the max value of limit is equal or less than the config (list_admin_max_limit) !!! not working , forced to be 1 in post controller
!!! Filter parameter to set the status of posts to be returned Available values: [archived,draft,published] Default value : published Accepts multiple values: as an array or as a string but they will be separated by a comma !! if it is not set it will be published only "hard-coded"
Filter parameter to set the type of posts to be returned Available values: [report, update, revision] Default value : report
Filter parameter to set the local of posts to be returned Available values: codes returned from api v5/languages
Filter parameter to set the local of posts to be returned
Filter parameter to set the user/users who created the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma Special case: accept (me) as special value to return the post of the current user Special case: accept (none) as special value to return the post null value of user_id
Filter parameter to set the parents of the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma Special case: accept (none) as special value to return the post null value of user_id
Filter parameter to set the form/forms of the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma Special case: accept (none) as special value to return the post null value of user_id
Filter parameter to set the collection/collections of the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma
Filter parameter to set the category/categories of the posts to be returned Return Posts matching any of these Tags (Boolean OR) Accepts multiple values: as an array or as a string but they will be separated by a comma
Filter parameter to set the category/categories of the posts to be returned Return Posts matching any of these Tags (Boolean OR) Accepts multiple values: as an array or as a string but they will be separated by a comma
Filter parameter if this parameter is integer it will return the post with id equal the value if this parameter is string then the api will return posts containing q text in title or content properties
Filter parameter this parameter may used for check if a single post meets other filter conditions
Filter parameter to return posts before this id
Filter parameter to return posts after this id
Date filter parameter to return posts are created before this date
Date filter parameter to return posts are created after this date
Date filter parameter to return posts are updated before this date
Date filter parameter to return posts are updated after this date
Date filter parameter to return posts have post-date before this date
Date filter parameter to return posts have post-date after this date
Spatial filter parameter to set the boundaries of the posts to be returned This parameter value is (west,north,east,south)
Spatial filter parameter to set the boundaries of the posts to be returned This parameter value is (lat,lng) This parameter and (within_km) parameter work together.
Spatial filter parameter to set the boundaries of the posts to be returned This parameter and (center_point) parameter work together.
Filter parameter return the posts with is published for this roles. This feature id deprecated Accepts multiple values: as an array or as a string but they will be separated by a comma
Filter parameter to set the sources of the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma
Specify values to include depending on the type Accepts multiple values: as an array or as a string but they will be separated by a comma
Specify values to include depending on the survey fields names Accepts multiple values: as an array or as a string but they will be separated by a comma
Append unmapped totals to stats
filter parameter Available values : [unmapped,mapped] Default value : id
Return results parameter if it's equal 1 then return the core fields !! but it's doesn't work now
GET /api/v3/posts HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
OK
{
"count": 1,
"results": [
{
"id": 104,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/posts/104",
"parent": {
"id": 99,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/posts/99"
},
"form": {
"id": 1,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/forms/1"
},
"type": "revision",
"title": "Should be returned when Searching",
"content": "Some description",
"status": "published",
"created": "2014-01-22T19:02:55.000Z",
"locale": "en_us",
"values": {
"test_varchar": [
"some-string"
]
},
"post_date": "2014-01-22T11:02:55.000Z",
"tags": [],
"published_to": [],
"completed_stages": [],
"sets": [],
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search",
"change_status",
"read_full"
]
}
],
"limit": "1",
"offset": 0,
"order": "desc",
"orderby": "post_date",
"curr": "https://ushahididocs.api.ushahidi.io//api/v3/posts/99/revisions?orderby=post_date&order=desc&limit=1&offset=0&limitPosts=0",
"next": "https://ushahididocs.api.ushahidi.io//api/v3/posts/99/revisions?orderby=post_date&order=desc&limit=1&offset=1&limitPosts=0",
"prev": "https://ushahididocs.api.ushahidi.io//api/v3/posts/99/revisions?orderby=post_date&order=desc&limit=1&offset=0&limitPosts=0",
"total_count": 2
}
The post identifier
GET /api/v3/posts/{id} HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": 99,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/posts/99",
"form": {
"id": 1,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/forms/1"
},
"type": "report",
"title": "Should be returned when Searching",
"content": "Some description",
"status": "draft",
"created": "2013-09-01T07:01:20.000Z",
"locale": "en_us",
"values": {
"last_location_point": [
{
"lon": 11.123,
"lat": 24.213
}
],
"test_varchar": [
"some-string"
],
"tags1": [
"3",
"7"
]
},
"post_date": "2013-09-01T00:01:20.000Z",
"tags": [
{
"id": 3,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/tags/3"
},
{
"id": 7,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/tags/7"
}
],
"published_to": [],
"completed_stages": [],
"sets": [],
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search",
"change_status",
"read_full"
]
}
The post identifier
DELETE /api/v3/posts/{id} HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": 35527,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/posts/35527",
"message": {
"id": 35439,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/messages/35439"
},
"type": "report",
"title": "From twitter on Fri Aug 05 16:12:48 +0000 2022",
"slug": "from-twitter-on-fri-aug-05-161248-0000-2022-62ed418d5afac",
"content": "https://twitter.com/34856248/status/1555587636928077826",
"status": "draft",
"created": "2022-08-05T16:13:01.000Z",
"locale": "en_us",
"values": [],
"post_date": "2022-08-05T16:12:48.000Z",
"tags": [],
"published_to": [],
"completed_stages": [],
"sets": [],
"source": "twitter",
"contact": {
"id": 6446,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/contact/6446"
},
"data_source_message_id": "1555587636928077826",
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search",
"change_status",
"read_full"
]
}
Group parameter to choose the group type Available values : [status,form,tags,attribute]
!!Group parameter Posts will be grouped by the value of this attribute works when (group_by) parameter value is attribute !! not sure how is it work
Group parameter to get the totals by children of this Parent Tag ID works when (group_by) parameter value is tags
Time group parameter , Posts will be grouped by the date
Time group parameter to set which field used for date groups Available values : [created,updated] or any other survey fields with type of time
Time group parameter to set the seconds of interval Default value: 86400(1 Day)
filter parameter Available values : [unmapped,mapped,all] Default value : all
!!! Filter parameter to set the status of posts to be returned Available values: [archived,draft,published] Default value : published Accepts multiple values: as an array or as a string but they will be separated by a comma !! if it is not set it will be published only "hard-coded"
Filter parameter if this parameter is string then the api will return posts containing q text in title or content properties
Filter parameter to set the type of posts to be returned Available values: [report, update, revision] Default value : report
Filter parameter to set the local of posts to be returned Available values: codes returned from api v5/languages
Filter parameter to set the local of posts to be returned
Filter parameter to set the user/users who created the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma Special case: accept (me) as special value to return the post of the current user Special case: accept (none) as special value to return the post null value of user_id
Filter parameter to set the parents of the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma Special case: accept (none) as special value to return the post null value of user_id
Filter parameter to set the form/forms of the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma Special case: accept (none) as special value to return the post null value of user_id
Filter parameter to set the collection/collections of the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma
Filter parameter to set the category/categories of the posts to be returned Return Posts matching any of these Tags (Boolean OR) Accepts multiple values: as an array or as a string but they will be separated by a comma
Filter parameter to set the category/categories of the posts to be returned Return Posts matching any of these Tags (Boolean OR) Accepts multiple values: as an array or as a string but they will be separated by a comma
Date filter parameter to return posts are created before this date
Filter parameter to return posts after this id
Date filter parameter to return posts are created before this date
Date filter parameter to return posts are created after this date
Date filter parameter to return posts are updated before this date
Date filter parameter to return posts are updated after this date
Date filter parameter to return posts have post-date before this date
Date filter parameter to return posts have post-date after this date
Spatial filter parameter to set the boundaries of the posts to be returned This parameter value is (west,north,east,south)
Spatial filter parameter to set the boundaries of the posts to be returned This parameter value is (lat,lng) This parameter and (within_km) parameter work together.
Spatial filter parameter to set the boundaries of the posts to be returned This parameter and (center_point) parameter work together.
Filter parameter return the posts with is published for this roles. This feature id deprecated Accepts multiple values: as an array or as a string but they will be separated by a comma
Filter parameter to set the sources of the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma
Specify values to include depending on the type Accepts multiple values: as an array or as a string but they will be separated by a comma
Specify values to include depending on the survey fields names Accepts multiple values: as an array or as a string but they will be separated by a comma
Append unmapped totals to stats
GET /api/v3/posts/stats HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
OK
{
"totals": [
{
"key": "status",
"values": [
{
"label": "draft",
"total": 31341,
"type": "web"
},
{
"label": "archived",
"total": 12243,
"type": "web"
},
{
"label": "published",
"total": 1743,
"type": "web"
}
]
}
],
"group_by": "status"
}
Sorting parameter Available values : entity fields Default value : id
Sorting parameter Available values : [ASC,DESC] !! Default value : ASC "default not working"
Paging parameter Default value : null
Paging parameter Default value : 0
filter parameter Available values : [unmapped,mapped,all] Default value : all
!!! Filter parameter to set the status of posts to be returned Available values: [archived,draft,published] Default value : published Accepts multiple values: as an array or as a string but they will be separated by a comma !! if it is not set it will be published only "hard-coded"
Filter parameter if this parameter is string then the api will return posts containing q text in title or content properties
Filter parameter to set the type of posts to be returned Available values: [report, update, revision] Default value : report
Filter parameter to set the local of posts to be returned Available values: codes returned from api v5/languages
Filter parameter to set the local of posts to be returned
Filter parameter to set the user/users who created the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma Special case: accept (me) as special value to return the post of the current user Special case: accept (none) as special value to return the post null value of user_id
Filter parameter to set the parents of the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma Special case: accept (none) as special value to return the post null value of user_id
Filter parameter to set the form/forms of the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma Special case: accept (none) as special value to return the post null value of user_id
Filter parameter to set the collection/collections of the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma
Filter parameter to set the category/categories of the posts to be returned Return Posts matching any of these Tags (Boolean OR) Accepts multiple values: as an array or as a string but they will be separated by a comma
Filter parameter to set the category/categories of the posts to be returned Return Posts matching any of these Tags (Boolean OR) Accepts multiple values: as an array or as a string but they will be separated by a comma
Date filter parameter to return posts are created before this date
Filter parameter to return posts after this id
Date filter parameter to return posts are created before this date
Date filter parameter to return posts are created after this date
Date filter parameter to return posts are updated before this date
Date filter parameter to return posts are updated after this date
Date filter parameter to return posts have post-date before this date
Date filter parameter to return posts have post-date after this date
Spatial filter parameter to set the boundaries of the posts to be returned This parameter value is (west,north,east,south)
Spatial filter parameter to set the boundaries of the posts to be returned This parameter value is (lat,lng) This parameter and (within_km) parameter work together.
Spatial filter parameter to set the boundaries of the posts to be returned This parameter and (center_point) parameter work together.
Filter parameter return the posts with is published for this roles. This feature id deprecated Accepts multiple values: as an array or as a string but they will be separated by a comma
Filter parameter to set the sources of the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma
Specify values to include depending on the type Accepts multiple values: as an array or as a string but they will be separated by a comma
Specify values to include depending on the survey fields names Accepts multiple values: as an array or as a string but they will be separated by a comma
Append unmapped totals to stats
GET /api/v3/posts/geojson HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
OK
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "GeometryCollection",
"geometries": [
{
"type": "Point",
"coordinates": [
36.6857871,
-1.3722466
]
}
]
},
"properties": {
"title": "Polling Station Logistics Issues",
"description": "It is close to two hours since I joined the queue at my polling station. The queue is not moving. All sorts of excuses from the staff manning the satiation \n\nVoting from\n\nOlkeri Ward\nKajiado North Constituency \nArap Moi Primary School\nPolling station No.1",
"marker-color": "#E69327",
"id": 43702,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/posts/43702"
}
},
{
"type": "Feature",
"geometry": {
"type": "GeometryCollection",
"geometries": [
{
"type": "Point",
"coordinates": [
32.5892833,
0.3283728
]
}
]
},
"properties": {
"title": "Diaspora Voter: Missing in Registrar",
"description": "I travelled all the way to Kampala to cast my vote then @IEBCKenya tell me my name ain't in the register. How did I get that card in the 1st place. I transferred from Dar es Salaam to Kampla and in their register am still in Dar. Shem on @IEBCKenya",
"marker-color": "#E69327",
"id": 44701,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/posts/44701"
}
},
{
"type": "Feature",
"geometry": {
"type": "GeometryCollection",
"geometries": [
{
"type": "Point",
"coordinates": [
36.8718486,
-1.2960401
]
}
]
},
"properties": {
"title": "Issues at Makadara Hamza Ward",
"description": "Hallo.. system are not working..and no manual is there..it's starting to create alarm chsos..Dr kraph .. makadara Hamza ward",
"marker-color": "#E69327",
"id": 44572,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/posts/44572"
}
}
],
"total": 74
}
Zoom count. i.e how many times location should be zoomed
Zoom X axis
Zoom Y axis
Sorting parameter Available values : entity fields Default value : id
Sorting parameter Available values : [ASC,DESC] !! Default value : ASC "default not working"
Paging parameter Default value : null
Paging parameter Default value : 0
filter parameter Available values : [unmapped,mapped,all] Default value : all
!!! Filter parameter to set the status of posts to be returned Available values: [archived,draft,published] Default value : published Accepts multiple values: as an array or as a string but they will be separated by a comma !! if it is not set it will be published only "hard-coded"
Filter parameter if this parameter is string then the api will return posts containing q text in title or content properties
Filter parameter to set the type of posts to be returned Available values: [report, update, revision] Default value : report
Filter parameter to set the local of posts to be returned Available values: codes returned from api v5/languages
Filter parameter to set the local of posts to be returned
Filter parameter to set the user/users who created the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma Special case: accept (me) as special value to return the post of the current user Special case: accept (none) as special value to return the post null value of user_id
Filter parameter to set the parents of the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma Special case: accept (none) as special value to return the post null value of user_id
Filter parameter to set the form/forms of the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma Special case: accept (none) as special value to return the post null value of user_id
Filter parameter to set the collection/collections of the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma
Filter parameter to set the category/categories of the posts to be returned Return Posts matching any of these Tags (Boolean OR) Accepts multiple values: as an array or as a string but they will be separated by a comma
Filter parameter to set the category/categories of the posts to be returned Return Posts matching any of these Tags (Boolean OR) Accepts multiple values: as an array or as a string but they will be separated by a comma
Filter parameter to set the category/categories of the posts to be returned
Date filter parameter to return posts are created before this date
Filter parameter to return posts after this id
Date filter parameter to return posts are created before this date
Date filter parameter to return posts are created after this date
Date filter parameter to return posts are updated before this date
Date filter parameter to return posts are updated after this date
Date filter parameter to return posts have post-date before this date
Date filter parameter to return posts have post-date after this date
Spatial filter parameter to set the boundaries of the posts to be returned This parameter value is (west,north,east,south)
Spatial filter parameter to set the boundaries of the posts to be returned This parameter value is (lat,lng) This parameter and (within_km) parameter work together.
Spatial filter parameter to set the boundaries of the posts to be returned This parameter and (center_point) parameter work together.
Filter parameter return the posts with is published for this roles. This feature id deprecated Accepts multiple values: as an array or as a string but they will be separated by a comma
Filter parameter to set the sources of the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma
Specify values to include depending on the type Accepts multiple values: as an array or as a string but they will be separated by a comma
Specify values to include depending on the survey fields names Accepts multiple values: as an array or as a string but they will be separated by a comma
Append unmapped totals to stats
GET /api/v3/posts/geojson/{zoom}/{x}/{y} HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
OK
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "GeometryCollection",
"geometries": [
{
"type": "Point",
"coordinates": [
36.6857871,
-1.3722466
]
}
]
},
"properties": {
"title": "Polling Station Logistics Issues",
"description": "It is close to two hours since I joined the queue at my polling station. The queue is not moving. All sorts of excuses from the staff manning the satiation \n\nVoting from\n\nOlkeri Ward\nKajiado North Constituency \nArap Moi Primary School\nPolling station No.1",
"marker-color": "#E69327",
"id": 43702,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/posts/43702"
}
},
{
"type": "Feature",
"geometry": {
"type": "GeometryCollection",
"geometries": [
{
"type": "Point",
"coordinates": [
36.8172449,
-1.2832533
]
}
]
},
"properties": {
"title": "Your vote counts! Let's choose peace",
"description": "Let's show up in large numbers. Let's vote wisely. Let's choose peace. ✨ Kenya ni Yetu. Kura Yako inacount.",
"marker-color": "#5BAA00",
"id": 44764,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/posts/44764"
}
},
{
"type": "Feature",
"geometry": {
"type": "GeometryCollection",
"geometries": [
{
"type": "Point",
"coordinates": [
36.8172449,
-1.2832533
]
}
]
},
"properties": {
"title": "Civilian Peace efforts",
"description": "Love, Peace, and Unity. Vote Peace, Keep Peace!",
"marker-color": "#5BAA00",
"id": 44745,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/posts/44745"
}
}
],
"bbox": [
"33.75",
"0",
"39.375",
"-5.6159858191553"
],
"total": 1356
}
Post indentifier
GET /api/v3/posts/{post_id}/geojson HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
OK
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
36.080026,
-0.3030988
]
},
"properties": {
"title": "(dummy title)",
"description": "(dummy description)",
"id": 2500,
"attribute_key": "e5ec4442-769e-4286-a3c0-7cad78b77f19"
}
}
]
}
Post indentifier
DELETE /api/v3/posts/{post_id}/lock HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
OK
{
"url": "https://ushahididocs.api.ushahidi.io//api/v3/post_locks",
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search",
"change_status",
"read_full"
]
}
Parent Identifier
Sorting parameter Available values : entity fields Default value : post_date
Sorting parameter Available values : [ASC,DESC] !! Default value : DESC "default not working"
Paging parameter Default value : null
Paging parameter Default value : 0
!!! Paging parameter to activate the limit of posts or not Default value : 0 Note: if it is true then the max value of limit is equal or less than the config (list_admin_max_limit) !!! not working , forced to be 1 in post controller
!!! Filter parameter to set the status of posts to be returned Available values: [archived,draft,published] Default value : published Accepts multiple values: as an array or as a string but they will be separated by a comma !! if it is not set it will be published only "hard-coded"
Filter parameter to set the type of posts to be returned Available values: [report, update, revision] Default value : report
Filter parameter to set the local of posts to be returned Available values: codes returned from api v5/languages
Filter parameter to set the local of posts to be returned
Filter parameter to set the user/users who created the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma Special case: accept (me) as special value to return the post of the current user Special case: accept (none) as special value to return the post null value of user_id
Filter parameter to set the parents of the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma Special case: accept (none) as special value to return the post null value of user_id
Filter parameter to set the form/forms of the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma Special case: accept (none) as special value to return the post null value of user_id
Filter parameter to set the collection/collections of the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma
Filter parameter to set the category/categories of the posts to be returned Return Posts matching any of these Tags (Boolean OR) Accepts multiple values: as an array or as a string but they will be separated by a comma
Filter parameter to set the category/categories of the posts to be returned Return Posts matching any of these Tags (Boolean OR) Accepts multiple values: as an array or as a string but they will be separated by a comma
Filter parameter if this parameter is integer it will return the post with id equal the value if this parameter is string then the api will return posts containing q text in title or content properties
Filter parameter this parameter may used for check if a single post meets other filter conditions
Filter parameter to return posts before this id
Filter parameter to return posts after this id
Date filter parameter to return posts are created before this date
Date filter parameter to return posts are created after this date
Date filter parameter to return posts are updated before this date
Date filter parameter to return posts are updated after this date
Date filter parameter to return posts have post-date before this date
Date filter parameter to return posts have post-date after this date
Spatial filter parameter to set the boundaries of the posts to be returned This parameter value is (west,north,east,south)
Spatial filter parameter to set the boundaries of the posts to be returned This parameter value is (lat,lng) This parameter and (within_km) parameter work together.
Spatial filter parameter to set the boundaries of the posts to be returned This parameter and (center_point) parameter work together.
Filter parameter return the posts with is published for this roles. This feature id deprecated Accepts multiple values: as an array or as a string but they will be separated by a comma
Filter parameter to set the sources of the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma
Specify values to include depending on the type Accepts multiple values: as an array or as a string but they will be separated by a comma
Specify values to include depending on the survey fields names Accepts multiple values: as an array or as a string but they will be separated by a comma
Append unmapped totals to stats
filter parameter Available values : [unmapped,mapped] Default value : id
Return results parameter if it's equal 1 then return the core fields !! but it's doesn't work now
GET /api/v3/posts/{parent_id}/revisions HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"count": 1,
"results": [
{
"id": 104,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/posts/104",
"parent": {
"id": 99,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/posts/99"
},
"form": {
"id": 1,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/forms/1"
},
"type": "revision",
"title": "Should be returned when Searching",
"content": "Some description",
"status": "published",
"created": "2014-01-22T19:02:55.000Z",
"locale": "en_us",
"values": {
"test_varchar": [
"some-string"
]
},
"post_date": "2014-01-22T11:02:55.000Z",
"tags": [],
"published_to": [],
"completed_stages": [],
"sets": [],
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search",
"change_status",
"read_full"
]
}
],
"limit": "1",
"offset": 0,
"order": "desc",
"orderby": "post_date",
"curr": "https://ushahididocs.api.ushahidi.io//api/v3/posts/99/revisions?orderby=post_date&order=desc&limit=1&offset=0&limitPosts=0",
"next": "https://ushahididocs.api.ushahidi.io//api/v3/posts/99/revisions?orderby=post_date&order=desc&limit=1&offset=1&limitPosts=0",
"prev": "https://ushahididocs.api.ushahidi.io//api/v3/posts/99/revisions?orderby=post_date&order=desc&limit=1&offset=0&limitPosts=0",
"total_count": 2
}
Parent Identifier
GET /api/v3/posts/{parent_id}/revisions/105 HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": 103,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/posts/103",
"parent": {
"id": 99,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/posts/99"
},
"form": {
"id": 1,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/forms/1"
},
"type": "revision",
"title": "Should be returned when Searching",
"slug": "555",
"content": "Some description",
"status": "published",
"created": "2013-03-20T15:02:40.000Z",
"locale": "en_us",
"values": {
"test_varchar": [
"previous_string"
]
},
"post_date": "2013-03-20T08:02:40.000Z",
"tags": [],
"published_to": [],
"completed_stages": [],
"sets": [],
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search",
"change_status",
"read_full"
]
}
Parent Identifier
Sorting parameter Available values : entity fields Default value : post_date
Sorting parameter Available values : [ASC,DESC] !! Default value : DESC "default not working"
Paging parameter Default value : null
Paging parameter Default value : 0
!!! Paging parameter to activate the limit of posts or not Default value : 0 Note: if it is true then the max value of limit is equal or less than the config (list_admin_max_limit) !!! not working , forced to be 1 in post controller
!!! Filter parameter to set the status of posts to be returned Available values: [archived,draft,published] Default value : published Accepts multiple values: as an array or as a string but they will be separated by a comma !! if it is not set it will be published only "hard-coded"
Filter parameter to set the type of posts to be returned Available values: [report, update, revision] Default value : report
Filter parameter to set the local of posts to be returned Available values: codes returned from api v5/languages
Filter parameter to set the local of posts to be returned
Filter parameter to set the user/users who created the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma Special case: accept (me) as special value to return the post of the current user Special case: accept (none) as special value to return the post null value of user_id
Filter parameter to set the parents of the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma Special case: accept (none) as special value to return the post null value of user_id
Filter parameter to set the form/forms of the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma Special case: accept (none) as special value to return the post null value of user_id
Filter parameter to set the collection/collections of the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma
Filter parameter to set the category/categories of the posts to be returned Return Posts matching any of these Tags (Boolean OR) Accepts multiple values: as an array or as a string but they will be separated by a comma
Filter parameter to set the category/categories of the posts to be returned Return Posts matching any of these Tags (Boolean OR) Accepts multiple values: as an array or as a string but they will be separated by a comma
Filter parameter if this parameter is integer it will return the post with id equal the value if this parameter is string then the api will return posts containing q text in title or content properties
Filter parameter this parameter may used for check if a single post meets other filter conditions
Filter parameter to return posts before this id
Filter parameter to return posts after this id
Date filter parameter to return posts are created before this date
Date filter parameter to return posts are created after this date
Date filter parameter to return posts are updated before this date
Date filter parameter to return posts are updated after this date
Date filter parameter to return posts have post-date before this date
Date filter parameter to return posts have post-date after this date
Spatial filter parameter to set the boundaries of the posts to be returned This parameter value is (west,north,east,south)
Spatial filter parameter to set the boundaries of the posts to be returned This parameter value is (lat,lng) This parameter and (within_km) parameter work together.
Spatial filter parameter to set the boundaries of the posts to be returned This parameter and (center_point) parameter work together.
Filter parameter return the posts with is published for this roles. This feature id deprecated Accepts multiple values: as an array or as a string but they will be separated by a comma
Filter parameter to set the sources of the posts to be returned Accepts multiple values: as an array or as a string but they will be separated by a comma
Specify values to include depending on the type Accepts multiple values: as an array or as a string but they will be separated by a comma
Specify values to include depending on the survey fields names Accepts multiple values: as an array or as a string but they will be separated by a comma
Append unmapped totals to stats
filter parameter Available values : [unmapped,mapped] Default value : id
Return results parameter if it's equal 1 then return the core fields !! but it's doesn't work now
GET /api/v3/posts/{parent_id}/translations HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
OK
{
"count": 1,
"results": [
{
"id": 106,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/posts/106",
"parent": {
"id": 105,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/posts/105"
},
"form": {
"id": 1,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/forms/1"
},
"type": "translation",
"title": "French post",
"content": "Some description",
"status": "published",
"created": "2014-08-16T05:09:11.000Z",
"locale": "fr_fr",
"values": {
"test_varchar": [
"some-string",
"french string"
]
},
"post_date": "2014-08-15T22:09:11.000Z",
"tags": [],
"published_to": [],
"completed_stages": [],
"sets": [],
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search",
"change_status",
"read_full"
]
}
],
"offset": 0,
"order": "desc",
"orderby": "post_date",
"curr": "https://ushahididocs.api.ushahidi.io//api/v3/posts/105/translations?orderby=post_date&order=desc&offset=0&limitPosts=0",
"next": "https://ushahididocs.api.ushahidi.io//api/v3/posts/105/translations?orderby=post_date&order=desc&offset=0&limitPosts=0",
"prev": "https://ushahididocs.api.ushahidi.io//api/v3/posts/105/translations?orderby=post_date&order=desc&offset=0&limitPosts=0",
"total_count": 1
}
Parent Identifier
Translation indentifier
GET /api/v3/posts/{parent_id}/translations/{translation_id} HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": 106,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/posts/106",
"parent": {
"id": 105,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/posts/105"
},
"form": {
"id": 1,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/forms/1"
},
"type": "translation",
"title": "French post",
"content": "Some description",
"status": "published",
"created": "2014-08-16T05:09:11.000Z",
"locale": "fr_fr",
"values": {
"test_varchar": [
"some-string",
"french string"
]
},
"post_date": "2014-08-15T22:09:11.000Z",
"tags": [],
"published_to": [],
"completed_stages": [],
"sets": [],
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search",
"change_status",
"read_full"
]
}
Parent Identifier
Translation indentifier
DELETE /api/v3/posts/{parent_id}/translations/{translation_id} HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": 106,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/posts/106",
"parent": {
"id": 105,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/posts/105"
},
"form": {
"id": 1,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/forms/1"
},
"type": "translation",
"title": "French post",
"content": "Some description",
"status": "published",
"created": "2014-08-16T05:09:11.000Z",
"locale": "fr_fr",
"values": {
"test_varchar": [
"some-string",
"french string"
]
},
"post_date": "2014-08-15T22:09:11.000Z",
"tags": [],
"published_to": [],
"completed_stages": [],
"sets": [],
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search",
"change_status",
"read_full"
]
}
Parent Identifier
GET /api/v3/posts/{parent_id}/translations/(local) HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": 108,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/posts/108",
"parent": {
"id": 105,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/posts/105"
},
"form": {
"id": 1,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/forms/1"
},
"type": "translation",
"title": "Arabic post",
"content": "Some description",
"status": "published",
"created": "2014-06-30T00:56:31.000Z",
"locale": "ar_ar",
"values": {
"test_varchar": [
"arabic string"
]
},
"post_date": "2014-06-29T17:56:31.000Z",
"tags": [],
"published_to": [],
"completed_stages": [],
"sets": [],
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search",
"change_status",
"read_full"
]
}
Parent Identifier
DELETE /api/v3/posts/{parent_id}/translations/(local) HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": 101,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/posts/101",
"parent": {
"id": 96,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/posts/96"
},
"form": {
"id": 1,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/forms/1"
},
"type": "translation",
"title": "Not a child report anymore",
"content": "Some description",
"status": "published",
"created": "2013-03-08T13:04:55.000Z",
"locale": "fr_fr",
"values": {
"test_varchar": [
"dummy string"
]
},
"post_date": "2013-03-08T05:04:55.000Z",
"tags": [],
"published_to": [],
"completed_stages": [],
"sets": [],
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search",
"change_status",
"read_full"
]
}
Post indentifier
PUT /api/v3/posts/{post_id}/lock HTTP/1.1
Host: ushahididocs.api.ushahidi.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 14
{
"post_id": 96
}
OK
{
"id": 5,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/post_locks/5",
"user": {
"id": 2,
"url": "https://ushahididocs.api.ushahidi.io//api/v3/users/2"
},
"post_id": 96,
"expires": 1662111036,
"allowed_privileges": [
"read",
"create",
"update",
"delete",
"search",
"change_status",
"read_full"
]
}