-
Notifications
You must be signed in to change notification settings - Fork 0
Post API Add Post
Dominik Magdaleński edited this page Jul 3, 2019
·
4 revisions
URL: https://dive-networks.com/api/rpc/34/add_post
HTTP Method: POST
HTTP Headers:
-
Content-Type: application/json
, -
Authorization: Token your-api-token-here
.
Body: JSON
object with Post
fields.
Status: 201 Created
Body:
{
"result": {
(...Post fields...)
}
}
Request body - post_text_minimal.json:
{
"template": "text",
"title": "Post API Example",
"body": "Bla bla bla...",
"content_zones": [1, 2, 3]
}
HTTPie request:
http --follow POST https://dive-networks.com/api/rpc/34/add_post Authorization:"Token your-api-token-here" < post_text_minimal.json
HTTPie response:
HTTP/1.1 201 Created
(...headers...)
{
"result": {
"background_color": "ffffff",
"body": "Bla bla bla...",
"content_zones": [
1,
2,
3
],
"duration": null,
"frequency": 300,
"fullscreen_playback": false,
"id": 119,
"iframe_url": null,
"image_height": null,
"image_layout": "auto",
"image_url": null,
"image_width": null,
"intro_background_color": "6d4fc3",
"intro_text_color": "ffffff",
"is_published": true,
"media_type": null,
"override_end": null,
"override_start": null,
"pdf_height": null,
"pdf_numpages": null,
"pdf_thumbnail_url": null,
"pdf_url": null,
"pdf_width": null,
"priority": "low",
"schedule_end": "2019-06-04T06:53:51.126431-04:00",
"schedule_start": "2019-05-28T06:53:51.126431-04:00",
"show_data_source_in_player": true,
"show_post_in_player_window": true,
"show_publication_time": false,
"show_text_in_ticker": false,
"show_title_in_player": true,
"subtitle": null,
"template": "text",
"text_color": "000000",
"text_layout": "auto",
"title": "Post API Example",
"uploaded_file_s3_bucket": "",
"uploaded_file_s3_key": "",
"uploaded_file_size_bytes": null,
"video_filename": null,
"video_url": null,
"youtube_url": null
}
}
Templates: