Posts

Add new post

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

Request Body

{
  "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"
  ]
}

Edit a post by ID

PUT https://ushahididocs.api.ushahidi.io/api/v3/posts/{id}

Path Parameters

Request Body

{
  "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"
  ]
}

Sub Posts & Translation

Add a post translation

POST https://ushahididocs.api.ushahidi.io/api/v3/posts/{parent_id}/translations

Path Parameters

Request Body

{
    "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"
    ]
}

Edit post translation

PUT https://ushahididocs.api.ushahidi.io/api/v3/posts/{parent_id}/translations/{translation_id}

Path Parameters

Request Body

{
    "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"
    ]
}

Edit post local translation

PUT https://ushahididocs.api.ushahidi.io/api/v3/posts/{parent_id}/translations/(local)

Path Parameters

Request Body

{
    "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"
    ]}