PUT Videos
Overview
The following table contains information about the PUT method for managing the process for updating a specific video.
| PUT Video | |
|---|---|
| Method | PUT |
| URL or Endpoint | /api/projects/projectId/videos |
| Headers | Authorization |
| Parameters | projectId |
| Body | Check the request body below |
The description of the URL parameter is as follows:
| projectId Parameter | |
|---|---|
| URL Parameter Name | projectId |
| Mandatory | Yes |
| Type | string |
| Description | Unique Id of the project |
Request Body
{
"publicId": "string",
"name": "string",
"title": "string",
"description": "string",
"publishDate": "2024-05-21T08:03:40.817Z",
"publishEndDate": "2024-05-21T08:03:40.817Z",
"shareUrl": "string",
"publicAdScheduleId": "string",
"categoryId": 0,
"geoBlockingRuleId": 0,
"entityRestrictionId": 0,
"skipIntroState": true,
"skipIntroFrom": 0,
"skipIntroTo": 0,
"source": "string",
"author": "string",
"customOverlayState": true,
"videoLockState": true,
"lockAfter": 0,
"password": "string",
"passwordProtectedTitle": "string",
"passwordProtectedDescription": "string",
"chapterState": true,
"chapterTimeMode": 1,
"visibilityOptionId": 0,
"adOverrideState": false,
"adCuePointsEnabled": false,
"prerollCount": 0,
"ageRestrictionState": true,
"ageRestriction": 0,
"tagNames": [
"string"
],
"flagIds": [
0
],
"customParameters": [
{
"key": "string",
"value": "string"
}
],
"customOverlays": [
{
"caption": "string",
"secondsFrom": 0,
"secondsTo": 0,
"position": 1
}
],
"chapters": [
{
"title": "string",
"time": 0
}
],
"adCuePoints": [
{
"cuePoint": 0
}
],
"timedLinks": [
{
"title": "string",
"url": "string",
"time": 0,
"duration": 10
}
]
}
Information about the fields that appear when you type in the request body are displayed in the table below.
| Parameter Name | Mandatory | Type | Description |
|---|---|---|---|
| publicId | Yes | string | Public Id of the video |
| name | Yes | string | Name of the video |
| title | Yes | string | Title of the video |
| description | No | string | Description of the video |
| publishDate | Yes | Date | Publish date of the video |
| publishEndDate | No | Date | Publish end date of the video |
| shareUrl | No | string | A share URL redirects viewers to a custom destination when they share a video; if not provided, the player shares the video's embed location |
| publicAdScheduleId | No | string | The Id of the ad schedule |
| categoryId | No | integer($int32) | Id of the category |
| geoblockingRuleId | No | integer($int32) | Id of the geoblocking rule |
| entityRestrictionId | Yes | integer($int32) | Entity restriction Id |
| skipIntroState | No | bool | The state of the skip intro option |
| skipIntroFrom | No | integer($int32) | The amount of time the intro skips from |
| skipIntroTo | No | integer($int32) | The amount of time the intro skips to |
| source | No | string | The source of the video |
| author | No | string | The author of the video |
| customOverlayState | No | bool | State of custom overlays |
| videoLockState | No | bool | State of video lock |
| lockAfter | Yes | integer($int32) | Specifies duration before video is locked |
| password | Yes | string | Specifies the password for locked video |
| passwordProtectedTitle | No | string | Custom player title for password protected videos |
| passwordProtectedDescription | No | string | Custom player description for password protected videos |
| chapterState | No | bool | State of the chapters |
| chapterTimeMode | No | integer($int32) | Controls how chapter time values are interpreted. 1 = EndTime (the time marks the end of the chapter), 2 = StartTime (the time marks the start of the chapter). Defaults to 1. |
| visibilityOptionId | Yes | integer($int32) | Id of the visibility option |
| adOverrideState | No | boolean | Enables per-video ad overrides when set to true |
| adCuePointsEnabled | No | boolean | Indicates whether midroll ad cue points are overridden for this video |
| prerollCount | No | integer or null | The number of preroll ads to play for this video. Null means no override. |
| ageRestrictionState | No | boolean or null | Enables the age-restriction gate for the video when set to true |
| ageRestriction | No | integer or null | Minimum viewer age required to play the video. Must be between 1 and 99 when ageRestrictionState is true |
| tagNames | No | array[string] | An array of video tags |
| flagIds | No | array[integer($int32)] | An array of flag Ids |
| customParameters | No | array[Object] | An array of custom parameters |
| key | Yes | string | The key of the custom parameter |
| value | Yes | string | The value of the custom parameter |
| customOverlays | No | array[Object] | An array of custom overlays |
| caption | Yes | string | Caption of custom overlay |
| secondsFrom | Yes | integer($int32) | Specifies start time in seconds |
| secondsTo | Yes | integer($int32) | Specifies end time in seconds |
| positon | Yes | integer($int32) | Specifies the position |
| chapters | No | array[Object] | An array of chapters |
| title | No | string | Title of chapter |
| time | Yes | integer($int32) | Specifies end time in seconds for the specific chapter |
| adCuePoints | No | array[Object] | An array of custom ad cue points for midroll ad placement |
| cuePoint | Yes | integer | The time in seconds at which a midroll ad should be triggered |
| timedLinks | No | array[Object] | An array of timed links shown over the video during playback. The whole list is synced on every update, so send the complete set of timed links you want to keep. Any timed link you omit is removed |
| title | No | string | The text displayed for the timed link. Must not exceed 200 characters |
| url | Yes | string | The destination URL of the timed link. Must be a valid URL and must not exceed 2048 characters |
| time | No | integer($int32) | The time in seconds at which the timed link appears. Defaults to 0 when omitted, and must be unique across the timed links of the video |
| duration | No | integer($int32) | How long in seconds the timed link stays visible. Must be greater than 0 when provided, and time plus duration must not exceed the duration of the video |
Response
{
"success": true,
"errors": [],
"messages": [],
"result": {
"publicId": "{videoId}",
"id": "{videoId}",
"name": "{name}",
"title": "{title}",
"description": "",
"thumbnailUrl": "https://cdn.vpplayer.tech/{projectId}/encode/{videoId}/thumbnails/retina.jpg",
"filmstripUrl": "https://cdn.vpplayer.tech/{projectId}/encode/{videoId}/thumbnails/filmstrip0.jpg",
"filmstripVttUrl": "https://cdn.vpplayer.tech/{projectId}/encode/{videoId}/thumbnails/filmstrip.vtt",
"publishDate": "2024-05-21T10:01:11.833481",
"publishEndDate": null,
"shareUrl": "string",
"liveCutStartDate": null,
"liveCutEndDate": null,
"insertDate": "2024-05-21T08:01:05.4141661",
"publishStatusId": 2,
"publishStatusName": "Ready",
"duration": 150,
"userName": null,
"categoryId": null,
"folderId": 0,
"publicAdScheduleId": null,
"restrictionId": null,
"skipIntroState": false,
"skipIntroFrom": null,
"skipIntroTo": null,
"geoBlockingRuleId": null,
"customOverlayState": false,
"chapterState": true,
"chapterTimeMode": 1,
"canEmbed": true,
"canPreview": true,
"source": "",
"author": "",
"isLive": "False",
"visibilityOptionId": 1,
"visibilityOption": "Public",
"videoLockState": false,
"lockAfter": 0,
"password": "1234",
"passwordProtectedTitle": "",
"passwordProtectedDescription": "",
"adOverrideState": false,
"adCuePointsEnabled": false,
"prerollCount": 0,
"ageRestrictionState": true,
"ageRestriction": 0,
"tagNames": [],
"customParameters": [],
"flagIds": null,
"geoBlockingRule": null,
"customOverlays": [
{
"caption": "hello",
"secondsFrom": 1,
"secondsTo": 63,
"position": 2
}
],
"chapters": [
{
"title": "Introduction",
"time": 50
},
{
"title": "Chapter 2",
"time": 90
},
{
"title": "End",
"time": 150
}
],
"adCuePoints": [
{
"cuePoint": 30
},
{
"cuePoint": 90
}
],
"timedLinks": [
{
"title": "Learn more",
"url": "https://example.com/offer",
"time": 30,
"duration": 10
}
]
},
"resultInfo": null,
"statusCode": 200
}
Information about the fields that appear when you receive the response are displayed in the table below.
| Field Name | Type | Description |
|---|---|---|
| success | bool | If the response is successful it will return true. Otherwise will return false |
| errors | array[string] | Indicates if there was an error |
| messages | array[string] | Returns the response message from back-end |
| result | array[Object] | Returns the response object |
| publicId | string | Unique identifier for the video |
| Id | string | Unique identifier for the video |
| name | string | Name of the video |
| title | string | The title of the video |
| description | string | Description of the video |
| thumbnailUrl | string | URL of the video's thumbnail image |
| filmstripUrl | string | URL of the filmstrip image sequence |
| filmstripVttUrl | string | URL of the WebVTT file for the filmstrip |
| publishDate | Date | Date and time when the video was published |
| publishEndDate | Date | Date and time when video will not be available |
| shareUrl | String | A share URL redirects viewers to a custom destination when they share a video; if not provided, the player shares the video's embed location |
| liveCutStartDate | Date | Start date and time for a live cut |
| liveCutStartDate | Date | End date and time for a live cut |
| insertDate | Date | Date and time when the video was inserted |
| publishStatusId | integer($int32) | Id of the video's publish status |
| publishStatusName | string | The name of the publish status |
| duration | string | Duration of the video in seconds |
| userName | string | The name of the user who uploaded the video |
| categoryId | integer($int32) | Id of the category |
| folderId | integer($int32) | Unique id of the parent folder that contains the video |
| publicAdScheduleId | string | The public Id of the ad schedule |
| restrictionId | integer($int32) | Id of the restriction |
| skipIntroState | boolean | The state of the skip intro option |
| skipIntroFrom | integer($int32) | The start time in seconds for skipping the intro |
| skipIntroTo | integer($int32) | The end time in seconds for skipping the intro |
| geoBlockingRuleId | integer($int32) | The Id of the geo blocking rule |
| customOverlayState | bool | Indicates whether custom overlays are enabled |
| chapterState | bool | Indicates whether chapters are enabled |
| chapterTimeMode | integer($int32) | Controls how chapter time values are interpreted. 1 = EndTime (the time marks the end of the chapter), 2 = StartTime (the time marks the start of the chapter). |
| canEmbed | bool | Indicates whether the video can be embedded |
| canPreview | bool | Indicates whether the video can be viewed |
| source | string | The source of the video |
| author | string | The author of the video |
| isLive | string | Indicates whether the video is live |
| visibilityOptionId | integer($int32) | The id of visibility option |
| visibilityOption | string | The name of the visibility option |
| videoLockState | bool | Indicates whether the video is locked |
| lockAfter | integer($int32) | The number of seconds after which the video locks |
| password | string | The password for accessing the video |
| passwordProtectedTitle | string | Custom player title for password protected videos |
| passwordProtectedDescription | string | Custom player description for password protected videos |
| adOverrideState | boolean | Indicates whether per-video ad overrides are enabled |
| adCuePointsEnabled | boolean | Indicates whether midroll ad cue points are overridden for this video |
| prerollCount | integer or null | The number of preroll ads configured for this video. Null when ad overrides are not active. |
| ageRestrictionState | boolean or null | Indicates whether the age-restriction gate is enabled for the video |
| ageRestriction | integer or null | Minimum viewer age required to play the video. Set between 1 and 99 when ageRestrictionState is true |
| tagNames | array[string] | An array of video tags |
| customParameters | array[Object] | An array of custom parameters |
| flagIds | array[integer($int32)] | An array of flag Ids |
| geoblockingRule | string | The geoblocking rule applied to the video |
| customOverlays | array[Object] | Return an array of custom overlays |
| caption | string | The text of the custom overlay |
| secondsFrom | integer($int32) | The start time in seconds |
| secondsTo | integer($int32) | The end time in seconds |
| positon | integer($int32) | The the position of custom overlay |
| chapters | array[Object] | Returns an array of chapters |
| title | string | The title of the chapter |
| time | integer($int32) | The end time for the specific chapter |
| adCuePoints | array[Object] | An array of custom ad cue points for midroll ad placement |
| cuePoint | integer($int32) | The time in seconds at which a midroll ad should be triggered |
| timedLinks | array[Object] | Returns an array of timed links shown over the video during playback, ordered by time |
| title | string | The text displayed for the timed link |
| url | string | The destination URL of the timed link |
| time | integer($int32) | The time in seconds at which the timed link appears |
| duration | integer($int32) | How long in seconds the timed link stays visible |
| resultInfo | string | Returns extra information about the result |
| statusCode | integer($int32) | Returns the HTTP Status Code |
If the action is successful, the service sends back an HTTP 200 or 201 response.
Errors
For information about the errors that are common to all actions, see Common Errors:
HTTP Status Code 400: Bad Request
HTTP Status Code 401: Unauthorized
HTTP Status Code 403: Forbidden
HTTP Status Code 404: Result Not Found
HTTP Status Code 500: Internal Server Error
HTTP Status Code 503: Backend Fetch Failed