-
Notifications
You must be signed in to change notification settings - Fork 0
Post API Update Post
Dominik Magdaleński edited this page Jul 3, 2019
·
1 revision
URL: https://dive-networks.com/api/rpc/34/update_post?id=post-id-here
HTTP Method: PATCH
Required HTTP Headers:
-
Content-Type: application/json
, -
Authorization: Token your-api-token-here
.
Required query parameter: id
Body: JSON
object with Post
' fields you would like to update.
Status: 200 OK
Body:
{
"result": {
(...Post fields...)
}
}
Let's update "body"
field of the Post
with "id": 126
:
HTTPie request:
http --follow PATCH https://dive-networks.com/api/rpc/34/update_post?id=126 Authorization:"Token your-api-token-here" body="Dive in!"
HTTPie response:
HTTP/1.1 200 OK
(...headers...)
{
"result": {
"background_color": "ffffff",
"body": "Dive in!",
"content_zones": [],
"duration": null,
"frequency": 300,
"fullscreen_playback": false,
"id": 126,
"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": false,
"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-06T06:41:30.558850-04:00",
"schedule_start": "2019-05-30T06:41:30.558850-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
}
}