Get Clip

Retrieves a specific video clip generated from a draft clip.

Request

Request syntax:

GET /clip/draft_info/Clip ID

Use the Get Multiple Clips endpoint to retrieve a list of clips and their system-defined IDs.

Response

The response for a successful request contains the following properties:

NameData TypeDescription
@idStringIndicates the relative path to an endpoint that returns a video clip.
@typeStringReturns Clip.
assetStringIndicates 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_idStringIndicates the system-defined ID for the draft clip from which the asset was created.
idStringIdentifies a clip by its system-defined ID.
is_completeBooleanIndicates whether the system has finished creating the asset. Valid values are: true: Completed false: In Progress

Sample Request/Response

Call the get_clip module (Python 3) to retrieve a specific clip. This module imports names from the api_auth module.

import json
import requests
from api_auth import APICredentials, APIParams

class GetClip:
    def __init__(self):
        self.host = "https://services.uplynk.com"

    def run(self):
        """
        Get a video clip.
        """
        self._get_clip()

    def _get_clip(self):
        clip_id = 'e8d6b5cb940c40cc9ec6ad081a38f3f0' # Replace with the desired clip ID.
        url = "{}{}{}".format(self.host, "/api/v4/clip/draft_info/", clip_id)

        response = requests.get(
            url, params=APIParams(APICredentials()).get_params({})
        )

        print(response.json())

GetClip().run()

Response:

{
	'@id': '/clip/draft_info/e1fc7c4987ce4b6f96dc561993479666',
	'@type': 'Clip',
	'asset': '',
	'draft_id': '3b5cd277915c4c0cb0aea542ce42b5f2',
	'is_complete': False,
	'id': 'e1fc7c4987ce4b6f96dc561993479666'
}