### Internal Server Error Example (JSON) Source: https://docs.pandavideo.com/reference/get-custom-fields An example of an InternalServerError response, indicating an unexpected issue on the server. This response suggests a problem that needs to be addressed by the API provider. ```json { "error": "InternalServerError", "message": "An unexpected error occurred" } ``` -------------------------------- ### Review Link Creation Response Example (JSON) Source: https://docs.pandavideo.com/reference/createreviewlink Example JSON response upon successful creation of a review link. It contains the link's ID, associated video ID, name, status, expiration, permissions, and URL. ```json { "id": "550e8400-e29b-41d4-a716-446655440000", "video_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "name": "Client Review v1", "status": "active", "expires_at": "2025-01-25T23:59:59.000Z", "allow_comment": true, "allow_status_edit": true, "show_resolved": true, "url": "https://review.pandavideo.com.br/550e8400-e29b-41d4-a716-446655440000", "created_at": "2025-01-15T10:00:00.000Z", "updated_at": "2025-01-15T10:00:00.000Z" } ``` -------------------------------- ### Embed Usage Example Source: https://docs.pandavideo.com/reference/query-params Example of how to embed the PandaVideo player using an iframe. ```APIDOC ## Embed Usage Example ### Description This example demonstrates how to embed the PandaVideo player into a webpage using an iframe element. Various player configurations can be passed as query parameters in the `src` attribute. ### Method GET (for iframe source) ### Endpoint `/embed/` ### Parameters (See Boolean and Number Query Parameters sections for available configuration options) ### Request Example ```html ``` ### Response This is an HTML embed code snippet. The iframe source URL configures the player's behavior. ``` -------------------------------- ### Not Found Error Example (JSON) Source: https://docs.pandavideo.com/reference/get-custom-fields An example of a NotFoundError response, indicating that the requested resource could not be found. This is commonly returned when a specific video ID does not exist in the system. ```json { "error": "NotFoundError", "message": "Video not found" } ``` -------------------------------- ### Retrieve Credit History via HTTP Request Source: https://docs.pandavideo.com/reference/get-credits-history An example of how to query the credit history endpoint using a standard GET request with start and end date parameters. ```http GET https://api-v2.pandavideo.com/credits?start_date=2024-03-01&end_date=2024-03-31 ``` -------------------------------- ### POST /assist-ai/buy_and_create Source: https://docs.pandavideo.com/reference/create-new-ia-tutor Creates a new AI assistant with specified video bindings and configuration for the authenticated user. ```APIDOC ## POST /assist-ai/buy_and_create ### Description Creates a new AI assistant with specified video bindings and configuration for the authenticated user. ### Method POST ### Endpoint /assist-ai/buy_and_create ### Parameters #### Header Parameters - **Authorization** (string) - Required - Panda API token (without Bearer prefix). ### Request Body #### Request Body Schema - **video_ids** (array of string) - Required - Array of video IDs to bind to the assistant. - **lang** (string) - Required - Language code for the assistant. - **name** (string) - Required - Name of the assistant. - **open_new_tab** (boolean) - Required - Whether chat opens in a new tab. - **question_suggestions** (boolean) - Optional - Enable question suggestions. - **initial_question** (string) - Required - Initial question shown in the chat. ### Request Example ```json { "video_ids": ["58e5d207-6b24-4596-ab17-98b8b6772ff2", "5aff90af-02ad-4fb3-abb3-7a97ab98a577"], "lang": "en", "name": "My Video Assistant", "open_new_tab": true, "question_suggestions": true, "initial_question": "How can I help you with this video?" } ``` ### Response #### Success Response (200) * **message** (string) - Confirmation message of assistant creation. * **assistant_id** (string) - The unique identifier of the newly created assistant. #### Response Example ```json { "message": "AI assistant created successfully.", "assistant_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef" } ``` ``` -------------------------------- ### Get DRM Bandwidth by Video (HTTP Request) Source: https://docs.pandavideo.com/reference/get-drm-bandwidth-by-video This example demonstrates how to make an HTTP GET request to the PandaVideo analytics API to retrieve DRM bandwidth consumption data for a specific video. It requires the video ID, start date, and end date as parameters. ```http GET https://api-v2.pandavideo.com/analytics//traffic?type=drm&start_date={startDate}&end_date={endDate}&video_id={videoId} ``` -------------------------------- ### Configure Player via URL Query Parameters Source: https://docs.pandavideo.com/reference/query-params Examples of how to apply Boolean and Number configuration parameters directly to the player URL. These parameters control features like autoplay, muted state, playback speed, and caption styling. ```text https://player.example.com/?v=12345&autoplay=true&muted=true&saveProgress=false&hideControls=true&restartAfterEnd=true ``` ```text https://player.example.com/?v=12345&captionsFontSize=24&defaultSpeed=1.5&alternativeProgress2xLimit=30&alternativeProgressVelocity=10&alternativeProgressHeight=8 ``` -------------------------------- ### Unauthorized Error Example (JSON) Source: https://docs.pandavideo.com/reference/get-custom-fields An example of an UnauthorizedError response, indicating that authentication is required. This typically occurs when a valid PandaAuth token is missing or invalid. ```json { "error": "UnauthorizedError", "message": "Authentication required. Please provide a valid PandaAuth token." } ``` -------------------------------- ### Upload File using cURL Source: https://docs.pandavideo.com/reference/upload-audio-directly-single-request This example shows how to upload a file using the cURL command-line tool. It includes the necessary URL, headers, and data payload for the file upload. The `--data-binary` flag is used to send the file content. ```curl curl --request POST 'https://uploader-us01.pandavideo.com.br/files' \ --header 'Tus-Resumable: 1.0.0' \ --header 'Upload-Length: 100' \ --header 'Content-Type: application/offset+octet-stream' \ --header 'Upload-Metadata: authorization cGFuZGEtYXBpX2tleQ==, video_id ZGQ2OGMzODAtYzU1MS00MjYzLTljMzEtNTY2OTUyZjUxNGZk, filename bm9tZV90ZXN0ZQ==, filetype YXVkaW8=, lang ZW4=' \ --data-binary '@file.mp3' ``` -------------------------------- ### POST /assist-ai/buy_and_create Source: https://docs.pandavideo.com/reference/create-new-ia-tutor Creates a new AI assistant with specified video bindings and configuration. This endpoint allows you to purchase credits and set up a new AI assistant linked to one or more videos. ```APIDOC ## POST /assist-ai/buy_and_create ### Description Creates a new AI assistant with specified video bindings and configuration. This endpoint allows you to purchase credits and set up a new AI assistant linked to one or more videos. ### Method POST ### Endpoint https://api-v2.pandavideo.com/assist-ai/buy_and_create ### Parameters #### Request Body - **video_ids** (array[string]) - Required - Array of video IDs to bind to the assistant. - **lang** (string) - Required - Language code for the assistant. - **name** (string) - Required - Name of the assistant. - **open_new_tab** (boolean) - Required - Whether to open chat in a new tab. - **initial_question** (string) - Required - Initial question to display in the chat. - **question_suggestions** (boolean) - Optional - Whether to enable question suggestions. ### Request Example ```json { "video_ids": ["video1", "video2"], "lang": "en", "name": "My Video Assistant", "open_new_tab": true, "initial_question": "How can I help you with this video?", "question_suggestions": true } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message. - **assistant** (object) - Details of the created assistant. - **id** (string) - Unique identifier for the assistant. - **name** (string) - Name of the assistant. - **lang** (string) - Language code of the assistant. - **open_new_tab** (boolean) - Indicates if the chat opens in a new tab. - **question_suggestions** (boolean) - Indicates if question suggestions are enabled. - **initial_question** (string) - The initial question displayed in the chat. - **status** (string) - Current status of the assistant (e.g., 'active'). #### Response Example ```json { "message": "Assistant AI created successfully", "assistant": { "id": "123e4567-e89b-12d3-a456-426614174000", "name": "My Video Assistant", "lang": "en", "open_new_tab": true, "question_suggestions": true, "initial_question": "How can I help you with this video?", "status": "active" } } ``` ``` -------------------------------- ### Upload File using Python (Requests) Source: https://docs.pandavideo.com/reference/upload-audio-directly-single-request This Python example demonstrates file upload using the `requests` library. It defines the URL, headers, and payload for the POST request. The response text is then printed to the console. ```python import requests url = "https://uploader-us01.pandavideo.com.br/files" payload="" headers = { 'Tus-Resumable': '1.0.0', 'Upload-Length': '100', 'Content-Type': 'application/offset+octet-stream', 'Upload-Metadata': 'authorization cGFuZGEtYXBpX2tleQ==, filename bm9tZV90ZXN0ZQ==' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text) ``` -------------------------------- ### Retrieve Bandwidth Consumption via HTTP Source: https://docs.pandavideo.com/reference/get-analytics-from-folder An example of how to perform a GET request to the analytics traffic endpoint. It requires a folder_id, start_date, and end_date as query parameters. ```http GET https://api-v2.pandavideo.com/analytics/traffic?folder_id=b5c5ef0c-0b3e-480b-8bb9-46092713df17&start_date=2023-11-16&end_date=2023-11-19 ``` -------------------------------- ### POST /assist-ai/purchase_overview Source: https://docs.pandavideo.com/reference/get-purchase-overview Calculates the cost and details for creating an assistant given a set of videos and language. ```APIDOC ## POST /assist-ai/purchase_overview ### Description Calculates the cost and details for creating an assistant given a set of videos and language. ### Method POST ### Endpoint /assist-ai/purchase_overview ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - **video_ids** (array of string) - Optional - Array of video IDs to calculate cost for. - **lang** (string) - Optional - Language code. ### Request Example { "video_ids": ["video1", "video2"], "lang": "en" } ### Response #### Success Response (200) - **cost** (number) - The calculated cost for the assistant creation. - **details** (object) - Detailed breakdown of the costs. #### Response Example { "cost": 10.50, "details": { "video_count": 2, "currency": "USD" } } ``` -------------------------------- ### POST /assist-ai/purchase_overview Source: https://docs.pandavideo.com/reference/get-purchase-overview Calculates the cost and details for creating an AI assistant with specified videos. ```APIDOC ## POST /assist-ai/purchase_overview ### Description Calculates the cost and details for creating an assistant with specified videos. ### Method POST ### Endpoint https://api-v2.pandavideo.com/assist-ai/purchase_overview ### Parameters #### Query Parameters None #### Request Body - **video_ids** (array[string]) - Required - Array of video IDs to calculate cost for. - **lang** (string) - Optional - Language code. ### Request Example ```json { "video_ids": [ "video1", "video2" ], "lang": "en" } ``` ### Response #### Success Response (200) - **total_cost** (number) - The total cost for the purchase. - **credit_cost** (integer) - The cost in credits. - **video_count** (integer) - The number of videos included. - **estimated_processing_time** (string) - An estimated processing time. - **videos** (array[object]) - Details about each video. - **id** (string) - The ID of the video. - **title** (string) - The title of the video. - **duration** (integer) - The duration of the video in seconds. - **cost** (number) - The cost associated with the video. #### Response Example ```json { "total_cost": 15.5, "credit_cost": 155, "video_count": 3, "estimated_processing_time": "5-10 minutes", "videos": [ { "id": "video123", "title": "Sample Video", "duration": 300, "cost": 5 } ] } ``` #### Error Responses - **400 Bad Request** - Invalid input parameters. - **401 Unauthorized** - Invalid or missing authentication. - **500 Internal Server Error** - An unexpected error occurred on the server. ``` -------------------------------- ### Error Response Examples Source: https://docs.pandavideo.com/reference/list-shorts Provides example JSON payloads for common API error codes. These examples illustrate the structure of error messages returned for bad requests and internal server errors. ```json {"errCode":"BadRequest","errMsg":"Unauthorized"} ``` ```json {"errCode":"InternalServerError","errMsg":"An error occurred"} ``` -------------------------------- ### POST /videos Source: https://docs.pandavideo.com/reference/upload-video-from-external-url Initiates a video upload process from an external URL. Returns a websocket URL for progress tracking. ```APIDOC ## POST https://import.pandavideo.com:9443/videos ### Description Initiates the upload of a video file from an external cloud-hosted URL to the PandaVideo platform. Returns a websocket URL to track the upload progress. ### Method POST ### Endpoint https://import.pandavideo.com:9443/videos ### Parameters #### Request Body - **folder_id** (string) - Optional - The ID of the folder where you want to upload the video. - **video_id** (string) - Optional - The ID of the video. - **title** (string) - Optional - The title of the video. - **description** (string) - Optional - The description of the video. - **url** (string) - Required - The URL of the video file (must be cloud-hosted). - **size** (string) - Optional - The file size of the video in bytes. ### Request Example { "url": "https://example.com/video.mp4", "title": "My Video", "folder_id": "folder_123" } ### Response #### Success Response (200) - **websocket_url** (string) - The URL to connect via websocket for progress tracking. #### Response Example { "websocket_url": "wss://import.pandavideo.com:9443/ws/upload/123" } ``` -------------------------------- ### Get Subtitle from Video (OpenAPI) Source: https://docs.pandavideo.com/reference/get-subtitle-from-video The OpenAPI definition for the Get Subtitle from Video endpoint. It specifies the API version, server URL, security schemes, and the structure of the request and response for retrieving subtitles. ```json { "openapi": "3.1.0", "info": { "title": "subtitles", "version": "2.0" }, "servers": [ { "url": "https://api-v2.pandavideo.com.br/subtitles" } ], "components": { "securitySchemes": { "sec0": { "type": "apiKey", "in": "header", "name": "Authorization" } } }, "security": [ { "sec0": [] } ], "paths": { "/{video_id}/{srclang}": { "get": { "summary": "Get subtitle from video", "description": "This page will help you get started with Subtitles.", "operationId": "get-subtitle-from-video", "parameters": [ { "name": "video_id", "in": "path", "schema": { "type": "string" }, "required": true }, { "name": "srclang", "in": "path", "schema": { "type": "string", "enum": [ "en", "pt-BR", "es" ] }, "required": true } ], "responses": { "200": { "description": "200", "content": { "application/json": { "examples": { "Result": { "value": "{}" } }, "schema": { "type": "object", "properties": {} } } } }, "400": { "description": "400", "content": { "application/json": { "examples": { "Result": { "value": "{}" } }, "schema": { "type": "object", "properties": {} } } } } }, "deprecated": false } } }, "x-readme": { "headers": [], "explorer-enabled": true, "proxy-enabled": true }, "x-readme-fauxas": true } ``` -------------------------------- ### POST /profile Source: https://docs.pandavideo.com/reference/create-new-profile Creates a new video player profile for the authenticated user. ```APIDOC ## POST /profile ### Description Creates a new video player profile for the authenticated user. ### Method POST ### Endpoint /profile ### Parameters #### Request Body - **name** (string) - Required - The name of the profile. Must be between 3 and 100 characters. - **exclusive** (boolean) - Optional - Indicates if the profile is exclusive. ### Request Example ```json { "name": "My Awesome Profile", "exclusive": false } ``` ### Response #### Success Response (201) - **data** (object) - Contains the details of the created profile. - **id** (string) - The unique identifier of the created profile. - **name** (string) - The name of the created profile. - **message** (string) - A confirmation message, e.g., "Created". #### Response Example ```json { "data": { "id": "123e4567-e89b-12d3-a456-426614174000", "name": "My Awesome Profile" }, "message": "Created" } ``` #### Error Responses - **400 Bad Request**: Invalid input parameters. - **401 Unauthorized**: Invalid or missing authentication. - **500 Internal Server Error**: An error occurred on the server. ``` -------------------------------- ### GET /subtitles/{video_id} Source: https://docs.pandavideo.com/reference/get-subtitle-infos-from-video Retrieves a list of available subtitles for a specific video by its ID. ```APIDOC ## GET /subtitles/{video_id} ### Description The Get Subtitle Infos from Video endpoint retrieves details regarding the available subtitles for a specific video identified by its unique `video_id`. ### Method GET ### Endpoint https://api-v2.pandavideo.com.br/subtitles/{video_id} ### Parameters #### Path Parameters - **video_id** (string) - Required - ID of the targeted video ### Response #### Success Response (200) - **subtitles** (array) - List of subtitle objects containing srclang, label, transcription status, and auto_detected flag. #### Response Example { "subtitles": [ { "srclang": "pt-BR", "label": "Portuguese (Brazil)", "transcription": true, "auto_detected": false } ] } ``` -------------------------------- ### Number Query Parameters Source: https://docs.pandavideo.com/reference/query-params Configure player behavior using numerical parameters like captionsFontSize, defaultSpeed, and startTime. ```APIDOC ## Number Query Parameters ### Description Configure player behavior using numerical parameters. These parameters control settings such as caption font size, video playback speed, and start time. ### Method GET ### Endpoint `/embed/` ### Query Parameters - **alternativeProgress2xLimit** (Number) - Optional - The limit in % that the progress bar will run at a different speed. Default is 20. - **alternativeProgressVelocity** (Number) - Optional - The speed of the progress bar. Default is 5. - **alternativeProgressHeight** (Number) - Optional - The height of the progress bar. Default is 0. - **saveProgressBackgroundOpacity** (Number) - Optional - Opacity of the save progress page background. Default is 1. - **captionsFontSize** (Number) - Optional - Subtitles font size in pixels. Default is 20. - **defaultSpeed** (Number) - Optional - Default video playback speed. Available speeds include 0.5, 0.75, 1, 1.25, 1.5, 2. Default is 1. - **startTime** (Number) - Optional - Time in seconds at which the video will start playing. Default is 0. ### Request Example ```text URL https://player.example.com/?v=12345&captionsFontSize=24&defaultSpeed=1.5&alternativeProgress2xLimit=30&alternativeProgressVelocity=10&alternativeProgressHeight=8 ``` ### Response This endpoint does not return a response body in the traditional sense; it configures the player's behavior based on the provided query parameters. ``` -------------------------------- ### Update Public Comment - JSON Request Examples Source: https://docs.pandavideo.com/reference/updatepubliccomment Provides examples of JSON request bodies for updating a public comment. These examples demonstrate how to update the comment text or change its status to 'resolved' or 'open'. The API supports partial updates, meaning only the fields to be modified need to be included in the request. ```json { "text": "Updated comment text" } ``` ```json { "status": "resolved" } ``` ```json { "status": "open" } ``` -------------------------------- ### POST /shorts Source: https://docs.pandavideo.com/reference/import-video Initiates a new video short generation job by specifying source type, layout, and aspect ratio preferences. ```APIDOC ## POST /shorts ### Description Creates a new short generation job. The system processes the source video based on the provided layout and aspect ratio settings. ### Method POST ### Endpoint /shorts ### Parameters #### Request Body - **source_type** (string) - Required - The origin of the video (youtube, library, or upload). - **video_external_id** (string) - Required if source_type is 'library' - The PandaVideo library video ID. - **layout_mode** (string) - Optional - The visual style (static, blur, gaming, react, split). - **aspect_ratio** (string) - Optional - The output format (vertical, horizontal, square). - **cookies** (string) - Optional - Authentication cookies for YouTube sources. ### Request Example { "source_type": "library", "video_external_id": "vid_12345", "layout_mode": "gaming", "aspect_ratio": "vertical" } ### Response #### Success Response (201) - **success** (boolean) - Indicates if the request was successful. - **job_id** (string) - Unique identifier for the processing job. - **status** (string) - Current job status (waiting, processing). - **analysis_duration** (number) - Duration of the analyzed segment. - **estimated_processing_seconds** (number) - Expected completion time. #### Response Example { "success": true, "job_id": "550e8400-e29b-41d4-a716-446655440000", "status": "waiting", "analysis_duration": 120, "estimated_processing_seconds": 300 } ``` -------------------------------- ### GET /subtitles/{video_id}/{srclang} Source: https://docs.pandavideo.com/reference/get-subtitle-from-video Retrieves subtitles associated with a specific video. Requires the video ID and the source language code. ```APIDOC ## GET /subtitles/{video_id}/{srclang} ### Description Retrieves subtitles associated with a specific video. Requires the video ID and the source language code. ### Method GET ### Endpoint `https://api-v2.pandavideo.com.br/subtitles/{video_id}/{srclang}` ### Parameters #### Path Parameters - **video_id** (string) - Required - ID of the targeted video - **srclang** (string) - Required - Language code of subtitles (source language). Possible values: "en", "pt-BR", "es" ### Responses #### Success Response (200) - **(object)** - Subtitles data (structure not detailed in provided text) #### Error Responses - **400**: Bad request. Check the provided parameters. - **401**: Unauthorized. Authentication failed or not provided. - **404**: Not found. - **500**: Internal server error. Please try again later. ### Request Example (No specific request body example provided for this GET endpoint) ### Response Example ```json { "example": "{}" } ``` ``` -------------------------------- ### GET /analytics/traffic Source: https://docs.pandavideo.com/reference/get-bandwidth-by-video Retrieves bandwidth (traffic) analytics for a specific video over a given date range. Requires authentication. ```APIDOC ## GET /analytics/traffic ### Description Retrieves bandwidth (traffic) analytics for a specific video over a given date range. ### Method GET ### Endpoint https://api-v2.pandavideo.com/analytics/traffic ### Parameters #### Header Parameters - **Authorization** (string) - Required - Bearer access token. #### Query Parameters - **video_id** (string) - Required - Video identifier. - **start_date** (string) - Required - Start date for the analytics period (yyyy-MM-dd). - **end_date** (string) - Required - End date for the analytics period (yyyy-MM-dd). ### Request Example ``` GET /analytics/traffic?video_id=your_video_id&start_date=2023-01-01&end_date=2023-01-31 Host: api-v2.pandavideo.com Authorization: Bearer YOUR_ACCESS_TOKEN ``` ### Response #### Success Response (200) - **bandwidth** (object) - An object containing bandwidth data. - **total_bandwidth** (integer) - Total bandwidth used in bytes. - **daily_bandwidth** (array) - An array of daily bandwidth usage. - **date** (string) - The date of the bandwidth usage (yyyy-MM-dd). - **bandwidth** (integer) - Bandwidth used on that date in bytes. #### Response Example (200) ```json { "bandwidth": { "total_bandwidth": 1073741824, "daily_bandwidth": [ { "date": "2023-01-01", "bandwidth": 536870912 }, { "date": "2023-01-02", "bandwidth": 536870912 } ] } } ``` #### Error Responses - **400**: Bad request. Check the provided parameters. - **401**: Unauthorized. Authentication failed or not provided. - **404**: Not found. - **500**: Internal server error. Please try again later. ``` -------------------------------- ### POST /{library_id}?action=refer Source: https://docs.pandavideo.com/reference/add-new-referer Adds a new referer to a specified library. This endpoint allows you to configure allowed or blocked hostnames for your video streams. ```APIDOC ## POST /{library_id}?action=refer ### Description Adds a new referer to a specified library. This endpoint allows you to configure allowed or blocked hostnames for your video streams. ### Method POST ### Endpoint https://api-v2.pandavideo.com.br/live/{library_id}?action=refer ### Parameters #### Path Parameters - **library_id** (string) - Required - The ID of the library to which the referer will be added. #### Query Parameters - **action** (string) - Required - Must be set to "refer". #### Request Body - **hostname** (string) - Required - The hostname to be added as a referer. - **type** (string) - Required - Specifies whether the hostname is allowed or blocked. Can be "ALLOW" or "BLOCK". ### Request Example ```json { "hostname": "example.com", "type": "ALLOW" } ``` ### Response #### Success Response (200) - (object) - An empty object is returned upon successful addition of the referer. #### Response Example ```json {} ``` #### Error Response (400) - (object) - An empty object is returned for bad requests, indicating an issue with the request parameters or body. ``` -------------------------------- ### GET /videos/{video_id}?custom_fields Source: https://docs.pandavideo.com/reference/get-custom-fields Retrieves all custom fields associated with a specific video, including keys, values, and metadata. ```APIDOC ## GET /videos/{video_id}?custom_fields ### Description Retrieves all custom fields associated with a specific video, including their keys, values, and metadata. Custom fields allow you to store additional metadata for your videos with flexible key-value pairs. ### Method GET ### Endpoint /videos/{video_id}?custom_fields ### Parameters #### Path Parameters - **video_id** (string/uuid) - Required - Unique identifier for the video. #### Query Parameters - **custom_fields** (string) - Required - Must be present to retrieve custom fields. #### Request Headers - **Authorization** (string) - Required - Panda API token (without Bearer prefix). ### Request Example ```bash curl -X GET \ 'https://api-v2-staging.pandavideo.com/videos/123e4567-e89b-12d3-a456-426614174000?custom_fields' \ -H 'Authorization: your_api_token_here' \ -H 'Accept: application/json' ``` ### Response #### Success Response (200) - **Array** (object) - Returns an array of custom field objects containing id, video_id, key, value, created_at, and updated_at. #### Response Example [ { "id": "123e4567-e89b-12d3-a456-426614174000", "video_id": "d848feb5-b5a2-4e59-a125-23379b3692b5", "key": "category", "value": "Educational", "created_at": "2023-01-15T10:30:00Z", "updated_at": "2023-01-15T10:30:00Z" } ] ``` -------------------------------- ### POST /folders Source: https://docs.pandavideo.com/reference/post_folders-1 Creates a new folder for the authenticated user. ```APIDOC ## POST /folders ### Description Creates a new folder for the authenticated user. ### Method POST ### Endpoint https://api-v2.pandavideo.com/folders ### Parameters #### Request Body - **name** (string) - Required - Folder name - **parent_folder_id** (string) - Optional - Parent folder ID for creating nested folders ### Request Example ```json { "name": "My Video Folder", "parent_folder_id": null } ``` ### Response #### Success Response (201) - **data** (object) - Contains the created folder details. - **id** (string) - UUID of the created folder. - **name** (string) - Name of the created folder. - **user_id** (string) - UUID of the user who created the folder. - **parent_folder_id** (string) - UUID of the parent folder, or null if it's a top-level folder. - **status** (boolean) - Status of the folder. - **created_at** (string) - Timestamp when the folder was created. - **updated_at** (string) - Timestamp when the folder was last updated. - **message** (string) - Confirmation message. #### Response Example ```json { "data": { "id": "123e4567-e89b-12d3-a456-426614174000", "name": "My Video Folder", "user_id": "0fc88232-a673-42b1-9e6c-e974d9a937b7", "parent_folder_id": null, "status": true, "created_at": "2025-08-01T10:30:00.000Z", "updated_at": "2025-08-01T10:30:00.000Z" }, "message": "Created" } ``` #### Error Responses - **400 Bad Request**: Invalid input parameters. - **401 Unauthorized**: Invalid or missing authentication. - **500 Internal Server Error**: An unexpected error occurred on the server. ``` -------------------------------- ### Get Video Custom Fields - OpenAPI Definition Source: https://docs.pandavideo.com/reference/get-custom-fields This OpenAPI definition describes the 'GET /videos/{video_id}' endpoint, which retrieves custom fields for a specific video. It specifies parameters like 'video_id' and 'custom_fields', and defines successful responses (200) along with potential error responses (401, 404, 500). ```json { "openapi": "3.0.3", "info": { "title": "Panda MS Videos API - Custom Fields", "description": "API for managing custom fields in the Panda platform.\nThis API allows you to:\n- Create, read, update, and delete custom fields for videos - Manage custom field metadata and values - Handle custom field validation and limits - Configure custom field properties\n", "version": "1.0.0", "contact": { "name": "Panda Team", "email": "support@panda.video" } }, "servers": [ { "url": "https://api-v2.pandavideo.com", "description": "Production server" }, { "url": "https://api-v2-staging.pandavideo.com", "description": "Staging server" }, { "url": "http://localhost:10000", "description": "Local development server" } ], "paths": { "/videos/{video_id}": { "get": { "summary": "Get video custom fields", "description": "Retrieves all custom fields for a specific video", "tags": [ "Custom Fields" ], "security": [ { "PandaAuth": [] } ], "parameters": [ { "name": "video_id", "in": "path", "required": true, "description": "Unique identifier for the video", "schema": { "type": "string", "format": "uuid" } }, { "name": "custom_fields", "in": "query", "required": true, "description": "Set to 'true' to retrieve custom fields", "schema": { "type": "string", "enum": [ "true" ] } } ], "responses": { "200": { "description": "Custom fields retrieved successfully", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CustomField" } } } } }, "401": { "$ref": "#/components/responses/UnauthorizedError" }, "404": { "$ref": "#/components/responses/NotFoundError" }, "500": { "$ref": "#/components/responses/InternalServerError" } } } } }, "components": { "securitySchemes": { "PandaAuth": { "type": "apiKey", "in": "header", "name": "Authorization", "description": "Panda API token (without Bearer prefix)" } }, "schemas": { "CustomField": { "type": "object", "description": "Custom field object", "properties": { "id": { "type": "string", "format": "uuid", "description": "Unique identifier for the custom field", "example": "123e4567-e89b-12d3-a456-426614174000" }, "video_id": { "type": "string", "format": "uuid", "description": "ID of the video this custom field belongs to", "example": "987fcdeb-51a2-4e59-a125-23379b3692b5" }, "key": { "type": "string", "description": "Custom field key/name", "example": "category", "maxLength": 200 }, "value": { "type": "string", "description": "Custom field value", "example": "Educational", "maxLength": 500, "nullable": true }, "created_at": { "type": "string", "format": "date-time", "description": "Custom field creation timestamp", "example": "2023-01-15T10:30:00Z" }, "updated_at": { "type": "string", "format": "date-time", "description": "Last update timestamp", "example": "2023-01-15T10:30:00Z" } } }, "Error": { "type": "object", "properties": { "error": { "type": "string", "description": "Error type", "example": "ValidationError" }, "message": { "type": "string", "description": "Human-readable error message", "example": "The provided data is invalid" }, "details": { "type": "array", "items": { "type": "string" }, "description": "Detailed error information", "example": [ "Title is required", "Duration must be positive" ] } } } }, "responses": { "UnauthorizedError": { "description": "Authentication required or invalid credentials" } } } } ``` -------------------------------- ### Initialize Panda Player API Source: https://docs.pandavideo.com/reference/player-api Demonstrates how to load the Panda Player script and instantiate the player object within an HTML container. The initialization uses a queue pattern to ensure the player is ready before execution. ```html
``` -------------------------------- ### GET /websites/pandavideo/videos/{video_id}/reviewlinks Source: https://docs.pandavideo.com/reference/listreviewlinks Retrieves a list of review links associated with a specific video. This endpoint allows you to get all review links created for a particular video, including their details and status. ```APIDOC ## GET /websites/pandavideo/videos/{video_id}/reviewlinks ### Description Retrieves a list of review links associated with a specific video. This endpoint allows you to get all review links created for a particular video, including their details and status. ### Method GET ### Endpoint /websites/pandavideo/videos/{video_id}/reviewlinks ### Parameters #### Path Parameters - **video_id** (string) - Required - The unique identifier of the video. ### Request Example (No request body for GET requests) ### Response #### Success Response (200) - **ReviewLinksListResponse** (array) - A list of review links with public URLs. #### Response Example { "example": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "video_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "name": "Client Review v1", "expires_at": "2025-01-25T23:59:59.000Z", "status": "active", "allow_comment": true, "allow_status_edit": true, "show_resolved": true, "created_at": "2025-01-15T10:00:00.000Z", "updated_at": "2025-01-15T10:00:00.000Z", "url": "https://review.pandavideo.com.br/550e8400-e29b-41d4-a716-446655440000" } ] } #### Error Response (400) - **ErrorResponse** (object) - Indicates invalid query parameters. #### Error Response (404) - **ErrorResponse** (object) - Indicates that the video was not found. ``` -------------------------------- ### Boolean Query Parameters Source: https://docs.pandavideo.com/reference/query-params Configure player behavior using boolean parameters like autoplay, muted, and saveProgress. ```APIDOC ## Boolean Query Parameters ### Description Configure player behavior using boolean parameters. These parameters accept `true` or `false` values to control features such as automatic playback, muted audio, saving watch progress, and UI elements. ### Method GET ### Endpoint `/embed/` ### Query Parameters - **autoplay** (Boolean) - Optional - Autoplay on load. If true, the video starts playing automatically, potentially with audio or muted based on other settings. - **muted** (Boolean) - Optional - Video init on muted mode. If true, the video will start playing with the audio muted. - **saveProgress** (Boolean) - Optional - Save video watch progress. If true, the player will remember and resume the user's watch progress. - **preload** (Boolean) - Optional - HLS preload enabled. Controls whether HLS content is preloaded. - **mutedIndicatorIcon** (Boolean) - Optional - Muted indicator is enabled. Shows an icon when the video is muted. - **alternativeProgress** (Boolean) - Optional - Fictitious progress bar. Enables a custom progress bar display. - **hideControlsOnStart** (Boolean) - Optional - Hide controls before play. Hides player controls until playback begins. - **restartAfterEnd** (Boolean) - Optional - Restart at the end. Automatically restarts the video when it finishes playing. - **troubleshootDialog** (Boolean) - Optional - Right click. Enables a troubleshoot dialog accessible via right-click. - **disableForward** (Boolean) - Optional - Disable click to advance or go back. Prevents users from skipping forward or backward in the video. - **playOpensFullscreen** (Boolean) - Optional - Play opens in full screen. If true, clicking play will immediately switch to fullscreen mode. - **smartAutoplay** (Boolean) - Optional - If true, the player will try to play with audio before showing the muted indicator. Requires `autoplay` to be true as well. - **startsWithSubtitle** (Boolean) - Optional - Defines whether the player should start with subtitles enabled or disabled when the video loads. ### Request Example ```text URL https://player.example.com/?v=12345&autoplay=true&muted=true&saveProgress=false&hideControlsOnStart=true&restartAfterEnd=true ``` ### Response This endpoint does not return a response body in the traditional sense; it configures the player's behavior based on the provided query parameters. ``` -------------------------------- ### API Error Response Examples (JSON) Source: https://docs.pandavideo.com/reference/createreviewlink Examples of error responses for invalid input data. Includes general validation errors and specific errors like expiration dates exceeding the 30-day limit. ```json { "errCode": "BadRequest", "errMsg": "Invalid body" } ``` ```json { "errCode": "BadRequest", "errMsg": "Expiration date must be within 30 days" } ```