OVP RESTful Service

Service url

https://api.qmery.com/ovp/

Notes

  • api_token is required as __GET_ parameters in all services.
  • sort , sort_dir , page ,per_page are the super-global parameters which are checked in every request:
  • sort : a list of validated params to sort the list with
  • sort_dir : direction of sort , a validated list
  • page : Specifies which page of the results you want to see. Defaults to 1 (not 0).
  • per_page : The number of results you want to get back per request. Defaults to 100.

Categories

Categories are the objects which videos are stored in.

Methods

  • List categories
  • View a certain category
  • Update a category
  • Delete a category
  • Add a category

List Categories

Request:

GET https://api.qmery.com/ovp/groups.json?api_token=xxxxxxxxxx

Response:

a 200 OK code and such following JSON:

[
    {
        "title": "پلیسی",
        "hash_id": "OBRVopMBGeWL3Pa5",
        "id": 35421,
        "description": null,
        "video_count": 1,
        "is_default": false,
        "creation_date": 1514281267000,
        "create_date": 1514281267000,
        "last_modification_date": 1514281267000,
        "modified_date": 1514281267000,
        "size": 0,
        "thumbnail": "https://storage.qmery.com/pl/qp_119165955504/vWTeTRBkoltWjUpc5IuyXZP_BLv_4euFYpl0JZxTUFd4vrt3EsVSOs63WxUxoZv6khVrZ38XPCvVPXDwnbYsIi1wwgxwGKciKJb0TvTFtDM/image.jpg",
        "children": []
    },
    {
        "title": "پیش\u200cفرض",
        "hash_id": "wN6jyky35ep7oVPd",
        "id": 35395,
        "description": "پیش\u200cفرض",
        "video_count": 0,
        "is_default": true,
        "creation_date": 1514114161000,
        "create_date": 1514114161000,
        "last_modification_date": 1514114161000,
        "modified_date": 1514114161000,
        "size": 0,
        "thumbnail": "",
        "children": [
            {
                "title": "زیردسته",
                "hash_id": "9P2N7qd8VXqYl3vG",
                "id": 35173,
                "description": null,
                "video_count": 3,
                "is_default": false,
                "creation_date": 1512369732000,
                "create_date": 1512369732000,
                "last_modification_date": 1512369732000,
                "modified_date": 1512369732000,
                "size": 0,
                "thumbnail": "https://storage.qmery.com/pl/qp_103587360780/rkYgzl4iyLwTjTyo4Af4ndixXfvYDjyTGgdCfcWamkM5r7DLpVlCYA6dyj3qJV7nGZMOHTkQ8sCDyedvZUzx_QXSd6eOc5KKwgtVAS4V-F4/image.jpg",
                "children": []
            }
        ]
    }
]

Error list

Code Response Cause
401 Token is invalid or expired or does not have permission -
500 Internal server error we have some difficulties with the service , try back again later or contact the support team

View a certain Category

Request:

GET https://api.qmery.com/ovp/groups/[groupHashId].json?api_token=xxxxxxxxxx

Response:

a 200 OK code and such following JSON:

{
    "id": 35421,
    "title": "پلیسی",
    "hash_id": "OBRVopMBGeWL3Pa5",
    "parent_hash_id": null,
    "description": null,
    "video_count": 1,
    "is_default": false,
    "creation_date": 1514281267000,
    "create_date": 1514281267000,
    "last_modification_date": 1514281267000,
    "modified_date": 1514281267000,
    "size": 0,
    "thumbnail": "https://storage.qmery.com/pl/qp_119165955504/vWTeTRBkoltWjUpc5IuyXZP_BLv_4euFYpl0JZxTUFd4vrt3EsVSOs63WxUxoZv6khVrZ38XPCvVPXDwnbYsIi1wwgxwGKciKJb0TvTFtDM/image.jpg",
    "videos": [
        {
            "id": 485168,
            "hash_id": "zqAla8EQXm",
            "title": "سگهای پلیسی",
            "description": null,
            "vast_tag": null,
            "number_of_views": 0,
            "duration": 45.512,
            "length": 45.512,
            "userId": null,
            "status": "ready",
            "ready": true,
            "auto_start": false,
            "autostart": false,
            "vr": false,
            "hls": "https://storage.qmery.com/hls/qp_119165955504/e98H1isRTURitIrHUIK4iBSOks73bpOzSoofwexgpKeLYEVnfU_iV_B4m-lZKeIU98F-VLj1G8m4jOLKrFBRzBABXTnpWivnS3Yo5rLaR0E/master.qm3u8",
            "is_hls": true,
            "category_hash_id": "OBRVopMBGeWL3Pa5",
            "group_id": 35421,
            "category_title": "پلیسی",
            "size": 4420795,
            "creation_date": 1514281388000,
            "create_date": 1514281388000,
            "last_modification_date": 1514281406000,
            "modified_date": 1514281406000,
            "draft": false,
            "serve_from_user_domain": true,
            "temp_thumbnail": null,
            "viewed": 0,
            "played": 0,
            "uniquePlay": 0,
            "traffic": 0,
            "vastTag": null,
            "subtitles": [],
            "link": [
                {
                    "format": "mp4",
                    "quality": "640x426",
                    "link": "https://storage.qmery.com/pl/qp_119165955504/opnLW5m1PQudsqTHg-IF-k2rCVCIyD8V2DQWxqTb0Zz3IISORPGF7DaNJRdbJhGo/video.mp4",
                    "download": "https://storage.qmery.com/dl/3023/qp_119165955504/opnLW5m1PQudsqTHg-IF-k2rCVCIyD8V2DQWxqTb0Zz3IISORPGF7DaNJRdbJhGo/video.mp4"
                },
                {
                    "format": "mp4",
                    "quality": "400x266",
                    "link": "https://storage.qmery.com/pl/qp_119165955504/HrQ5D6MbQDsWr4f18N26E8mIzUhxixQc4QW6GEPXidjk2xRde792OboTMcs4rz0p/video.mp4",
                    "download": "https://storage.qmery.com/dl/3023/qp_119165955504/HrQ5D6MbQDsWr4f18N26E8mIzUhxixQc4QW6GEPXidjk2xRde792OboTMcs4rz0p/video.mp4"
                },
                {
                    "format": "mp4",
                    "quality": "256x170",
                    "link": "https://storage.qmery.com/pl/qp_119165955504/beaYOukzIyibaQBEuzhr7zY07hZzcnSrvgAV83MnugcuFI7G5L03wTqmoR4PLZLr/video.mp4",
                    "download": "https://storage.qmery.com/dl/3023/qp_119165955504/beaYOukzIyibaQBEuzhr7zY07hZzcnSrvgAV83MnugcuFI7G5L03wTqmoR4PLZLr/video.mp4"
                }
            ],
            "video_qualities": [
                {
                    "hash_id": "gVAyp3Z0Lo",
                    "name": "640x426",
                    "width": "640",
                    "height": "426",
                    "is_default": true,
                    "links": [
                        {
                            "format": "mp4",
                            "quality": "640x426",
                            "link": "https://storage.qmery.com/pl/qp_119165955504/opnLW5m1PQudsqTHg-IF-k2rCVCIyD8V2DQWxqTb0Zz3IISORPGF7DaNJRdbJhGo/video.mp4",
                            "download": "https://storage.qmery.com/dl/3023/qp_119165955504/opnLW5m1PQudsqTHg-IF-k2rCVCIyD8V2DQWxqTb0Zz3IISORPGF7DaNJRdbJhGo/video.mp4"
                        }
                    ]
                },
                {
                    "hash_id": "zqAlwq0nLm",
                    "name": "400x266",
                    "width": "400",
                    "height": "266",
                    "is_default": false,
                    "links": [
                        {
                            "format": "mp4",
                            "quality": "400x266",
                            "link": "https://storage.qmery.com/pl/qp_119165955504/HrQ5D6MbQDsWr4f18N26E8mIzUhxixQc4QW6GEPXidjk2xRde792OboTMcs4rz0p/video.mp4",
                            "download": "https://storage.qmery.com/dl/3023/qp_119165955504/HrQ5D6MbQDsWr4f18N26E8mIzUhxixQc4QW6GEPXidjk2xRde792OboTMcs4rz0p/video.mp4"
                        }
                    ]
                },
                {
                    "hash_id": "pGve37QNAM",
                    "name": "256x170",
                    "width": "256",
                    "height": "170",
                    "is_default": false,
                    "links": [
                        {
                            "format": "mp4",
                            "quality": "256x170",
                            "link": "https://storage.qmery.com/pl/qp_119165955504/beaYOukzIyibaQBEuzhr7zY07hZzcnSrvgAV83MnugcuFI7G5L03wTqmoR4PLZLr/video.mp4",
                            "download": "https://storage.qmery.com/dl/3023/qp_119165955504/beaYOukzIyibaQBEuzhr7zY07hZzcnSrvgAV83MnugcuFI7G5L03wTqmoR4PLZLr/video.mp4"
                        }
                    ]
                }
            ],
            "video_quality": [
                {
                    "name": "640x426",
                    "width": 640,
                    "height": 426
                },
                {
                    "name": "400x266",
                    "width": 400,
                    "height": 266
                },
                {
                    "name": "256x170",
                    "width": 256,
                    "height": 170
                }
            ],
            "thumbnails": [
                {
                    "file": "https://storage.qmery.com/pl/qp_119165955504/vWTeTRBkoltWjUpc5IuyXZP_BLv_4euFYpl0JZxTUFd4vrt3EsVSOs63WxUxoZv6khVrZ38XPCvVPXDwnbYsIi1wwgxwGKciKJb0TvTFtDM/image.jpg",
                    "is_default": false,
                    "index": 0
                },
                {
                    "file": "https://storage.qmery.com/pl/qp_119165955504/Q0xt6tBxA9Wy8q6tnFS2dkt9B3QhSf8EdXwdNL3qS4VB-Mj5D1zyZ0eKAHVGBBcEO3DINQ1fgHrfoS5r78GeFJLPnjU09zLCK90CzKUB2GI/image.jpg",
                    "is_default": false,
                    "index": 1
                },
                {
                    "file": "https://storage.qmery.com/pl/qp_119165955504/Jnqzxy7ixvmXByNgLHct6tRqxlMoJ94mls62hTJkVCkxSk7Tx6LLJno8AFwdmGBcY17hQNuI67oixhEFj8iB4tN-mBSZqpfjLAcEb3xAMvY/image.jpg",
                    "is_default": false,
                    "index": 2
                },
                {
                    "file": "https://storage.qmery.com/pl/qp_119165955504/avkUxBzFgUlwClyGXrMg_XzAXoTHNXm97UAlzNVYrDLoB-ERoSlnETVsvTbwOjiKgP--GFf9C_O06N3SMh8dyDyl7LLepOc38xZPIe3GQAI/image.jpg",
                    "is_default": false,
                    "index": 3
                },
                {
                    "file": "https://storage.qmery.com/pl/qp_119165955504/VfeGSWEhVskDHMqUTUZzDdSpd0e8IBkQZuPOuUiWnlX6SPbe34kz051rM6T3Hyi58xZCdnerIGrHNylQ5gTItGfHzoSMWl_pvV2V_rYCW4Q/image.jpg",
                    "is_default": false,
                    "index": 4
                }
            ],
            "thumbnail": [
                "https://storage.qmery.com/pl/qp_119165955504/vWTeTRBkoltWjUpc5IuyXZP_BLv_4euFYpl0JZxTUFd4vrt3EsVSOs63WxUxoZv6khVrZ38XPCvVPXDwnbYsIi1wwgxwGKciKJb0TvTFtDM/image.jpg",
                "https://storage.qmery.com/pl/qp_119165955504/Q0xt6tBxA9Wy8q6tnFS2dkt9B3QhSf8EdXwdNL3qS4VB-Mj5D1zyZ0eKAHVGBBcEO3DINQ1fgHrfoS5r78GeFJLPnjU09zLCK90CzKUB2GI/image.jpg",
                "https://storage.qmery.com/pl/qp_119165955504/Jnqzxy7ixvmXByNgLHct6tRqxlMoJ94mls62hTJkVCkxSk7Tx6LLJno8AFwdmGBcY17hQNuI67oixhEFj8iB4tN-mBSZqpfjLAcEb3xAMvY/image.jpg",
                "https://storage.qmery.com/pl/qp_119165955504/avkUxBzFgUlwClyGXrMg_XzAXoTHNXm97UAlzNVYrDLoB-ERoSlnETVsvTbwOjiKgP--GFf9C_O06N3SMh8dyDyl7LLepOc38xZPIe3GQAI/image.jpg",
                "https://storage.qmery.com/pl/qp_119165955504/VfeGSWEhVskDHMqUTUZzDdSpd0e8IBkQZuPOuUiWnlX6SPbe34kz051rM6T3Hyi58xZCdnerIGrHNylQ5gTItGfHzoSMWl_pvV2V_rYCW4Q/image.jpg"
            ],
            "video_logos": [],
            "text_overlays": []
        }
    ],
    "children": []
}

Error list

Code Response Cause
401 Token is invalid or expired -
403 Token does not have permission -
403 groupHashId is invalid -
404 There is no category with hash id equal to groupHashId -
403 User does not own the category -
500 Internal server error we have some difficulties with the service , try back again later or contact the support team

Update a category

Request:

PUT https://api.qmery.com/ovp/groups/[groupHashId].json?api_token=xxxxxxxxxx

Parameter Description
title Title of the category
description Description of the category

Response:

if the category has been updated the API will response with a 200 OK status code and the location to the updated category in Location HTTP header and a Group updated response text.

Error list

Code Response Cause
401 Token is invalid or expired -
403 groupHashId is invalid -
403 Invalid function inputs -
401 Token does not have permission -
404 There is no category with hash id equal to groupHashId -
403 User does not own the category -
500 Internal server error we have some difficulties with the service , try back again later or contact the support team

Delete a category

Request:

DELETE https://api.qmery.com/ovp/groups/[groupHashId].json?api_token=xxxxxxxxxx

Response:

if the category has been deleted the API will response with a 200 OK status code and the category details as described in Viewing a category. Will return a 404 Not Found status code with Category was not found message if the category is not found and/or does not belong to this user.

Error list

Code Response Cause
401 Token is invalid or expired -
403 groupHashId is invalid -
401 Token does not have permission -
404 There is no category with hash id equal to groupHashId -
403 User does not own the category -
406 Category cant be deleted Category is user default category
500 Internal server error we have some difficulties with the service , try back again later or contact the support team

Add a category

Request:

POST https://api.qmery.com/ovp/groups.json?api_token=xxxxxxxxxx

Parameter Description Requirement
title Title of the category required
description Description of the category Optional
parent_hash_id Parent category of the category Optional

Response:

a 201 Created code with the hash_id of created category:

{
    "hash_id": "AmvByqQzvmpO4jr3"
}

Error list

Code Response Cause
406 Some of required parameters are missing Title
401 Token is invalid or expired -
403 Invalid function input -
401 Token does not have permission -
406 Parameter 'title' can't be empty Empty title
406 User does not own the parent category -
500 Internal server error we have some difficulties with the service , try back again later or contact the support team

Videos

Videos are the main objects to get to the users.

Methods

  • List videos
  • View a certain video
  • Update a video
  • Delete a video
  • Probe a video
  • Stats of a video
  • Upload a video

List videos

Request:

GET https://api.qmery.com/ovp/videos.json?api_token=xxxxxxxxxx

sort parameter available for sorting videos are consistent of 'id', 'title', 'length', 'create_date', 'modified_date', 'viewed' variables

Response:

a 200 OK code and such following JSON: (hash_id provided can be used for iframe mode too , simple user https://qmery.com/v/[hash_id] to have the iframe.)

[
    {
        "id": 485168,
        "hash_id": "zqAla8EQXm",
        "title": "سگهای پلیسی",
        "description": null,
        "vast_tag": null,
        "number_of_views": 0,
        "duration": 45.512,
        "length": 45.512,
        "userId": null,
        "status": "ready",
        "ready": true,
        "auto_start": false,
        "autostart": false,
        "vr": false,
        "hls": "https://storage.qmery.com/hls/qp_119165955504/e98H1isRTURitIrHUIK4iBSOks73bpOzSoofwexgpKeLYEVnfU_iV_B4m-lZKeIU98F-VLj1G8m4jOLKrFBRzBABXTnpWivnS3Yo5rLaR0E/master.qm3u8",
        "is_hls": true,
        "category_hash_id": "OBRVopMBGeWL3Pa5",
        "group_id": 35421,
        "category_title": "جنایی",
        "size": 4420795,
        "creation_date": 1514281388000,
        "create_date": 1514281388000,
        "last_modification_date": 1514281406000,
        "modified_date": 1514281406000,
        "draft": false,
        "serve_from_user_domain": true,
        "temp_thumbnail": null,
        "viewed": 0,
        "played": 0,
        "uniquePlay": 0,
        "traffic": 0,
        "vastTag": null,
        "subtitles": [],
        "link": [
            {
                "format": "mp4",
                "quality": "640x426",
                "link": "https://storage.qmery.com/pl/qp_119165955504/opnLW5m1PQudsqTHg-IF-k2rCVCIyD8V2DQWxqTb0Zz3IISORPGF7DaNJRdbJhGo/video.mp4",
                "download": "https://storage.qmery.com/dl/3023/qp_119165955504/opnLW5m1PQudsqTHg-IF-k2rCVCIyD8V2DQWxqTb0Zz3IISORPGF7DaNJRdbJhGo/video.mp4"
            },
            {
                "format": "mp4",
                "quality": "400x266",
                "link": "https://storage.qmery.com/pl/qp_119165955504/HrQ5D6MbQDsWr4f18N26E8mIzUhxixQc4QW6GEPXidjk2xRde792OboTMcs4rz0p/video.mp4",
                "download": "https://storage.qmery.com/dl/3023/qp_119165955504/HrQ5D6MbQDsWr4f18N26E8mIzUhxixQc4QW6GEPXidjk2xRde792OboTMcs4rz0p/video.mp4"
            },
            {
                "format": "mp4",
                "quality": "256x170",
                "link": "https://storage.qmery.com/pl/qp_119165955504/beaYOukzIyibaQBEuzhr7zY07hZzcnSrvgAV83MnugcuFI7G5L03wTqmoR4PLZLr/video.mp4",
                "download": "https://storage.qmery.com/dl/3023/qp_119165955504/beaYOukzIyibaQBEuzhr7zY07hZzcnSrvgAV83MnugcuFI7G5L03wTqmoR4PLZLr/video.mp4"
            }
        ],
        "video_qualities": [
            {
                "hash_id": "gVAyp3Z0Lo",
                "name": "640x426",
                "width": "640",
                "height": "426",
                "is_default": true,
                "links": [
                    {
                        "format": "mp4",
                        "quality": "640x426",
                        "link": "https://storage.qmery.com/pl/qp_119165955504/opnLW5m1PQudsqTHg-IF-k2rCVCIyD8V2DQWxqTb0Zz3IISORPGF7DaNJRdbJhGo/video.mp4",
                        "download": "https://storage.qmery.com/dl/3023/qp_119165955504/opnLW5m1PQudsqTHg-IF-k2rCVCIyD8V2DQWxqTb0Zz3IISORPGF7DaNJRdbJhGo/video.mp4"
                    }
                ]
            },
            {
                "hash_id": "zqAlwq0nLm",
                "name": "400x266",
                "width": "400",
                "height": "266",
                "is_default": false,
                "links": [
                    {
                        "format": "mp4",
                        "quality": "400x266",
                        "link": "https://storage.qmery.com/pl/qp_119165955504/HrQ5D6MbQDsWr4f18N26E8mIzUhxixQc4QW6GEPXidjk2xRde792OboTMcs4rz0p/video.mp4",
                        "download": "https://storage.qmery.com/dl/3023/qp_119165955504/HrQ5D6MbQDsWr4f18N26E8mIzUhxixQc4QW6GEPXidjk2xRde792OboTMcs4rz0p/video.mp4"
                    }
                ]
            },
            {
                "hash_id": "pGve37QNAM",
                "name": "256x170",
                "width": "256",
                "height": "170",
                "is_default": false,
                "links": [
                    {
                        "format": "mp4",
                        "quality": "256x170",
                        "link": "https://storage.qmery.com/pl/qp_119165955504/beaYOukzIyibaQBEuzhr7zY07hZzcnSrvgAV83MnugcuFI7G5L03wTqmoR4PLZLr/video.mp4",
                        "download": "https://storage.qmery.com/dl/3023/qp_119165955504/beaYOukzIyibaQBEuzhr7zY07hZzcnSrvgAV83MnugcuFI7G5L03wTqmoR4PLZLr/video.mp4"
                    }
                ]
            }
        ],
        "video_quality": [
            {
                "name": "640x426",
                "width": 640,
                "height": 426
            },
            {
                "name": "400x266",
                "width": 400,
                "height": 266
            },
            {
                "name": "256x170",
                "width": 256,
                "height": 170
            }
        ],
        "thumbnails": [
            {
                "file": "https://storage.qmery.com/pl/qp_119165955504/vWTeTRBkoltWjUpc5IuyXZP_BLv_4euFYpl0JZxTUFd4vrt3EsVSOs63WxUxoZv6khVrZ38XPCvVPXDwnbYsIi1wwgxwGKciKJb0TvTFtDM/image.jpg",
                "is_default": false,
                "index": 0
            },
            {
                "file": "https://storage.qmery.com/pl/qp_119165955504/Q0xt6tBxA9Wy8q6tnFS2dkt9B3QhSf8EdXwdNL3qS4VB-Mj5D1zyZ0eKAHVGBBcEO3DINQ1fgHrfoS5r78GeFJLPnjU09zLCK90CzKUB2GI/image.jpg",
                "is_default": false,
                "index": 1
            },
            {
                "file": "https://storage.qmery.com/pl/qp_119165955504/Jnqzxy7ixvmXByNgLHct6tRqxlMoJ94mls62hTJkVCkxSk7Tx6LLJno8AFwdmGBcY17hQNuI67oixhEFj8iB4tN-mBSZqpfjLAcEb3xAMvY/image.jpg",
                "is_default": false,
                "index": 2
            },
            {
                "file": "https://storage.qmery.com/pl/qp_119165955504/avkUxBzFgUlwClyGXrMg_XzAXoTHNXm97UAlzNVYrDLoB-ERoSlnETVsvTbwOjiKgP--GFf9C_O06N3SMh8dyDyl7LLepOc38xZPIe3GQAI/image.jpg",
                "is_default": false,
                "index": 3
            },
            {
                "file": "https://storage.qmery.com/pl/qp_119165955504/VfeGSWEhVskDHMqUTUZzDdSpd0e8IBkQZuPOuUiWnlX6SPbe34kz051rM6T3Hyi58xZCdnerIGrHNylQ5gTItGfHzoSMWl_pvV2V_rYCW4Q/image.jpg",
                "is_default": false,
                "index": 4
            }
        ],
        "thumbnail": [
            "https://storage.qmery.com/pl/qp_119165955504/vWTeTRBkoltWjUpc5IuyXZP_BLv_4euFYpl0JZxTUFd4vrt3EsVSOs63WxUxoZv6khVrZ38XPCvVPXDwnbYsIi1wwgxwGKciKJb0TvTFtDM/image.jpg",
            "https://storage.qmery.com/pl/qp_119165955504/Q0xt6tBxA9Wy8q6tnFS2dkt9B3QhSf8EdXwdNL3qS4VB-Mj5D1zyZ0eKAHVGBBcEO3DINQ1fgHrfoS5r78GeFJLPnjU09zLCK90CzKUB2GI/image.jpg",
            "https://storage.qmery.com/pl/qp_119165955504/Jnqzxy7ixvmXByNgLHct6tRqxlMoJ94mls62hTJkVCkxSk7Tx6LLJno8AFwdmGBcY17hQNuI67oixhEFj8iB4tN-mBSZqpfjLAcEb3xAMvY/image.jpg",
            "https://storage.qmery.com/pl/qp_119165955504/avkUxBzFgUlwClyGXrMg_XzAXoTHNXm97UAlzNVYrDLoB-ERoSlnETVsvTbwOjiKgP--GFf9C_O06N3SMh8dyDyl7LLepOc38xZPIe3GQAI/image.jpg",
            "https://storage.qmery.com/pl/qp_119165955504/VfeGSWEhVskDHMqUTUZzDdSpd0e8IBkQZuPOuUiWnlX6SPbe34kz051rM6T3Hyi58xZCdnerIGrHNylQ5gTItGfHzoSMWl_pvV2V_rYCW4Q/image.jpg"
        ],
        "video_logos": [],
        "text_overlays": []
    },
    {
        "id": 485167,
        "hash_id": "gVAyKxz1vo",
        "title": "کمدی های جدید حسن ریوندی [2017]",
        "description": null,
        "vast_tag": null,
        "number_of_views": 0,
        "duration": 1204.37,
        "length": 1204.37,
        "userId": null,
        "status": "ready",
        "ready": true,
        "auto_start": false,
        "autostart": false,
        "vr": false,
        "hls": "https://storage.qmery.com/hls/qp_119165467312/fJjz-lozVTBOezoTX8ZJGTEjVVV8ATD9K88QEBbOi8vOhOgYmAccH2yv2hwEDvZntL48Hgcf8vlWhI2VG4IPXdQ9PXVRVrU_O4_c525p5w0/master.qm3u8",
        "is_hls": true,
        "category_hash_id": "wav3MkJroKkb8LOe",
        "group_id": 35422,
        "category_title": "کمدی",
        "size": 79235971,
        "creation_date": 1514281320000,
        "create_date": 1514281320000,
        "last_modification_date": 1514281722000,
        "modified_date": 1514281722000,
        "draft": false,
        "serve_from_user_domain": true,
        "temp_thumbnail": null,
        "viewed": 0,
        "played": 0,
        "uniquePlay": 0,
        "traffic": 0,
        "vastTag": null,
        "subtitles": [],
        "link": [
            {
                "format": "mp4",
                "quality": "640x426",
                "link": "https://storage.qmery.com/pl/qp_119165467312/uahXOm6sUAEjDkXyhQIp1aIDURMCqG3s69Rd22qHP_21ykBaowJMFAmrlEynPkFn/video.mp4",
                "download": "https://storage.qmery.com/dl/3023/qp_119165467312/uahXOm6sUAEjDkXyhQIp1aIDURMCqG3s69Rd22qHP_21ykBaowJMFAmrlEynPkFn/video.mp4"
            },
            {
                "format": "mp4",
                "quality": "400x266",
                "link": "https://storage.qmery.com/pl/qp_119165467312/ojEICHIofZ7IX1h_k_EOx0yj8gEEpCjp0DM4S7B5eu5B51cK_cC0wlTKehjLYZAI/video.mp4",
                "download": "https://storage.qmery.com/dl/3023/qp_119165467312/ojEICHIofZ7IX1h_k_EOx0yj8gEEpCjp0DM4S7B5eu5B51cK_cC0wlTKehjLYZAI/video.mp4"
            },
            {
                "format": "mp4",
                "quality": "256x170",
                "link": "https://storage.qmery.com/pl/qp_119165467312/bvGzHEEKHiG1e2WGRiNJQHWAbL_WUg-69hez9L8OJk65Qz2-oZIH1zhAEPM5vGP9/video.mp4",
                "download": "https://storage.qmery.com/dl/3023/qp_119165467312/bvGzHEEKHiG1e2WGRiNJQHWAbL_WUg-69hez9L8OJk65Qz2-oZIH1zhAEPM5vGP9/video.mp4"
            }
        ],
        "video_qualities": [
            {
                "hash_id": "bEvr5qwGXx",
                "name": "640x426",
                "width": "640",
                "height": "426",
                "is_default": true,
                "links": [
                    {
                        "format": "mp4",
                        "quality": "640x426",
                        "link": "https://storage.qmery.com/pl/qp_119165467312/uahXOm6sUAEjDkXyhQIp1aIDURMCqG3s69Rd22qHP_21ykBaowJMFAmrlEynPkFn/video.mp4",
                        "download": "https://storage.qmery.com/dl/3023/qp_119165467312/uahXOm6sUAEjDkXyhQIp1aIDURMCqG3s69Rd22qHP_21ykBaowJMFAmrlEynPkFn/video.mp4"
                    }
                ]
            },
            {
                "hash_id": "B9vmQqpBvg",
                "name": "400x266",
                "width": "400",
                "height": "266",
                "is_default": false,
                "links": [
                    {
                        "format": "mp4",
                        "quality": "400x266",
                        "link": "https://storage.qmery.com/pl/qp_119165467312/ojEICHIofZ7IX1h_k_EOx0yj8gEEpCjp0DM4S7B5eu5B51cK_cC0wlTKehjLYZAI/video.mp4",
                        "download": "https://storage.qmery.com/dl/3023/qp_119165467312/ojEICHIofZ7IX1h_k_EOx0yj8gEEpCjp0DM4S7B5eu5B51cK_cC0wlTKehjLYZAI/video.mp4"
                    }
                ]
            },
            {
                "hash_id": "dkAV3K81XE",
                "name": "256x170",
                "width": "256",
                "height": "170",
                "is_default": false,
                "links": [
                    {
                        "format": "mp4",
                        "quality": "256x170",
                        "link": "https://storage.qmery.com/pl/qp_119165467312/bvGzHEEKHiG1e2WGRiNJQHWAbL_WUg-69hez9L8OJk65Qz2-oZIH1zhAEPM5vGP9/video.mp4",
                        "download": "https://storage.qmery.com/dl/3023/qp_119165467312/bvGzHEEKHiG1e2WGRiNJQHWAbL_WUg-69hez9L8OJk65Qz2-oZIH1zhAEPM5vGP9/video.mp4"
                    }
                ]
            }
        ],
        "video_quality": [
            {
                "name": "640x426",
                "width": 640,
                "height": 426
            },
            {
                "name": "400x266",
                "width": 400,
                "height": 266
            },
            {
                "name": "256x170",
                "width": 256,
                "height": 170
            }
        ],
        "thumbnails": [
            {
                "file": "https://storage.qmery.com/pl/qp_119165467312/39ufNq2LtAq-XFIFpEu_IzJvcahYDSSuNrDqU3auCY4N4o0kUbPCYUYa-vrDbFxle_b_WwQh0lhQcw86pt5B8-QFbbhDWqJDzYFY-b51NHg/image.jpg",
                "is_default": false,
                "index": 0
            },
            {
                "file": "https://storage.qmery.com/pl/qp_119165467312/v_mjPAs4mUE2FhXpq6WKmaYcvgWd5KouqQDI6NR61B-u2qpeAN_zgoTCcc1xyPPI_ebhK2ERxrNkzOvOUtXUuoamXwrtDMoOGYOZhFKrXxQ/image.jpg",
                "is_default": false,
                "index": 1
            },
            {
                "file": "https://storage.qmery.com/pl/qp_119165467312/jfQ3H0vAKb-cnzfPSgonWwbVHAha5sX3RL0NeSZN4tMvjkgXVrtRtgEtUnJroqgjVcfkKYd774TGwy5usMl9DkIp2-gX6ZE59TXiHxGpXZc/image.jpg",
                "is_default": false,
                "index": 2
            },
            {
                "file": "https://storage.qmery.com/pl/qp_119165467312/fiM5nQIZV088_U7B_SfzKei2-9DmzUwrHQLRF7yt9gfA3_-RmLaT_56zv7G_WaCeqKeBESWJp6ZWSEY8ODBqvDKk78LrUxhEKR5V3iqV66Q/image.jpg",
                "is_default": false,
                "index": 3
            },
            {
                "file": "https://storage.qmery.com/pl/qp_119165467312/BwwTmT0X8odefdap-LVeHgxv7oQjOnxxrhl_2ir26ltJP5CYnZcw2OE-CN2hJ0EhKVl_FTCYs1l4u6sHOcQUStdeZ0Tf41k_F_oSgq9epww/image.jpg",
                "is_default": false,
                "index": 4
            }
        ],
        "thumbnail": [
            "https://storage.qmery.com/pl/qp_119165467312/39ufNq2LtAq-XFIFpEu_IzJvcahYDSSuNrDqU3auCY4N4o0kUbPCYUYa-vrDbFxle_b_WwQh0lhQcw86pt5B8-QFbbhDWqJDzYFY-b51NHg/image.jpg",
            "https://storage.qmery.com/pl/qp_119165467312/v_mjPAs4mUE2FhXpq6WKmaYcvgWd5KouqQDI6NR61B-u2qpeAN_zgoTCcc1xyPPI_ebhK2ERxrNkzOvOUtXUuoamXwrtDMoOGYOZhFKrXxQ/image.jpg",
            "https://storage.qmery.com/pl/qp_119165467312/jfQ3H0vAKb-cnzfPSgonWwbVHAha5sX3RL0NeSZN4tMvjkgXVrtRtgEtUnJroqgjVcfkKYd774TGwy5usMl9DkIp2-gX6ZE59TXiHxGpXZc/image.jpg",
            "https://storage.qmery.com/pl/qp_119165467312/fiM5nQIZV088_U7B_SfzKei2-9DmzUwrHQLRF7yt9gfA3_-RmLaT_56zv7G_WaCeqKeBESWJp6ZWSEY8ODBqvDKk78LrUxhEKR5V3iqV66Q/image.jpg",
            "https://storage.qmery.com/pl/qp_119165467312/BwwTmT0X8odefdap-LVeHgxv7oQjOnxxrhl_2ir26ltJP5CYnZcw2OE-CN2hJ0EhKVl_FTCYs1l4u6sHOcQUStdeZ0Tf41k_F_oSgq9epww/image.jpg"
        ],
        "video_logos": [],
        "text_overlays": []
    }
]

Error list

Code Response Cause
401 Token is invalid or expired or Token does not have permission -
500 Internal server error we have some difficulties with the service , try back again later or contact the support team

View a certain video

Request:

GET https://api.qmery.com/ovp/videos/[video_hash_id].json?api_token=xxxxxxxxxx

Response:

a 200 OK code and such following JSON: (same as above but added a progress index which indicates the progress of encoding process between 0 and 100.)

{
    "id": 485168,
    "hash_id": "zqAla8EQXm",
    "title": "سگهای پلیسی",
    "description": null,
    "vast_tag": null,
    "number_of_views": 1,
    "duration": 45.512,
    "length": 45.512,
    "userId": null,
    "status": "ready",
    "ready": true,
    "auto_start": false,
    "autostart": false,
    "vr": false,
    "hls": "https://storage.qmery.com/hls/qp_119165955504/e98H1isRTURitIrHUIK4iBSOks73bpOzSoofwexgpKeLYEVnfU_iV_B4m-lZKeIU98F-VLj1G8m4jOLKrFBRzBABXTnpWivnS3Yo5rLaR0E/master.qm3u8",
    "is_hls": true,
    "category_hash_id": "OBRVopMBGeWL3Pa5",
    "category_title": "جنایی",
    "size": 4420795,
    "creation_date": 1514281388000,
    "create_date": 1514281388000,
    "last_modification_date": 1514296479000,
    "modified_date": 1514296479000,
    "draft": false,
    "serve_from_user_domain": true,
    "temp_thumbnail": null,
    "progress": 100,
    "group_id": 35421,
    "viewed": 1,
    "played": 0,
    "uniquePlay": 0,
    "traffic": 0,
    "vastTag": null,
    "subtitles": [],
    "link": [
        {
            "format": "mp4",
            "quality": "640x426",
            "link": "https://storage.qmery.com/pl/qp_119165955504/opnLW5m1PQudsqTHg-IF-k2rCVCIyD8V2DQWxqTb0Zz3IISORPGF7DaNJRdbJhGo/video.mp4",
            "download": "https://storage.qmery.com/dl/3023/qp_119165955504/opnLW5m1PQudsqTHg-IF-k2rCVCIyD8V2DQWxqTb0Zz3IISORPGF7DaNJRdbJhGo/video.mp4"
        },
        {
            "format": "mp4",
            "quality": "400x266",
            "link": "https://storage.qmery.com/pl/qp_119165955504/HrQ5D6MbQDsWr4f18N26E8mIzUhxixQc4QW6GEPXidjk2xRde792OboTMcs4rz0p/video.mp4",
            "download": "https://storage.qmery.com/dl/3023/qp_119165955504/HrQ5D6MbQDsWr4f18N26E8mIzUhxixQc4QW6GEPXidjk2xRde792OboTMcs4rz0p/video.mp4"
        },
        {
            "format": "mp4",
            "quality": "256x170",
            "link": "https://storage.qmery.com/pl/qp_119165955504/beaYOukzIyibaQBEuzhr7zY07hZzcnSrvgAV83MnugcuFI7G5L03wTqmoR4PLZLr/video.mp4",
            "download": "https://storage.qmery.com/dl/3023/qp_119165955504/beaYOukzIyibaQBEuzhr7zY07hZzcnSrvgAV83MnugcuFI7G5L03wTqmoR4PLZLr/video.mp4"
        }
    ],
    "video_qualities": [
        {
            "hash_id": "gVAyp3Z0Lo",
            "name": "640x426",
            "width": "640",
            "height": "426",
            "is_default": true,
            "links": [
                {
                    "format": "mp4",
                    "quality": "640x426",
                    "link": "https://storage.qmery.com/pl/qp_119165955504/opnLW5m1PQudsqTHg-IF-k2rCVCIyD8V2DQWxqTb0Zz3IISORPGF7DaNJRdbJhGo/video.mp4",
                    "download": "https://storage.qmery.com/dl/3023/qp_119165955504/opnLW5m1PQudsqTHg-IF-k2rCVCIyD8V2DQWxqTb0Zz3IISORPGF7DaNJRdbJhGo/video.mp4"
                }
            ]
        },
        {
            "hash_id": "zqAlwq0nLm",
            "name": "400x266",
            "width": "400",
            "height": "266",
            "is_default": false,
            "links": [
                {
                    "format": "mp4",
                    "quality": "400x266",
                    "link": "https://storage.qmery.com/pl/qp_119165955504/HrQ5D6MbQDsWr4f18N26E8mIzUhxixQc4QW6GEPXidjk2xRde792OboTMcs4rz0p/video.mp4",
                    "download": "https://storage.qmery.com/dl/3023/qp_119165955504/HrQ5D6MbQDsWr4f18N26E8mIzUhxixQc4QW6GEPXidjk2xRde792OboTMcs4rz0p/video.mp4"
                }
            ]
        },
        {
            "hash_id": "pGve37QNAM",
            "name": "256x170",
            "width": "256",
            "height": "170",
            "is_default": false,
            "links": [
                {
                    "format": "mp4",
                    "quality": "256x170",
                    "link": "https://storage.qmery.com/pl/qp_119165955504/beaYOukzIyibaQBEuzhr7zY07hZzcnSrvgAV83MnugcuFI7G5L03wTqmoR4PLZLr/video.mp4",
                    "download": "https://storage.qmery.com/dl/3023/qp_119165955504/beaYOukzIyibaQBEuzhr7zY07hZzcnSrvgAV83MnugcuFI7G5L03wTqmoR4PLZLr/video.mp4"
                }
            ]
        }
    ],
    "video_quality": [
        {
            "name": "640x426",
            "width": 640,
            "height": 426
        },
        {
            "name": "400x266",
            "width": 400,
            "height": 266
        },
        {
            "name": "256x170",
            "width": 256,
            "height": 170
        }
    ],
    "thumbnails": [
        {
            "file": "https://storage.qmery.com/pl/qp_119165955504/vWTeTRBkoltWjUpc5IuyXZP_BLv_4euFYpl0JZxTUFd4vrt3EsVSOs63WxUxoZv6khVrZ38XPCvVPXDwnbYsIi1wwgxwGKciKJb0TvTFtDM/image.jpg",
            "is_default": false,
            "index": 0
        },
        {
            "file": "https://storage.qmery.com/pl/qp_119165955504/Q0xt6tBxA9Wy8q6tnFS2dkt9B3QhSf8EdXwdNL3qS4VB-Mj5D1zyZ0eKAHVGBBcEO3DINQ1fgHrfoS5r78GeFJLPnjU09zLCK90CzKUB2GI/image.jpg",
            "is_default": false,
            "index": 1
        },
        {
            "file": "https://storage.qmery.com/pl/qp_119165955504/Jnqzxy7ixvmXByNgLHct6tRqxlMoJ94mls62hTJkVCkxSk7Tx6LLJno8AFwdmGBcY17hQNuI67oixhEFj8iB4tN-mBSZqpfjLAcEb3xAMvY/image.jpg",
            "is_default": false,
            "index": 2
        },
        {
            "file": "https://storage.qmery.com/pl/qp_119165955504/avkUxBzFgUlwClyGXrMg_XzAXoTHNXm97UAlzNVYrDLoB-ERoSlnETVsvTbwOjiKgP--GFf9C_O06N3SMh8dyDyl7LLepOc38xZPIe3GQAI/image.jpg",
            "is_default": false,
            "index": 3
        },
        {
            "file": "https://storage.qmery.com/pl/qp_119165955504/VfeGSWEhVskDHMqUTUZzDdSpd0e8IBkQZuPOuUiWnlX6SPbe34kz051rM6T3Hyi58xZCdnerIGrHNylQ5gTItGfHzoSMWl_pvV2V_rYCW4Q/image.jpg",
            "is_default": false,
            "index": 4
        }
    ],
    "thumbnail": [
        "https://storage.qmery.com/pl/qp_119165955504/vWTeTRBkoltWjUpc5IuyXZP_BLv_4euFYpl0JZxTUFd4vrt3EsVSOs63WxUxoZv6khVrZ38XPCvVPXDwnbYsIi1wwgxwGKciKJb0TvTFtDM/image.jpg",
        "https://storage.qmery.com/pl/qp_119165955504/Q0xt6tBxA9Wy8q6tnFS2dkt9B3QhSf8EdXwdNL3qS4VB-Mj5D1zyZ0eKAHVGBBcEO3DINQ1fgHrfoS5r78GeFJLPnjU09zLCK90CzKUB2GI/image.jpg",
        "https://storage.qmery.com/pl/qp_119165955504/Jnqzxy7ixvmXByNgLHct6tRqxlMoJ94mls62hTJkVCkxSk7Tx6LLJno8AFwdmGBcY17hQNuI67oixhEFj8iB4tN-mBSZqpfjLAcEb3xAMvY/image.jpg",
        "https://storage.qmery.com/pl/qp_119165955504/avkUxBzFgUlwClyGXrMg_XzAXoTHNXm97UAlzNVYrDLoB-ERoSlnETVsvTbwOjiKgP--GFf9C_O06N3SMh8dyDyl7LLepOc38xZPIe3GQAI/image.jpg",
        "https://storage.qmery.com/pl/qp_119165955504/VfeGSWEhVskDHMqUTUZzDdSpd0e8IBkQZuPOuUiWnlX6SPbe34kz051rM6T3Hyi58xZCdnerIGrHNylQ5gTItGfHzoSMWl_pvV2V_rYCW4Q/image.jpg"
    ],
    "video_logos": [],
    "text_overlays": []
}

Error list

Code Response Cause
401 Token is invalid or expired -
403 video_hash_id is invalid -
401 Token does not have permission -
404 There is no video with hash id equal to video_hash_id -
403 User does not own the video -
500 Internal server error we have some difficulties with the service , try back again later or contact the support team

Update a video

Request:

PUT https://api.qmery.com/ovp/videos/[video_hash_id].json?api_token=xxxxxxxxxx

Parameter Description
title Title of the video
description Description of the video
auto_start If sent will set to play video automatically
autostart If sent will set to play video automatically
hls If sent the video will be served in adaptive format
vr If sent the video will be served with virtual reality
user_id User id for developer options
serve_from_user_domain if sent the video will be servable from user domain
vasttag Link of the advertisement video to be played before the video
player An array containing the fields you want to display in social bar.['twitter' ,'whatsapp', 'gplus', 'linkedin', 'tumblr', 'playcount', 'download', 'email', 'facebook', 'description', 'viber', 'telegram'] are the available variables
player[] Fields you want to display in social bar.['twitter' ,'whatsapp', 'gplus', 'linkedin', 'tumblr', 'playcount', 'download', 'email', 'facebook', 'description', 'viber', 'telegram'] are the available variables
logo_settings A JSON including url(s), position(s) & size(s) of video's logo(s) (if default_setting is not sent)
logo_percent If sent numbers in position(s) & size(s) (in logo_settings) are considered as percentages
text_percent If sent numbers in position(s) (in text_overlays) are considered as percentages
text_overlays A JSON including value(s), size(s), position(s) & color(s) of video's overlay(s) (if default_setting is not sent)
default_setting Hash id of a userDefaultSetting object

Response:

if the video has been updated the API will response with a 200 OK status code and the location to the updated video in Location HTTP header and a Video updated response text.

Error list

Code Response Cause
401 Token is invalid or expired -
403 video_hash_id is invalid -
403 Invalid function inputs Title & description & vast tag
401 Token does not have permission -
403 Invalid function inputs Overlays & logos
404 There is no video with hash id equal to video_hash_id -
403 User does not own the video -
500 Internal server error we have some difficulties with the service , try back again later or contact the support team

Delete a video

Request:

DELETE https://api.qmery.com/ovp/videos/[videoHashId].json?api_token=xxxxxxxxxx

Response:

if the video has been deleted the API will response with a 200 OK status code and the video details as described in Viewing a video. Will return a 404 Not Found status code with Video was not found message if the video is not found and/or does not belong to this user

Error list

Code Response Cause
401 Token is invalid or expired -
404 video_hash_id is invalid -
401 Token does not have permission -
404 There is no video with hash id equal to video_hash_id -
404 User does not own the video -
500 Internal server error we have some difficulties with the service , try back again later or contact the support team

Probe a video

use to get useful information of a video

Request:

POST https://api.qmery.com/ovp/videos/probe.json?api_token=xxxxxxxxxx

Parameter Description Requirement
video_url URL of the video Required

Response

a 200 OK code and such following JSON: (a JSON containing all the information on the video. You can find out the possibility of encoding from status index.)

{
  "streams": [
      {
          "index": 0,
          "codec_name": "h264",
          "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
          "profile": "High",
          "codec_type": "video",
          "width": 1280,
          "height": 720,
          "duration": "45.445400",
          "nb_frames": "1362",
          "disposition": {
              "default": 1
          },
          "tags": {
              "creation_time": ""
          }
      },
      {
          "index": 1,
          "codec_name": "aac",
          "codec_long_name": "AAC (Advanced Audio Coding)",
          "profile": "LC",
          "codec_type": "audio",
          "width": 0,
          "height": 0,
          "duration": "45.354667",
          "nb_frames": "2126",
          "disposition": {
              "default": 1
          },
          "tags": {
              "creation_time": ""
          }
      },
      {
          "index": 2,
          "codec_name": "mov_text",
          "codec_long_name": "3GPP Timed Text subtitle",
          "profile": "",
          "codec_type": "subtitle",
          "width": 1280,
          "height": 720,
          "duration": "45.446000",
          "nb_frames": "13",
          "disposition": {
              "default": 1
          },
          "tags": {
              "creation_time": ""
          }
      }
  ],
  "format": {
      "filename": "https://mydomain.ltd/SampleVideo.mp4",
      "duration": "45.446000",
      "size": "10181336",
      "bit_rate": "1792252",
      "probe_score": 100,
      "tags": []
  }
}

Stats of a video

returns statistics of a video

Request:

GET https://api.qmery.com/ovp/videos/[videoHashId]/stats.json?api_token=xxxxxxxxxx

Response:

{

}

Upload a video

it's only available with api_token. must submit a form to https://api.qmery.com/ovp/videos.json?api_token=xxxxxxxxxxx with POST method and multipart/form-data enctype

Request:

Parameter Type Description Requirement
video file Uploaded file of video Required if url is empty
title text title of video (Defaults to No title) Optional
group_id text category id to upload Required
user_id text User id to store in DB for developer usage Optional
autostart bool if sent will set to play video automatically Optional
hls bool if sent the video will be served in adaptive format Optional
url text URL of video Optional
callback_url text Post a response to your callback_url when video encode is done Optional
output_resolutions text An array of resolutions to convert video to. If it is not sent, video size will be found automatically Optional
Your logo setting text An array to create logos from Optional
logo_url text url of the image to put on the video Optional
logo_size text size of the logo in w:h format Required is logo_url is not empty.Defaults to 10:10
logo_position text Offset from top and left of video to put logo if the x:y format Required is logo_url is not empty.Defaults to 10:10
Image overlays An array to create image overlays from Optional
url text URL of the picture (currently PNG and JPG are supported)
size text Size of the image in w:h format
position text Position of the image in x:y format
Text overlays An array to create image overlays from with the format of bottom [{value:"Lorem Ipsum", size:18, position:"20:20",color:"#000000"}, ...] Optional
value text Text to put on video
size int Size of the font (Defaults to 18)
position text Position of the text in x:y format
color text Color of text overlay in hexadecimal RGB type

Example of resolutions:

["640:480","244:128"]

Logo setting format:

[{url:"https://mydomain.ltd/image.png", size:"100:100", position:"20:20"}, ...]

Image overlay format:

[{url:"https://mydomain.ltd/image.png", size:"100:100", position:"20:20"}, ...]

Response:

Video details as described in Viewing a video with a 201 Created header


Subtitles

Subtitles are the SRT files which will be seen on the player softcoded and choosable by users the list of them is available in Video object mentioned earlier

Adding a subtitle

Adding a subtitle file to subtitle

Request:

POST https://api.qmery.com/ovp/videos/[videoHashId]/subtitle.json?api_token=xxxxxxxxxx

Parameter Type Description Requirement
file file Uploaded file of subtitle Required
name text title of subtitle to be shown as the name Required

Reponse: 201 Created header and the name of created subtitle

Deleting a subtitle

if you have subtitles with the same name it removes them all

Request:

DELETE https://api.qmery.com/ovp/videos/[videoHashId]/subtitle.json?api_token=xxxxxxxxxx

Parameter Type Description Requirement
name text title of subtitle to be shown as the name Required

Reponse: 200 OK header

Thumbnails

Adding a thumbmail

Adding a thumbnail file to video

Request:

POST https://api.qmery.com/ovp/videos/[videoHashId]/thumbnail.json?api_token=xxxxxxxxxx

Parameter Type Description Requirement
file file Uploaded file of thumbnail Required
default int set the uploaded thumbnail to the video`s default thumbnail Optional

Reponse: 201 Created header and the index of created thumbnail

Deleting a thumbnail

Request:

DELETE https://api.qmery.com/ovp/videos/[videoHashId]/thumbnail.json?api_token=xxxxxxxxxx

Parameter Type Description Requirement
index int or array index or array of indexes to be deleted Required

Reponse: 200 OK header and the new list of thumbnails array

Set a thumbnail

Request:

PUT https://api.qmery.com/ovp/videos/[videoHashId]/thumbnail.json?api_token=xxxxxxxxxx

Parameter Type Description Requirement
index int index of thumbnail to be set to default Required

Reponse: 200 OK header

Playlists

Playlists are objects which contain videos and will be played in a player

Methods

  • List playlists
  • View a certain playlist
  • Update a playlist
  • Delete a playlist
  • Add a playslist

List playlists

Request:

GET https://api.qmery.com/ovp/playlists.json?api_token=xxxxxxxxxx

Response:

[
    {
        "id": 646,
        "title": "Some title",
        "hash_id": "2M8A7OkveoWev4Zg",
        "description": "",
        "video_count": 9,
        "create_date": 1428382771,
        "last_modified": 1428382771
    },
    {
        "id": 611,
        "title": "Another title",
        "hash_id": "od2z7BpKYok3gxvN",
        "description": "",
        "video_count": 0,
        "create_date": 1425973490,
        "last_modified": 1425973490
    },
]

View a playlist

Request:

GET https://api.qmery.com/ovp/playlists/[playlistHashId].json?api_token=xxxxxxxxxx

Response:

{
    "id": 494,
    "title": "jigsaw9017",
    "hash_id": "z9MeyJqwPZp4QXmx",
    "description": "1234",
    "video_count": 4,
    "create_date": 1422088165,
    "last_modified": 1422088165,
    "videos": [
        {
            "id": 2071,
            "title": "",
            "description": "",
            "vastTag" : "",
            "viewed": 0,
            "length": 85,
            "userId": 123,
            "status": "not ready",
            "group_id": 494,
            "subtitles": [
            {
                "title": "\u0628\u062f\u0648\u0646 \u0646\u0627\u0645",
                "file": "https://storage.qmery.com/repository/9/55fd4f9ae7539.srt"
            },
            {
                "title": "\u0628\u062f\u0648\u0646 \u0646\u0627\u0645",
                "file": "https://storage.qmery.com/repository/9/55fd4fbc9b4a9.srt"
            }
        ],
            "video_quality": [
                {
                    "name": "256x144",
                    "width": 256,
                    "height": 144
                }
            ],
            "link": [],
            "thumbnail": [],
            "create_date": 1422090431,
            "modified_date": 1422090431
        },
        {
            "id": 2074,
            "title": "",
            "description": "",
            "viewed": 0,
            "length": 85,
            "userId": 123,
            "status": "not ready",
            "group_id": 494,
            "video_quality": [
                {
                    "name": "256x144",
                    "width": 256,
                    "height": 144
                }
            ],
            "link": [],
            "thumbnail": [],
            "create_date": 1422090877,
            "modified_date": 1422090877
        }
    ]
}

Updating a playlist

Request:

PUT https://api.qmery.com/ovp/playlists/[playlistHashId].json?api_token=xxxxxxxxxx

Parameter Description
title Title of the playlist
description Description of the playlist
videos an array of video Ids.['82673' ,'123',...] are the available variables

Response:

if the playlist has been updated the API will response with a 200 OK status code and the location to the updated playlist in Location HTTP header and a playlist updated response text. the video ids that do not belong to you will not be added to the playlist

Deleting a Playlist

Request:

DELETE https://api.qmery.com/ovp/playlists/[playlistHashId].json?api_token=xxxxxxxxxx

Response:

if the playlist has been deleted the API will response with a 200 OK status code and the playlist details as described in Viewing a playlist. Will return a 404 Not Found status code with playlist was not found message if the playlist is not found and/or does not belong to this user

Add a playlist

Request:

POST https://api.qmery.com/ovp/playlists.json?api_token=xxxxxxxxxx

Parameter Description
title Title of the playlist
description Description of the playlist
videos an array of video Ids.['82673' ,'123',...] are the available variables

Response: a 201 Created code with the body of created playlist the video ids that do not belong to you will not be added to the playlist