Platform API (2)

Download OpenAPI specification:Download

Access Platform API for create, update, list and delete Videos, & Categories.

We have a newer API version available here and support Livestreaming and Live Sources as well.

Authentication

You'll need both API key and site/workspace id in most of the API call. You can find your API key and siteid (workspaceid) under workspace/settings.

Requesting the API

Base url for the API is:

  https://api.flowplayer.com/ovp/

Depending on what type of request you want to make you will have to add the API key differently. In get-endpoints the API key is added as an query-param named api-key and for post, put and delete it's added in the request body.

For example, a get video is requested as below:

  https://api.flowplayer.com/ovp/web/video/v2/{video_id}.json?api_key={your_api_key}

Content Type

The format, XML or Json, is determined by both Content-Type-header and the end of the request path. For Json-requests you'll need to end the request with .json and for XML with .xml.

Example of a Create video request with Json:

  --header: Content-Type: application/json

  https://api.flowplayer.com/ovp/web/video/v2/create.json

Example of a Create video request with XML:

  --header: Content-Type: application/xml

  https://api.flowplayer.com/ovp/web/video/v2/create.xml

Category

Get Category

This private request returns data for a single category.

path Parameters
id
required
string
Example: your_category_id

Id of the category

query Parameters
api_key
required
string
Example: api_key=your_api_key

API-key for the workspace which the category belongs to.

Responses

Response samples

Content type
{
  • "id": "category_id",
  • "name": "category name",
  • "description": "category description",
  • "hidden": false,
  • "parentid": "1743542c-2fa6-4de3-b902-2c67253a7be7",
  • "noads": true
}

Create Category

Creates a category and returns data for the created category.

Request Body schema: application/json
api_key
required
string

API-key for the site.

siteid
required
string

Site id for the site which the category should be added to.

name
required
string
description
string

The category description.

hidden
boolean

Deprecated. If the category should be publicly visible, for example in a portal. Possible values are true or false. Notice that videos in the category will still be available with the public API.

parentid
string

The id of the parent for this category. This field is optional, it can be left out if the category shouldn't have a parent.

noads
boolean

Deprecated. Advertisement parameter that describes if the Category should display ads or not. Possible values are true or false

Responses

Request samples

Content type
application/json
{
  • "api_key": "your_api_key",
  • "siteid": "your_site/workspace_id",
  • "name": "category name",
  • "description": "category description",
  • "hidden": false,
  • "parentid": "1743542c-2fa6-4de3-b902-2c67253a7be7",
  • "noads": true
}

Response samples

Content type
{
  • "id": "category_id",
  • "name": "category name",
  • "description": "category description",
  • "hidden": false,
  • "parentid": "1743542c-2fa6-4de3-b902-2c67253a7be7",
  • "noads": true
}

Update Category

Updates a category and returns data for the updated category.

Request Body schema: application/json
api_key
required
string

API-key for the site.

siteid
required
string

Site id for the site which the category should be added to.

id
required
string

Id for the category.

name
required
string
description
string

The category description.

hidden
boolean

Deprecated. If the category should be publicly visible, for example in a portal. Possible values are true or false. Notice that videos in the category will still be available with the public API.

parentid
string

The id of the parent for this category. This field is optional, it can be left out if the category shouldn't have a parent.

noads
boolean

Deprecated. Advertisement parameter that describes if the Category should display ads or not. Possible values are true or false

Responses

Request samples

Content type
application/json
{
  • "api_key": "your_api_key",
  • "siteid": "your_site/workspace_id",
  • "id": "category_id",
  • "name": "category name",
  • "description": "category description",
  • "hidden": false,
  • "parentid": "1743542c-2fa6-4de3-b902-2c67253a7be7",
  • "noads": true
}

Response samples

Content type
{
  • "id": "category_id",
  • "name": "category name",
  • "description": "category description",
  • "hidden": false,
  • "parentid": "1743542c-2fa6-4de3-b902-2c67253a7be7",
  • "noads": true
}

List Categories on Workspace

Returns a list of categories for a site (workspace). Results contain maximum 200 categories. Categories are ordered in a tree structure with parent categories and subcategories and this can be used when filtering out categories on a site in this request. There are two parameters for filtering out categories; the first one is only_root which only returns categories without a parent category, the other parameter is parent, which when used only returns categories with the specified parent category.

path Parameters
site_id
required
string
Example: your_site/workspace_id

Id of the workspace that should be listed

format
required
string

Either json or xml depending on format of the response

query Parameters
api_key
required
string
Example: api_key=your_api_key

API-key for the workspace.

only_root
boolean
Default: false
Example: only_root=true

Specifies if only root categories, e.g. with out parent category, should be returned.

parent
string
Example: parent=parent_category_id

Only returns categories with the specified parent category.

page
integer
Default: 1
Example: page=1

Specifies the page of results to retrieve.

page_size
integer
Default: 20
Example: page_size=20

Specifies the number of categories to try and retrieve, up to a maximum of 200.

Responses

Response samples

Content type
{
  • "categories": [
    ]
}

Video

List Videos

Returns a list of videos for the site/workspace. By default it returns the 20 most recent videos on the site/workspace, but with the parameters you change the number of returning videos as well as the order of the videos in the list. The maximum videos that can be returned is 200.

path Parameters
id
required
string
Example: video_id

Id of the site/workspace

format
required
string

Response format. Either json or xml.

query Parameters
api_key
required
string
Example: api_key=your_api_key

API-key for the site/workspace

sort_by
string
Example: sort_by=name

Specifies the attribute on which the videos should be ordered. The possible attributes to sort by created_at, published_at, name, updated_at

sort_order
string
Example: sort_order=desc

Specifies the order in which the videos should be ordered. Possible values desc or asc.

page
integer
Example: page=1

Specifies the page of results to retrieve. Default is 1`.

page_size
integer
Example: page_size=20

Specifies the number of videos to try and retrieve, up to a maximum of 200, with the default value 20.

categories
string
Example: categories=category_id

Only return videos in specified categories. It takes a comma separated list of category ids as input.

search
string

Lets you search your videos title, id, external id, description for matching phrases. Returns a list of videos which matches the search criteria. The search is not case sensitive.

published
boolean
Example: published=true

When this parameter is true, the response only contain videos that are publicly available. To be publicly available the video have publish-parameter set to true and it's publishing date should have passed.

Responses

Response samples

Content type
application/json
{}

Get Video

Returns data for a single video. The remote´`-field in the response describes if the Video is a remote video or not.

path Parameters
id
required
string
Example: video_id

ID of the video

format
required
string

Response format. Either json or xml.

query Parameters
api_key
required
string
Example: api_key=your_api_key

API-key for the site/workspace

Responses

Response samples

Content type
application/json
{}

Delete Video

For deleting a video from your video library.

path Parameters
format
required
string

Request format. Either json or xml.

Request Body schema: application/json
id
string

The video id

api_key
string

API-key for the site/workspace

siteid
string

Site id for the video's site/workspace

userid
string

This user must have rights to edit/delete the video

Responses

Request samples

Content type
application/json
{
  • "id": "video_id_1",
  • "api_key": "your_api_key",
  • "siteid": "your_site/workspace_id",
  • "userid": "your_user_id"
}

Response samples

Content type
application/json
{
  • "deleted": "video_id_1"
}

Update Video

This private request should be used to update data for an existing video in Flowplayer's system.

path Parameters
format
required
string

Request format. Either json or xml.

Request Body schema: application/json
id
required
string

Id of the video to update

api_key
required
string

API-key for the site/workspace

siteid
required
string

Site id for the video's site/workspace

image
string

Url to an image that should be used as poster image for the video. As in the case with video files Flowplayer accept both FTP and HTTP addresses. The supported file formats are jpg, gif and png.

name
string

The video name, can be displayed in the player

description
string

The video description, can be displayed in the player.

duration
number

Duration of the video in milliseconds. Available after the encoding have successfully completed.

published_at
string

The publishing date formatted in yyyy-MM-dd'T'HH:mm:ssZ.

unpublished_at
string

The unpublishing date, if any, formatted in yyyy-MM-dd'T'HH:mm:ssZ. Together with use_unpublishing_date this decides if the video is not publicly visible after the unpublishing date.

use_unpublish_date
boolean

If unpublish date is active on this video.

published
boolean

If the video is available in for example endscreen and other public listings.

categoryid
string

Id for the category that the video belongs to.

tags
string

A commaseperated list of tags.

noads
boolean

If no ads should be displayed with the video although the player is configured with ads. This only works for Iframe-embed.

adtags
string

String that can be use to in the Vast-tag ad macro for replacing ad_keyword.

externalvideoid
string

The, if any, externalvideoid that is connected to the video.

customfield1
string

Set the value for the first custom field. This is always a String.

customfield2
string

Set the value for the second custom field. This is always a String.

customfield3
string

Set the value for the third custom field. This is always a String.

customfield4
string

Set the value for the forth custom field. This is always a String.

customfield5
string

Set the value for the fifth custom field. This is always a String.

additionalCustomFields
string

If you have already specified additional custom fields for this site/workspace. Then you can add some or all of those fields here as json. For example {"CustomFieldName1":"value1", "CustomFieldName2":"value2"}

Responses

Request samples

Content type
application/json
{
  • "id": "video_id_to_be_updated",
  • "api_key": "your_api_key",
  • "siteid": "your_site/workspace_id",
  • "name": "video name",
  • "description": "video description",
  • "duration": 60000,
  • "published_at": "2020-01-22T20:00:00Z",
  • "unpublished_at": "2020-01-22T20:00:00Z",
  • "use_unpublish_date": true,
  • "published": false,
  • "categoryid": "a_category_id",
  • "tags": "foo,bar",
  • "noads": false,
  • "adtags": "foo,bar",
  • "externalvideoid": "video_ext_id",
  • "customfield1": "value_1",
  • "customfield2": "value_2",
  • "customfield3": "value_2",
  • "customfield4": "value_4",
  • "customfield5": "value_4",
  • "additionalCustomFields": "{\"CustomFieldName1\":\"value1\", \"CustomFieldName2\":\"value2\"}"
}

Response samples

Content type
application/json
{}

Create Video

This private request can be used to insert a video into Flowplayer's system. In order to create a video you must include a link to the video file that should be used. Flowplayer can handle files from both FTP and HTTP. The platform also support uploading local files using a Signed Url which in some cases can be convenient. More information can be found in the "Create Video with Signed Upload Url".

path Parameters
format
required
string

Request format. Either json or xml.

Request Body schema: application/json
api_key
required
string

API-key for the site/workspace

siteid
required
string

Site id for the video's site/workspace

input
required
string

Url to the video file that should be imported. Flowplayer accept HTTP and HTTPS addresses.

userid
string

Id for the user that uploaded the video

image
string

Url to an image that should be used as poster image for the video. As in the case with video files Flowplayer accept both FTP and HTTP addresses. The supported file formats are jpg, gif and png.

name
string

The video name, can be displayed in the player

description
string

The video description, can be displayed in the player.

duration
number

Duration of the video in milliseconds. Available after the encoding have successfully completed.

published_at
string

The publishing date formatted in yyyy-MM-dd'T'HH:mm:ssZ.

unpublished_at
string

The unpublishing date, if any, formatted in yyyy-MM-dd'T'HH:mm:ssZ. Together with use_unpublishing_date this decides if the video is not publicly visible after the unpublishing date.

use_unpublish_date
boolean

If unpublish date is active on this video.

published
boolean

If the video is available in for example endscreen and other public listings.

categoryid
string

Id for the category that the video belongs to.

tags
string

A commaseperated list of tags.

noads
boolean

If no ads should be displayed with the video although the player is configured with ads. This only works for Iframe-embed.

adtags
string

String that can be use to in the Vast-tag ad macro for replacing ad_keyword.

externalvideoid
string

The, if any, externalvideoid that is connected to the video.

customfield1
string

Set the value for the first custom field. This is always a String.

customfield2
string

Set the value for the second custom field. This is always a String.

customfield3
string

Set the value for the third custom field. This is always a String.

customfield4
string

Set the value for the forth custom field. This is always a String.

customfield5
string

Set the value for the fifth custom field. This is always a String.

additionalCustomFields
string

If you have already specified additional custom fields for this site/workspace. Then you can add some or all of those fields here as json. For example {"CustomFieldName1":"value1", "CustomFieldName2":"value2"}

Responses

Request samples

Content type
application/json
{
  • "api_key": "your_api_key",
  • "siteid": "your_site/workspace_id",
  • "userid": "user_id_of_creator",
  • "name": "video name",
  • "description": "video description",
  • "duration": 60000,
  • "published_at": "2020-01-22T20:00:00Z",
  • "unpublished_at": "2020-01-22T20:00:00Z",
  • "use_unpublish_date": true,
  • "published": false,
  • "categoryid": "a_category_id",
  • "tags": "foo,bar",
  • "noads": false,
  • "adtags": "foo,bar",
  • "externalvideoid": "video_ext_id",
  • "customfield1": "value_1",
  • "customfield2": "value_2",
  • "customfield3": "value_2",
  • "customfield4": "value_4",
  • "customfield5": "value_4",
  • "additionalCustomFields": "{\"CustomFieldName1\":\"value1\", \"CustomFieldName2\":\"value2\"}"
}

Response samples

Content type
application/json
{}

Copy Videos to another Workspace

This private request can be used if you want to create a copy of a video on another Workspace within the organization.

Request Body schema: application/json
video_id
required
string

The id of the video that should be copied

source_api_key
required
string

Workspace Api-Key that have access to the video that should be copied

destination_api_key
required
string

Workspace Api-Key for the Workspace that will have the new copy of the video

destination_workspace_id
required
string

Identifier for the Workspace that will have the new copy of the video

user_id
required
string

The id of the user that will be the creator of the new copy of the video

Responses

Request samples

Content type
application/json
{
  • "video_id": "video_id_to_be_copied",
  • "source_api_key": "your_api_key",
  • "destination_api_key": "your_api_key",
  • "destination_workspace_id": "workspace_id",
  • "user_id": "creator_ir"
}

Response samples

Content type
application/json
{}

Create Remote Video

Use this request to insert remote videos into Flowplayer's system. Remote videos should be used when you have video links that you want to deliver through your own CDN and store on your own storage solution. This can also be used without adding a link to your video file if you want analytics on a specific assets without requesting the platform-backend for video information.

path Parameters
format
required
string

Request format. Either json or xml.

Request Body schema: application/json
api_key
required
string

API-key for the site/workspace

site_id
required
string

Id for the video's site/workspace

user_id
string

Id for the user that uploaded the video

name
string

The video name, can be displayed in the player

description
string

The video description, can be displayed in the player.

duration
number

Duration of the video in milliseconds. Available after the encoding have successfully completed.

publish_at
string

The publishing date formatted in yyyy-MM-dd'T'HH:mm:ssZ.

unpublish_at
string

The unpublishing date, if any, formatted in yyyy-MM-dd'T'HH:mm:ssZ. Together with use_unpublishing_date this decides if the video is not publicly visible after the unpublishing date.

use_unpublish_date
boolean

If unpublish date is active on this video.

published
boolean

If the video is available in for example endscreen and other public listings.

category_id
string

Id for the category that the video belongs to.

tags
string

A commaseperated list of tags.

no_ads
boolean

If no ads should be displayed with the video although the player is configured with ads. This only works for Iframe-embed.

external_video_id
string

The, if any, external video id that is connected to the video.

custom_field_1
string

Set the value for the first custom field. This is always a String.

custom_field_2
string

Set the value for the second custom field. This is always a String.

custom_field_3
string

Set the value for the third custom field. This is always a String.

custom_field_4
string

Set the value for the forth custom field. This is always a String.

custom_field_5
string

Set the value for the fifth custom field. This is always a String.

video_url_hls
string

Url to your video HLS-file that will be used in the player

video_url_mp4
string

Url to your video MP4-file that will be used in the player

video_url_webm
string

Url to your video webM-file that will be used in the player

thumbnail_url
string

Url to an image that should be used as poster image for the video.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

Update Remote Video

Use this request to update existing remote videos in Flowplayer's system. Remote videos should be used when you have video links that you want to deliver through your own CDN and store on your own storage solution. This can also be used without adding a link to your video file if you want analytics on a specific assets without requesting the platform-backend for video information.

path Parameters
format
required
string

Request format. Either json or xml.

Request Body schema: application/json
api_key
required
string

API-key for the site/workspace

site_id
required
string

Id for the video's site/workspace

id
required
string

Id of the Video that should be updated

name
string

The video name, can be displayed in the player

description
string

The video description, can be displayed in the player.

duration
number

Duration of the video in milliseconds. Available after the encoding have successfully completed.

publish_at
string

The publishing date formatted in yyyy-MM-dd'T'HH:mm:ssZ.

unpublish_at
string

The unpublishing date, if any, formatted in yyyy-MM-dd'T'HH:mm:ssZ. Together with use_unpublishing_date this decides if the video is not publicly visible after the unpublishing date.

use_unpublish_date
boolean

If unpublish date is active on this video.

published
boolean

If the video is available in for example endscreen and other public listings.

category_id
string

Id for the category that the video belongs to.

tags
string

A commaseperated list of tags.

no_ads
boolean

If no ads should be displayed with the video although the player is configured with ads. This only works for Iframe-embed.

external_video_id
string

The, if any, external video id that is connected to the video.

custom_field_1
string

Set the value for the first custom field. This is always a String.

custom_field_2
string

Set the value for the second custom field. This is always a String.

custom_field_3
string

Set the value for the third custom field. This is always a String.

custom_field_4
string

Set the value for the forth custom field. This is always a String.

custom_field_5
string

Set the value for the fifth custom field. This is always a String.

video_url_hls
string

Url to your video HLS-file that will be used in the player

video_url_mp4
string

Url to your video MP4-file that will be used in the player

video_url_webm
string

Url to your video webM-file that will be used in the player

thumbnail_url
string

Url to an image that should be used as poster image for the video.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}
Results