Skip to content

Post API Add Post Example Text

Dominik Magdaleński edited this page Jul 3, 2019 · 1 revision

Post API - /add_post - Text template example

body.json:

{
  "template": "text",
  "title": "Welcome!",
  "body": "Have a nice day!",
  "content_zones": [15]
}

Request:

http --follow POST https://dive-networks.com/api/rpc/34/add_post Authorization:"Token your-api-token-here" < body.json

Response:

HTTP/1.1 201 Created
(...headers...)

{
    "result": {
        "background_color": "ffffff",
        "body": "Have a nice day!",
        "content_zones": [
            15
        ],
        "duration": null,
        "frequency": 300,
        "fullscreen_playback": false,
        "id": 143,
        "iframe_url": null,
        "image_height": null,
        "image_layout": "auto",
        "image_url": null,
        "image_width": null,
        "intro_background_color": null,
        "intro_text_color": null,
        "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-25T08:16:57.067913-04:00",
        "schedule_start": "2019-06-18T08:16:57.067913-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": "Welcome!",
        "uploaded_file_s3_bucket": "",
        "uploaded_file_s3_key": "",
        "uploaded_file_size_bytes": null,
        "video_filename": null,
        "video_url": null,
        "youtube_url": null
    }
}