Collections Page

add collection post

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

Request Body

NameTypeDescription

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": 1,
    "url": "http://localhost:8000/api/v3/posts/1",
    "parent_id": null,
    "form": {
        "id": 1,
        "url": "http://localhost:8000/api/v3/forms/1"
    },
    "user_id": null,
    "message": null,
    "color": null,
    "type": "report",
    "title": "Test post",
    "slug": null,
    "content": "Testing post",
    "author_email": null,
    "author_realname": null,
    "status": "published",
    "created": "2013-03-23T03:39:13+00:00",
    "updated": null,
    "locale": "en_us",
    "values": {
        "geometry_test": [
            "MULTIPOLYGON(((40 40,20 45,45 30,40 40)),((20 35,45 20,30 5,10 10,10 30,20 35),(30 20,20 25,20 15,30 20)))"
        ],
        "last_location_point": [
            {
                "lon": 12.123,
                "lat": 21.213
            },
            {
                "lon": 12.223,
                "lat": 21.313
            }
        ],
        "missing_status": [
            "believed_missing"
        ],
        "links": [
            "http://google.com",
            "http://ushahidi.com"
        ],
        "tags1": [
            "3",
            "4"
        ]
    },
    "post_date": "2013-03-22T20:39:13+00:00",
    "tags": [
        {
            "id": 3,
            "url": "http://localhost:8000/api/v3/tags/3"
        },
        {
            "id": 4,
            "url": "http://localhost:8000/api/v3/tags/4"
        }
    ],
    "published_to": [],
    "completed_stages": [],
    "sets": [
        "1"
    ],
    "lock": null,
    "source": null,
    "contact": null,
    "data_source_message_id": null,
    "allowed_privileges": [
        "read",
        "create",
        "update",
        "delete",
        "search",
        "change_status",
        "read_full"
    ]
}