Resource Information
Method | GET |
---|---|
URL | https://public-api.wordpress.com/rest/v1.1/videos/$guid |
Requires authentication? | No |
Method Parameters
Parameter | Type | Description |
---|---|---|
$guid | (string) | The guid of the video |
Query Parameters
Parameter | Type | Description |
---|---|---|
context | (string) |
|
http_envelope | (bool) |
|
pretty | (bool) |
|
meta | (string) | Optional. Loads data from the endpoints found in the 'meta' part of the response. Comma-separated list. Example: meta=site,likes |
fields | (string) | Optional. Returns specified fields only. Comma-separated list. Example: fields=ID,title |
callback | (string) | An optional JSONP callback function. |
birth_month | (int) | The month the visitor was born |
birth_day | (int) | The day of the month the visitor was born |
birth_year | (int) | The year the visitor was born |
metadata_token | (string) | Optional. Permissions token |
Response Parameters
Parameter | Type | Description |
---|---|---|
title | (string) | Title of the video |
description | (string) | Description of the video |
width | (int) | Width of the video |
height | (int) | Height of the video |
duration | (int) | The length of the video, in milliseconds |
display_embed | (bool) | Should the embed menu be shown? |
allow_download | (bool) | Whether to display and allow video downloads |
rating | (string) | The rating of the video |
privacy_setting | (int) | The privacy level for the video |
poster | (string) | The URL of the video image |
original | (string) | The URL of the original video |
watermark | (string) | URL of a watermark logo |
bg_color | (string) | Custom background color |
files | (array) | List of video formats and the associated filenames |
file_url_base | (array) | List of protocols and the base needed for creating file URLs |
blog_id | (int) | Blog ID of the site where the video was uploaded |
post_id | (int) | Post ID of the video attachment post |
upload_date | (string) | Date the video was uploaded in ISO 8601 format |
finished | (bool) | Is video transcoding finished? |
files_status | (array) | Transcoding status for each video file format |
subtitles | (array) | Available subtitle formats with information for each language that is available |
Resource Errors
These are the possible errors returned by this endpoint.
HTTP Code | Error Identifier | Error Message |
---|---|---|
404 | unknown_media | The specified video was not found. |
400 | invalid_input | Please supply the birthdate parameters. |
Example
curl 'https://public-api.wordpress.com/rest/v1.1/videos/OO4thna8?birth_month=1&birth_day=1&birth_year=2000'
<?php $options = array ( 'http' => array ( 'ignore_errors' => true, ), ); $context = stream_context_create( $options ); $response = file_get_contents( 'https://public-api.wordpress.com/rest/v1.1/videos/OO4thna8?birth_month=1&birth_day=1&birth_year=2000', false, $context ); $response = json_decode( $response ); ?>
Response
{ "guid": "OO4thna8", "title": "VideoPress demo", "description": "", "width": 1280, "height": 720, "duration": 143700, "display_embed": true, "allow_download": false, "rating": "G", "poster": "https:\/\/videos.files.wordpress.com\/OO4thna8\/videopress2-web2_hd.original.jpg", "original": "https:\/\/videos.files.wordpress.com\/OO4thna8\/videopress2-web2.mov", "watermark": "https:\/\/wptv.files.wordpress.com\/2010\/07\/wptv.png", "bg_color": "", "files": { "std": { "mp4": "videopress2-web2.mp4", "original_img": "videopress2-web2.original.jpg", "thumbnail_img": "videopress2-web2.thumbnail.jpg" }, "dvd": { "mp4": "videopress2-web2_dvd.mp4", "original_img": "videopress2-web2_dvd.original.jpg", "thumbnail_img": "videopress2-web2_dvd.thumbnail.jpg" }, "hd": { "mp4": "videopress2-web2_hd.mp4", "original_img": "videopress2-web2_hd.original.jpg", "thumbnail_img": "videopress2-web2_hd.thumbnail.jpg" } }, "file_url_base": { "http": "http:\/\/videos.videopress.com\/OO4thna8\/", "https": "https:\/\/videos.files.wordpress.com\/OO4thna8\/" }, "blog_id": 5089392, "post_id": 1913, "is_private": false, "privacy_setting": 2, "privacy_details": { "provider": "auth", "title": "This video is private", "unauthorized_message": "Unauthorized" }, "private_enabled_for_site": false, "upload_date": "2009-05-18T17:25:49+0000", "finished": true, "files_status": { "std": { "mp4": "DONE", "ogg": "DONE" }, "avc_240p": null, "dvd": { "mp4": "DONE" }, "hd": { "mp4": "DONE" }, "hd_1080p": null, "hd_1080p_compat": null, "hevc_1440p": null, "vp9_1440p": null, "hevc_2160p": null, "vp9_2160p": null }, "subtitles": [], "tracks": [], "adaptive_streaming": null, "adaptive_streaming_r": null, "format_meta": { "std": { "codec": "avc", "label": "224p", "vertical_lines": 224 }, "avc_240p": { "codec": "avc", "label": "240p", "vertical_lines": 240 }, "dvd": { "codec": "avc", "label": "480p", "vertical_lines": 480 }, "hd": { "codec": "avc", "label": "720p", "vertical_lines": 720 }, "hd_1080p": { "codec": "avc", "label": "1080p", "vertical_lines": 1080 }, "hevc_1440p": { "codec": "hevc", "label": "1440p", "vertical_lines": 1440 }, "vp9_1440p": { "codec": "vp9", "label": "1440p", "vertical_lines": 1440 }, "hevc_2160p": { "codec": "hevc", "label": "4K", "vertical_lines": 2160 }, "vp9_2160p": { "codec": "vp9", "label": "4K", "vertical_lines": 2160 } }, "thumbnails_grid": { "grid_interval": 1000, "grid_width": 10, "grid_height": 10, "thumbs_height": 288, "files": [ { "file": "videopress2-web2_mov.thumbgrid_0.jpg", "start_time_ms": 0, "end_time_ms": 100000, "thumbs_count": 100 }, { "file": "videopress2-web2_mov.thumbgrid_1.jpg", "start_time_ms": 100000, "end_time_ms": 144000, "thumbs_count": 44 } ] }, "thumbnail_generating": false }