Retrieves a list of drafts of video clips.
Request
Request syntax:
GET /clipping_draft
Response
The response for a successful request contains the following properties:
Name | Data Type | Description |
---|---|---|
total_items | Integer | Indicates the number of drafts that were included in the response. |
items | List of objects | Describes each draft of a video clip. |
@id | String | Indicates the relative path to this endpoint. |
@type | String | Returns Collection. |
items List
The items list describes each draft via the following properties:
Name | Data Type | Description |
---|---|---|
@id | String | Indicates the relative path to an endpoint that returns this draft. |
@type | String | Returns ClippingDraft. |
beam | String | Identifies the system-defined ID for the asset from which the draft was created. |
created | String | Indicates the date and time (UTC) at which the draft was created. Syntax: YYYY-MM-DDThh:mm:ss.ssssssZ Example: 2023-01-08T20:31:11.510000Z |
frame_start_time | Float | Indicates the number of seconds into the asset at which the draft will stop. |
frame_stop_time | Float | Indicates the number of seconds into the asset at which the draft will start. |
id | String | Identifies a draft by its system-defined ID. |
title | String | Indicates the description assigned to the draft of the clip. |
meta | Dictionary | Identifies zero or more key-value pairs that will override a profile's metadata configuration for the current draft. Syntax: {"Key 1Represents a metadata key. This key will be ignored unless it exists in the current profile.":"Value 1Represents the metadata value that will be assigned to a key.", "Key 2Represents a metadata key. This key will be ignored unless it exists in the current profile.":"Value 2Represents the metadata value that will be assigned to a key.", "Key _n_Represents a metadata key. This key will be ignored unless it exists in the current profile.":"Value _n_Represents the metadata value that will be assigned to a key."} Example: {"Title": "Slam Dunk Compilation", "Sport": "Basketball"} |
profile | String | Indicates the profile assigned to the draft of the video clip. You may choose a different profile when using the Clipping tool to generate a clip from this draft. |
Sample Request/Response
Call the get_all_draft_clips module (Python 3) to retrieve a list of draft clips. This module imports names from the api_auth module.
import json
import requests
from api_auth import APICredentials, APIParams
class GetAllDraftClips:
def __init__(self):
self.host = "https://services.uplynk.com"
def run(self):
"""
Get all drafts of video clips.
"""
self._get_all_drafts()
def _get_all_drafts(self):
url = "{}{}".format(self.host, "/api/v4/clipping_draft")
response = requests.get(
url, params=APIParams(APICredentials()).get_params({})
)
print(response.json())
GetAllDraftClips().run()
Response:
{
"total_items": 2,
"items": [{
"beam": "ab4cdd9b405c41c984adc6d0bea55bcd",
"created": "2019-12-27T23:20:44.436000Z",
"title": "My First Draft",
"@type": "ClippingDraft",
"frame_stop_time": 29.123,
"frame_start_time": 24.978,
"@id": "/api/v4/clipping_draft/25c8de658a2e4149aa772de8c7d8b8ge",
"id": "25c8de658a2e4149aa772de8c7d8b8ge"
}, {
"beam": "ab4cdd9b405c41c984adc6d0bea55bcd",
"created": "2019-12-27T22:58:52.723000Z",
"title": "My Second Draft",
"@type": "ClippingDraft",
"frame_stop_time": 65.978,
"frame_start_time": 54.978,
"@id": "/api/v4/clipping_draft/1237d408b1b944d2bb5fd0c33d43ac7e",
"id": "1237d408b1b944d2bb5fd0c33d43ac7e"
}
],
"@id": "/api/v4/clipping_draft",
"@type": "Collection"
}