Retrieves up to 1,000 of the latest video clips generated from draft clips. You may filter the response to only include the clip created from a specific draft clip.
Request
Request syntax (all clips):
GET /clip/draft_info
Request syntax (filtered by draft clip):
GET /clip/draft_info?draft_id=Draft Clip ID
Use the Get All Draft Clips endpoint to retrieve a list of draft clips and their system-defined IDs.
Response
The response for a successful request contains the following properties:
| Name | Data Type | Description |
|---|---|---|
| @id | String | Indicates the relative path to this endpoint. |
| @type | String | Returns Collection. |
| items | List of objects | Describes each video clip. |
| total_items | Integer | Indicates the number of video clips that were included in the response. |
items List
The items list describes each video clip via the following properties:
| Name | Data Type | Description |
|---|---|---|
| @id | String | Indicates the relative path to an endpoint that returns a video clip. |
| @type | String | Returns Clip. |
| asset | String | Indicates the system-defined ID for the asset created from a draft clip. Returns an empty string value when the system has not finished asset creation. |
| draft_id | String | Indicates the system-defined ID for the draft clip from which the asset was created. |
| id | String | Identifies a clip by its system-defined ID. |
| is_complete | Boolean | Indicates whether the system has finished creating the asset. Valid values are: true: Completed false: In Progress |
Sample Request/Response
The code below (Python 3) shows how to retrieve a list of clips.
This code imports names from the api_auth module for V4 APIs (see below).
🦉
API Auth for Classic Authentication (V4 APIs)
Open Recipe
import json
import requests
from api_auth import APICredentials, APIParams
class GetMultipleClips:
def __init__(self):
self.host = "https://services.uplynk.com"
def run(self):
"""
Get multiple video clips.
"""
self._get_multiple_clips()
def _get_multiple_clips(self):
url = "{}{}".format(self.host, "/api/v4/clip/draft_info")
response = requests.get(
url, params=APIParams(APICredentials()).get_params({})
)
print(response.json())
GetMultipleClips().run()
Response:
{
"@id": "/clip/draft_info",
"@type": "Collection",
"items": [{
"@id": "/clip/draft_info/e1fc7c4987ce4b6f96dc561993479666",
"@type": "Clip",
"asset": "",
"draft_id": "3b5cd277915c4c0cb0aea542ce42b5f2",
"is_complete": False,
"id": "e1fc7c4987ce4b6f96dc561993479666"
}
],
"total_items": 1
}