diff --git a/README.md b/README.md index 9bf7b5c..91d69a4 100644 --- a/README.md +++ b/README.md @@ -293,7 +293,10 @@ Method | HTTP request | Description [**list**](https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#list) | **GET** `/videos` | List all video objects [**uploadThumbnail**](https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#uploadThumbnail) | **POST** `/videos/{videoId}/thumbnail` | Upload a thumbnail [**pickThumbnail**](https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#pickThumbnail) | **PATCH** `/videos/{videoId}/thumbnail` | Set a thumbnail +[**getDiscarded**](https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#getDiscarded) | **GET** `/discarded/videos/{videoId}` | Retrieve a discarded video object [**getStatus**](https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#getStatus) | **GET** `/videos/{videoId}/status` | Retrieve video status and details +[**listDiscarded**](https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#listDiscarded) | **GET** `/discarded/videos` | List all discarded video objects +[**updateDiscarded**](https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#updateDiscarded) | **PATCH** `/discarded/videos/{videoId}` | Update a discarded video object ### WatermarksApi @@ -362,6 +365,7 @@ Method | HTTP request | Description - [CaptionsUpdatePayload](https://github.com/apivideo/api.video-java-client/blob/main/docs/CaptionsUpdatePayload.md) - [Chapter](https://github.com/apivideo/api.video-java-client/blob/main/docs/Chapter.md) - [ChaptersListResponse](https://github.com/apivideo/api.video-java-client/blob/main/docs/ChaptersListResponse.md) + - [DiscardedVideoUpdatePayload](https://github.com/apivideo/api.video-java-client/blob/main/docs/DiscardedVideoUpdatePayload.md) - [FilterBy](https://github.com/apivideo/api.video-java-client/blob/main/docs/FilterBy.md) - [FilterBy1](https://github.com/apivideo/api.video-java-client/blob/main/docs/FilterBy1.md) - [FilterBy2](https://github.com/apivideo/api.video-java-client/blob/main/docs/FilterBy2.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index c819591..fc48f47 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -197,8 +197,6 @@ paths: style: form - description: Videos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter. - [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata/) allows - you to define a key that allows any value pair. example: metadata[Author]=John Doe&metadata[Format]=Tutorial explode: true in: query @@ -302,8 +300,11 @@ paths: value: John Doe - key: Format value: Tutorial - publishedAt: 2019-12-16T08:25:51.000Z - updatedAt: 2019-12-16T08:48:49.000Z + publishedAt: 2019-12-16T08:25:51+00:00 + updatedAt: 2019-12-16T08:48:49+00:00 + discarded: false + discardedAt: null + deletesAt: null source: uri: /videos/c188ed58-3403-46a2-b91b-44603d10b2c9/source assets: @@ -330,8 +331,11 @@ paths: value: Cyberpunk - key: Technology value: Computers - publishedAt: 2019-12-16T08:25:51.000Z - updatedAt: 2019-12-16T08:48:49.000Z + publishedAt: 2019-12-16T08:25:51+00:00 + updatedAt: 2019-12-16T08:48:49+00:00 + discarded: false + discardedAt: null + deletesAt: null source: uri: /videos/vi4blUQJFrYWbaG44NChkH27/source assets: @@ -355,8 +359,11 @@ paths: metadata: - key: Length value: Short - publishedAt: 2019-12-16T08:25:51.000Z - updatedAt: 2019-12-16T08:48:49.000Z + publishedAt: 2019-12-16T08:25:51+00:00 + updatedAt: 2019-12-16T08:48:49+00:00 + discarded: false + discardedAt: null + deletesAt: null source: uri: /videos/vi4blUQJFrYWbaG44NChkH27/source assets: @@ -622,7 +629,10 @@ paths: value: John Doe - key: Format value: Tutorial - publishedAt: 4665-07-14T23:36:18.598Z + publishedAt: 2024-07-14T23:36:07+00:00 + discarded: false + discardedAt: null + deletesAt: null source: uri: /videos/vi4blUQJFrYWbaG44NChkH27/source assets: @@ -699,7 +709,7 @@ paths: title: This attribute is required. name: title - type: https://docs.api.video/reference/invalid-attribute - title: This attribute must be a ISO8601 date. + title: This attribute must be a ISO-8601 date. name: scheduledAt - type: https://docs.api.video/reference/invalid-attribute title: This attribute must be an array. @@ -1025,7 +1035,10 @@ paths: value: John Doe - key: Format value: Tutorial - publishedAt: 4665-07-14T23:36:18.598Z + publishedAt: 2024-07-14T23:36:07+00:00 + discarded: false + discardedAt: null + deletesAt: null source: uri: /videos/vi4blUQJFrYWbaG44NChkH27/source assets: @@ -1426,9 +1439,9 @@ paths: value: data: - watermarkId: watermark_1BWr2L5MTQwxGkuxKjzh6i - createdAt: 2019-12-16T08:25:51.000Z + createdAt: 2019-12-16T08:25:51+00:00 - watermarkId: watermark_3BWC2L5MTQwxGkuxKjzh7g - createdAt: 2019-12-16T08:25:51.000Z + createdAt: 2019-12-16T08:25:51+00:00 pagination: currentPage: 1 pageSize: 25 @@ -1610,7 +1623,7 @@ paths: response: value: watermarkId: watermark_1BWr2L5MTQwxGkuxKjzh6i - createdAt: 2020-03-03T12:52:03.085Z + createdAt: 2020-03-03T12:52:03+00:00 schema: $ref: '#/components/schemas/watermark' description: Success @@ -2052,7 +2065,10 @@ paths: value: John Doe - key: Format value: Tutorial - publishedAt: 4665-07-14T23:36:18.598Z + publishedAt: 2024-07-14T23:36:07+00:00 + discarded: false + discardedAt: null + deletesAt: null source: uri: /videos/vi4blUQJFrYWbaG44NChkH27/source assets: @@ -2317,8 +2333,11 @@ paths: value: John Doe - key: Format value: Tutorial - createdAt: 2020-03-03T12:52:03.085Z - publishedAt: 2020-07-14T23:36:18.598Z + createdAt: 2020-03-03T12:52:03+00:00 + publishedAt: 2020-07-14T23:36:07+00:00 + discarded: false + discardedAt: null + deletesAt: null source: uri: /videos/vi4blUQJFrYWbaG44NChkH27/source assets: @@ -2569,7 +2588,12 @@ paths: x-accepts: application/json /videos/{videoId}: delete: - description: Delete a video object by video ID. + description: "Delete a video object by video ID. \n\nBy default, deleted videos\ + \ cannot be recovered. If you have the Video Restore feature enabled, this\ + \ operation will discard the video instead of permanently deleting it. Make\ + \ sure you subscribe to the Video Restore feature if you want to be able to\ + \ restore deleted videos! \n\nThe Video Restore feature retains videos for\ + \ 90 days, after which the videos are permanently deleted. \n" operationId: DELETE-video parameters: - description: The video ID for the video you want to delete. @@ -2605,19 +2629,1022 @@ paths: schema: type: integer style: simple - "404": + "404": + content: + application/json: + examples: + response: + value: + type: https://docs.api.video/reference/resource-not-found + title: The requested resource was not found. + name: videoId + status: 404 + schema: + $ref: '#/components/schemas/not-found' + description: Not Found + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "429": + content: + application/json: + examples: + Too many requests: + value: + type: https://docs.api.video/reference/too-many-requests + title: Too many requests. + status: 429 + schema: + $ref: '#/components/schemas/too-many-requests' + description: Too Many Requests + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + security: + - apiKey: [] + summary: Delete a video object + tags: + - Videos + x-client-description: + default: If you do not need a video any longer, you can send a request to + delete it. All you need is the videoId. By default, deleted videos cannot + be recovered. If you have the Video Restore feature enabled, this operation + will discard the video instead of permanently deleting it. Make sure you + subscribe to the Video Restore feature if you want to be able to restore + deleted videos! The Video Restore feature retains videos for 90 days, after + which the videos are permanently deleted + x-client-action: delete + x-doctave: + code-samples: + - language: go + code: "// First install the go client with \"go get github.com/apivideo/api.video-go-client\"\ + \n// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#delete\n\ + \npackage main\nimport (\n \"context\"\n \"fmt\"\n \"os\"\n \ + \ apivideosdk \"github.com/apivideo/api.video-go-client\"\n)\nfunc main()\ + \ {\n client := apivideosdk.ClientBuilder(\"YOUR_API_KEY\").Build()\n\ + \ // if you rather like to use the sandbox environment:\n // client\ + \ := apivideosdk.SandboxClientBuilder(\"YOUR_SANDBOX_API_KEY\").Build()\n\ + \ \n videoId := \"vi4k0jvEUuaTdRAEjQ4Jfrgz\" // string | The\ + \ video ID for the video you want to delete.\n err := client.Videos.Delete(videoId)\n\ + \ if err != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling\ + \ `Videos.Delete``: %v\\\n\", err)\n }\n} \n" + - language: node + code: "// First install the \"@api.video/nodejs-client\" npm package\n//\ + \ Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#delete\n\ + \nconst client = new ApiVideoClient({ apiKey: \"YOUR_API_KEY\" });\n\n\ + const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // the id of the video to\ + \ delete\nawait client.videos.delete(videoId); \n" + - language: python + code: | + # First install the api client with "pip install api.video" + # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#delete + + import apivideo + from apivideo.api import videos_api + from apivideo.model.not_found import NotFound + from pprint import pprint + # Enter a context with an instance of the API client + with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client: + # Create an instance of the API class + api_instance = videos_api.VideosApi(api_client) + video_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | The video ID for the video you want to delete. + # example passing only required values which don't have defaults set + try: + # Delete a video + api_instance.delete(video_id) + except apivideo.ApiException as e: + print("Exception when calling VideosApi->delete: %s\n" % e) + - language: java + code: "// First add the \"video.api:java-api-client\" maven dependency to\ + \ your project\n// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#delete\n\ + \nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ + import video.api.client.api.models.*;\nimport video.api.client.api.clients.VideosApi;\n\ + import java.util.*;\n \npublic class Example {\n public static void\ + \ main(String[] args) {\n ApiVideoClient client = new ApiVideoClient(\"\ + YOUR_API_KEY\");\n // if you rather like to use the sandbox environment:\n\ + \ // ApiVideoClient client = new ApiVideoClient(\"YOUR_SANDBOX_API_KEY\"\ + , ApiVideoClient.Environment.SANDBOX);\n \n VideosApi apiInstance\ + \ = client.videos();\n \n String videoId = \"vi4k0jvEUuaTdRAEjQ4Jfrgz\"\ + ; // The video ID for the video you want to delete.\n \n try {\n\ + \ apiInstance.delete(videoId);\n } catch (ApiException e) {\n\ + \ System.err.println(\"Exception when calling VideosApi#delete\"\ + );\n System.err.println(\"Status code: \" + e.getCode());\n \ + \ System.err.println(\"Reason: \" + e.getMessage());\n System.err.println(\"\ + Response headers: \" + e.getResponseHeaders());\n e.printStackTrace();\n\ + \ }\n }\n}\n" + - language: csharp + code: "// First add the \"ApiVideo\" NuGet package to your project\n// Documentation:\ + \ https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#delete\n\ + \nusing System.Diagnostics;\nusing ApiVideo.Client;\n\nnamespace Example\n\ + {\n public class deleteExample\n {\n public static void Main()\n\ + \ {\n var basePath = ApiVideoClient.Client.Environment.SANDBOX;\n\ + \ var apiKey = \"YOUR_API_KEY\";\n var apiInstance\ + \ = new ApiVideoClient(apiKey,basePath);\n var videoId = vi4k0jvEUuaTdRAEjQ4Jfrgz;\ + \ // string | The video ID for the video you want to delete.\n \ + \ var apiVideosInstance = apiInstance.Videos();\n try\n\ + \ {\n // Delete a video\n apiVideosInstance.delete(videoId);\n\ + \ }\n catch (ApiException e)\n {\n \ + \ Debug.Print(\"Exception when calling VideosApi.delete:\ + \ \" + e.Message );\n Debug.Print(\"Status Code: \"+ e.ErrorCode);\n\ + \ Debug.Print(e.StackTrace);\n }\n }\n\ + \ }\n} \n" + - language: php + code: "videos()->delete($videoId); " + - language: swift + code: | + // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started + // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#delete + x-accepts: application/json + get: + description: Retrieve the video details by video id. + operationId: GET-video + parameters: + - description: The unique identifier for the video you want details about. + explode: false + in: path + name: videoId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + examples: + response: + value: + videoId: vi4blUQJFrYWbaG44NChkH27 + playerId: pl45KFKdlddgk654dspkze + title: Maths video + description: An amazing video explaining string theory + public: false + panoramic: false + mp4Support: true + tags: + - maths + - string theory + - video + metadata: + - key: Author + value: John Doe + - key: Format + value: Tutorial + publishedAt: 2019-12-16T08:25:51+00:00 + updatedAt: 2019-12-16T08:48:49+00:00 + discarded: false + discardedAt: null + deletesAt: null + source: + uri: /videos/vi4blUQJFrYWbaG44NChkH27/source + assets: + iframe: + player: https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27 + hls: https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8 + thumbnail: https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg + mp4: https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4 + schema: + $ref: '#/components/schemas/video' + description: Success + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "404": + content: + application/json: + examples: + response: + value: + type: https://docs.api.video/reference/resource-not-found + title: The requested resource was not found. + name: videoId + status: 404 + schema: + $ref: '#/components/schemas/not-found' + description: Not Found + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "429": + content: + application/json: + examples: + Too many requests: + value: + type: https://docs.api.video/reference/too-many-requests + title: Too many requests. + status: 429 + schema: + $ref: '#/components/schemas/too-many-requests' + description: Too Many Requests + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + security: + - apiKey: [] + summary: Retrieve a video object + tags: + - Videos + x-client-description: + default: This call provides the same information provided on video creation. + For private videos, it will generate a unique token url. Use this to retrieve + any details you need about a video, or set up a private viewing URL. + x-client-action: get + x-doctave: + code-samples: + - language: go + code: "// First install the go client with \"go get github.com/apivideo/api.video-go-client\"\ + \n// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#get\n\ + \npackage main\n\nimport (\n \"context\"\n \"fmt\"\n \"os\"\n\ + \ apivideosdk \"github.com/apivideo/api.video-go-client\"\n)\n\nfunc\ + \ main() {\n client := apivideosdk.ClientBuilder(\"YOUR_API_KEY\").Build()\n\ + \ // if you rather like to use the sandbox environment:\n // client\ + \ := apivideosdk.SandboxClientBuilder(\"YOUR_SANDBOX_API_KEY\").Build()\n\ + \ \n videoId := \"videoId_example\" // string | The unique identifier\ + \ for the video you want details about.\n\n \n res, err := client.Videos.Get(videoId)\n\ + \n if err != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling\ + \ `Videos.Get``: %v\\\n\", err)\n }\n // response from `Get`: Video\n\ + \ fmt.Fprintf(os.Stdout, \"Response from `Videos.Get`: %v\\\n\", res)\n\ + }\n" + - language: node + code: "// First install the \"@api.video/nodejs-client\" npm package\n//\ + \ Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#get\n\ + \nconst client = new ApiVideoClient({ apiKey: \"YOUR_API_KEY\" });\n\n\ + const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for\ + \ the video you want to retrieve.\nconst result = await client.videos.get(videoId);\ + \ \n" + - language: python + code: | + # First install the api client with "pip install api.video" + # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#get + + import apivideo + from apivideo.api import videos_api + from apivideo.model.not_found import NotFound + from apivideo.model.video import Video + from pprint import pprint + + # Enter a context with an instance of the API client + with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client: + # Create an instance of the API class + api_instance = videos_api.VideosApi(api_client) + video_id = "videoId_example" # str | The unique identifier for the video you want details about. + + # example passing only required values which don't have defaults set + try: + # Show a video + api_response = api_instance.get(video_id) + pprint(api_response) + except apivideo.ApiException as e: + print("Exception when calling VideosApi->get: %s\n" % e) + - language: java + code: "// First add the \"video.api:java-api-client\" maven dependency to\ + \ your project\n// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#get\n\ + \nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ + import video.api.client.api.models.*;\nimport video.api.client.api.clients.VideosApi;\n\ + import java.util.*;\n\npublic class Example {\n public static void main(String[]\ + \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_KEY\"\ + );\n // if you rather like to use the sandbox environment:\n //\ + \ ApiVideoClient client = new ApiVideoClient(\"YOUR_SANDBOX_API_KEY\"\ + , ApiVideoClient.Environment.SANDBOX);\n\n VideosApi apiInstance =\ + \ client.videos();\n \n String videoId = \"videoId_example\"; //\ + \ The unique identifier for the video you want details about.\n\n try\ + \ {\n Video result = apiInstance.get(videoId);\n System.out.println(result);\n\ + \ } catch (ApiException e) {\n System.err.println(\"Exception\ + \ when calling VideosApi#get\");\n System.err.println(\"Status code:\ + \ \" + e.getCode());\n System.err.println(\"Reason: \" + e.getMessage());\n\ + \ System.err.println(\"Response headers: \" + e.getResponseHeaders());\n\ + \ e.printStackTrace();\n }\n }\n} \n" + - language: csharp + code: "// First add the \"ApiVideo\" NuGet package to your project\n// Documentation:\ + \ https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#get\n\ + \nusing System.Diagnostics;\nusing ApiVideo.Client;\n\nnamespace Example\n\ + {\n public class getExample\n {\n public static void Main()\n\ + \ {\n var basePath = ApiVideoClient.Client.Environment.SANDBOX;\n\ + \ var apiKey = \"YOUR_API_KEY\";\n\n var apiInstance\ + \ = new ApiVideoClient(apiKey,basePath);\n\n var videoId =\ + \ videoId_example; // string | The unique identifier for the video you\ + \ want details about.\n var apiVideosInstance = apiInstance.Videos();\n\ + \ try\n {\n // Show a video\n \ + \ Video result = apiVideosInstance.get(videoId);\n \ + \ Debug.WriteLine(result);\n }\n catch (ApiException\ + \ e)\n {\n Debug.Print(\"Exception when calling\ + \ VideosApi.get: \" + e.Message );\n Debug.Print(\"Status\ + \ Code: \"+ e.ErrorCode);\n Debug.Print(e.StackTrace);\n\ + \ }\n }\n }\n} \n" + - language: php + code: "videos()->getStatus($videoId);\ + \ " + - language: swift + code: | + // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started + // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#get + x-accepts: application/json + patch: + description: Update the parameters associated with a video ID. + operationId: PATCH-video + parameters: + - description: The video ID for the video you want to update. + example: vi4k0jvEUuaTdRAEjQ4Jfrgz + explode: false + in: path + name: videoId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/video-update-payload' + required: true + responses: + "200": + content: + application/json: + examples: + response: + value: + videoId: vi4blUQJFrYWbaG44NChkH27 + playerId: pl45KFKdlddgk654dspkze + title: Maths video + description: An amazing video explaining the string theory + public: false + panoramic: false + mp4Support: true + tags: + - maths + - string theory + - video + metadata: + - key: Author + value: John Doe + - key: Format + value: Tutorial + publishedAt: 2019-12-16T08:25:51+00:00 + updatedAt: 2019-12-16T08:48:49+00:00 + discarded: false + discardedAt: null + deletesAt: null + source: + uri: /videos/vi4blUQJFrYWbaG44NChkH27/source + assets: + iframe: + player: https://embed.api.video/vod/vi4blUQJFrYWbaG44NChkH27 + hls: https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/hls/manifest.m3u8 + thumbnail: https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/thumbnail.jpg + mp4: https://cdn.api.video/vod/vi4blUQJFrYWbaG44NChkH27/mp4/source.mp4 + schema: + $ref: '#/components/schemas/video' + description: Success + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "400": + content: + application/json: + examples: + response: + value: + type: https://docs.api.video/reference/invalid-attribute + title: This attribute must be a ISO-8601 date. + name: scheduledAt + status: 400 + problems: + - type: https://docs.api.video/reference/invalid-attribute + title: This attribute must be a ISO-8601 date. + name: scheduledAt + - type: https://docs.api.video/reference/invalid-attribute + title: This attribute must be an array. + name: tags + - type: https://docs.api.video/reference/invalid-attribute + title: This attribute must be an array. + name: metadata + schema: + $ref: '#/components/schemas/bad-request' + description: Bad Request + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "404": + content: + application/json: + examples: + response: + value: + type: https://docs.api.video/reference/resource-not-found + title: The requested resource was not found. + name: videoId + status: 404 + schema: + $ref: '#/components/schemas/not-found' + description: Not Found + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "429": + content: + application/json: + examples: + Too many requests: + value: + type: https://docs.api.video/reference/too-many-requests + title: Too many requests. + status: 429 + schema: + $ref: '#/components/schemas/too-many-requests' + description: Too Many Requests + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + security: + - apiKey: [] + summary: Update a video object + tags: + - Videos + x-client-description: + default: "Updates the parameters associated with a video ID. The video object\ + \ you are updating is determined by the video ID you provide. \n\nNOTE:\ + \ If you are updating an array, you must provide the entire array as what\ + \ you provide here overwrites what is in the system rather than appending\ + \ to it.\n" + x-client-action: update + x-doctave: + code-samples: + - language: go + code: "// First install the go client with \"go get github.com/apivideo/api.video-go-client\"\ + \n// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#update\n\ + \npackage main\n\nimport (\n \"context\"\n \"fmt\"\n \"os\"\n\ + \ apivideosdk \"github.com/apivideo/api.video-go-client\"\n)\n\nfunc\ + \ main() {\n client := apivideosdk.ClientBuilder(\"YOUR_API_KEY\").Build()\n\ + \ // if you rather like to use the sandbox environment:\n // client\ + \ := apivideosdk.SandboxClientBuilder(\"YOUR_SANDBOX_API_KEY\").Build()\n\ + \ \n videoId := \"vi4k0jvEUuaTdRAEjQ4Jfrgz\" // string | The\ + \ video ID for the video you want to delete.\n videoUpdatePayload :=\ + \ *apivideosdk.NewVideoUpdatePayload() // VideoUpdatePayload | \n\n \ + \ \n res, err := client.Videos.Update(videoId, videoUpdatePayload)\n\ + \n if err != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling\ + \ `Videos.Update``: %v\\\n\", err)\n }\n // response from `Update`:\ + \ Video\n fmt.Fprintf(os.Stdout, \"Response from `Videos.Update`: %v\\\ + \n\", res)\n}\n" + - language: node + code: "// First install the \"@api.video/nodejs-client\" npm package\n//\ + \ Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#update\n\ + \nconst client = new ApiVideoClient({ apiKey: \"YOUR_API_KEY\" });\n\n\ + const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The video ID for the video\ + \ you want to update.\n\n// define the value you want to update\nconst\ + \ videoUpdatePayload = {\n playerId: \"pl4k0jvEUuaTdRAEjQ4Jfrgz\",\ + \ // The unique ID for the player you want to associate with your video.\n\ + \ title: \"title_example\", // The title you want to use for your video.\n\ + \ description: \"A film about good books.\", // A brief description\ + \ of the video.\n _public: true, // Whether the video is publicly available\ + \ or not. False means it is set to private.\n panoramic: false, //\ + \ Whether the video is a 360 degree or immersive video.\n mp4Support:\ + \ true, // Whether the player supports the mp4 format.\n tags: [\"\ + maths\", \"string theory\", \"video\"], // A list of terms or words you\ + \ want to tag the video with. Make sure the list includes all the tags\ + \ you want as whatever you send in this list will overwrite the existing\ + \ list for the video.\n metadata: [{\"key\": \"Author\", \"value\"\ + : \"John Doe\"}], // A list (array) of dictionaries where each dictionary\ + \ contains a key value pair that describes the video. As with tags, you\ + \ must send the complete list of metadata you want as whatever you send\ + \ here will overwrite the existing metadata for the video.\n}; \n\n\n\ + const updatedVideo = await client.videos.update(videoId, videoUpdatePayload);\n" + - language: python + code: "# First install the api client with \"pip install api.video\"\n#\ + \ Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#update\n\ + \nimport apivideo\nfrom apivideo.api import videos_api\nfrom apivideo.model.video_update_payload\ + \ import VideoUpdatePayload\nfrom apivideo.model.bad_request import BadRequest\n\ + from apivideo.model.not_found import NotFound\nfrom apivideo.model.video\ + \ import Video\nfrom pprint import pprint\n\n# Enter a context with an\ + \ instance of the API client\nwith apivideo.AuthenticatedApiClient(__API_KEY__)\ + \ as api_client:\n # Create an instance of the API class\n api_instance\ + \ = videos_api.VideosApi(api_client)\n video_id = \"vi4k0jvEUuaTdRAEjQ4Jfrgz\"\ + \ # str | The video ID for the video you want to delete.\n video_update_payload\ + \ = VideoUpdatePayload(\n player_id=\"pl4k0jvEUuaTdRAEjQ4Jfrgz\"\ + ,\n title=\"title_example\",\n description=\"A film about\ + \ good books.\",\n public=True,\n panoramic=False,\n \ + \ mp4_support=True,\n tags=[\"maths\", \"string theory\", \"\ + video\"],\n metadata=[\n Metadata(\n \ + \ key=\"Color\",\n value=\"Green\",\n ),\n \ + \ ],\n ) # VideoUpdatePayload | \n\n # example passing only\ + \ required values which don't have defaults set\n try:\n # Update\ + \ a video\n api_response = api_instance.update(video_id, video_update_payload)\n\ + \ pprint(api_response)\n except apivideo.ApiException as e:\n\ + \ print(\"Exception when calling VideosApi->update: %s\\\n\" %\ + \ e) \n" + - language: java + code: "// First add the \"video.api:java-api-client\" maven dependency to\ + \ your project\n// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#update\n\ + \nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ + import video.api.client.api.models.*;\nimport video.api.client.api.clients.VideosApi;\n\ + import java.util.*;\n\npublic class Example {\n public static void main(String[]\ + \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_KEY\"\ + );\n // if you rather like to use the sandbox environment:\n //\ + \ ApiVideoClient client = new ApiVideoClient(\"YOUR_SANDBOX_API_KEY\"\ + , ApiVideoClient.Environment.SANDBOX);\n\n VideosApi apiInstance =\ + \ client.videos();\n \n String videoId = \"vi4k0jvEUuaTdRAEjQ4Jfrgz\"\ + ; // The video ID for the video you want to delete.\n VideoUpdatePayload\ + \ videoUpdatePayload = new VideoUpdatePayload(); // \n videoUpdatePayload.setPlayerId(\"\ + pl4k0jvEUuaTdRAEjQ4Jfrgz\"); // The unique ID for the player you want\ + \ to associate with your video.\n videoUpdatePayload.setTitle(\"null\"\ + ); // The title you want to use for your video.\n videoUpdatePayload.setDescription(\"\ + A film about good books.\"); // A brief description of the video.\n \ + \ videoUpdatePayload.setPublic(true); // Whether the video is publicly\ + \ available or not. False means it is set to private.\n videoUpdatePayload.setPanoramic(false);\ + \ // Whether the video is a 360 degree or immersive video.\n videoUpdatePayload.setMp4Support(true);\ + \ // Whether the player supports the mp4 format.\n videoUpdatePayload.setTags(Arrays.asList(\"\ + maths\", \"string theory\", \"video\")); // A list of terms or words you\ + \ want to tag the video with. Make sure the list includes all the tags\ + \ you want as whatever you send in this list will overwrite the existing\ + \ list for the video.\n videoUpdatePayload.setMetadata(Collections.emptyList());\ + \ // A list (array) of dictionaries where each dictionary contains a key\ + \ value pair that describes the video. As with tags, you must send the\ + \ complete list of metadata you want as whatever you send here will overwrite\ + \ the existing metadata for the video.\n\n\n try {\n Video result\ + \ = apiInstance.update(videoId, videoUpdatePayload);\n System.out.println(result);\n\ + \ } catch (ApiException e) {\n System.err.println(\"Exception\ + \ when calling VideosApi#update\");\n System.err.println(\"Status\ + \ code: \" + e.getCode());\n System.err.println(\"Reason: \" + e.getMessage());\n\ + \ System.err.println(\"Response headers: \" + e.getResponseHeaders());\n\ + \ e.printStackTrace();\n }\n }\n}\n" + - language: csharp + code: "// First add the \"ApiVideo\" NuGet package to your project\n// Documentation:\ + \ https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#update\n\ + \nusing System.Diagnostics;\nusing ApiVideo.Client;\n\nnamespace Example\n\ + {\n public class updateExample\n {\n public static void Main()\n\ + \ {\n var basePath = ApiVideoClient.Client.Environment.SANDBOX;\n\ + \ var apiKey = \"YOUR_API_KEY\";\n\n var apiInstance\ + \ = new ApiVideoClient(apiKey,basePath);\n\n var videoId =\ + \ vi4k0jvEUuaTdRAEjQ4Jfrgz; // string | The video ID for the video you\ + \ want to delete.\n var videoUpdatePayload = new VideoUpdatePayload();\ + \ // VideoUpdatePayload | \n var apiVideosInstance = apiInstance.Videos();\n\ + \ try\n {\n // Update a video\n \ + \ Video result = apiVideosInstance.update(videoId, videoUpdatePayload);\n\ + \ Debug.WriteLine(result);\n }\n \ + \ catch (ApiException e)\n {\n Debug.Print(\"\ + Exception when calling VideosApi.update: \" + e.Message );\n \ + \ Debug.Print(\"Status Code: \"+ e.ErrorCode);\n \ + \ Debug.Print(e.StackTrace);\n }\n }\n }\n}\n" + - language: php + code: "videos()->update($videoId, (new \\ApiVideo\\\ + Client\\Model\\VideoUpdatePayload())\n ->setPlayerId(\"pl4k0jvEUuaTdRAEjQ4Jfrgz\"\ + ) // The unique ID for the player you want to associate with your video.\n\ + \ ->setTitle(\"The new title\") // The title you want to use for your\ + \ video.\n ->setDescription(\"A new description\") // A brief description\ + \ of the video.\n ->setPublic(false) // Whether the video is publicly\ + \ available or not. False means it is set to private.\n ->setPanoramic(false)\ + \ // Whether the video is a 360 degree or immersive video.\n ->setMp4Support(true)\ + \ // Whether the player supports the mp4 format.\n ->setTags([\"tag1\"\ + , \"tag2\"]) // A list of terms or words you want to tag the video with.\ + \ Make sure the list includes all the tags you want as whatever you send\ + \ in this list will overwrite the existing list for the video.\n ->setMetadata(array(\ + \ // A list (array) of dictionaries where each dictionary contains a key\ + \ value pair that describes the video. As with tags, you must send the\ + \ complete list of metadata you want as whatever you send here will overwrite\ + \ the existing metadata for the video.\n new \\ApiVideo\\Client\\\ + Model\\Metadata([\"key\" => \"aa\", 'value' => \"bb\"]),\n new\ + \ \\ApiVideo\\Client\\Model\\Metadata([\"key\" => \"aa2\", 'value' =>\ + \ \"bb2\"])))); " + - language: swift + code: "// First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started\n\ + // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#update\ + \ \n" + x-contentType: application/json + x-accepts: application/json + /discarded/videos: + get: + description: List all the video objects that are associated with the current + workspace. + operationId: LIST-discarded-videos + parameters: + - description: The title of a specific video you want to find. The search will + match exactly to what term you provide and return any videos that contain + the same term as part of their titles. + example: My Video.mp4 + explode: true + in: query + name: title + required: false + schema: + type: string + style: form + - description: A tag is a category you create and apply to videos. You can search + for videos with particular tags by listing one or more here. Only videos + that have all the tags you list will be returned. + example: '["captions", "dialogue"]' + explode: true + in: query + name: tags[] + required: false + schema: + items: + type: string + type: array + style: form + - description: Videos can be tagged with metadata tags in key:value pairs. You + can search for videos with specific key value pairs using this parameter. + example: metadata[Author]=John Doe&metadata[Format]=Tutorial + explode: true + in: query + name: metadata + required: false + schema: + additionalProperties: + type: string + type: object + style: deepObject + x-is-deep-object: true + - description: Retrieve video objects by `description`. + example: New Zealand + explode: true + in: query + name: description + required: false + schema: + type: string + style: form + - description: Retrieve video objects that were recorded from a live stream + by `liveStreamId`. + example: li400mYKSgQ6xs7taUeSaEKr + explode: true + in: query + name: liveStreamId + required: false + schema: + type: string + style: form + - description: Use this parameter to sort videos by the their created time, + published time, updated time, or by title. + example: publishedAt + explode: true + in: query + name: sortBy + required: false + schema: + enum: + - title + - createdAt + - publishedAt + - updatedAt + type: string + style: form + - description: Use this parameter to sort results. `asc` is ascending and sorts + from A to Z. `desc` is descending and sorts from Z to A. + example: asc + explode: true + in: query + name: sortOrder + required: false + schema: + enum: + - asc + - desc + type: string + style: form + - description: 'Choose the number of search results to return per page. Minimum + value: 1' + example: 2 + explode: true + in: query + name: currentPage + required: false + schema: + default: 1 + type: integer + style: form + - description: Results per page. Allowed values 1-100, default is 25. + example: 30 + explode: true + in: query + name: pageSize + required: false + schema: + default: 25 + type: integer + style: form + responses: + "200": + content: + application/json: + examples: + response: + value: + data: + - videoId: vi4blUQJFrYWbaG44NChkH27 + playerId: pl45KFKdlddgk654dspkze + title: Maths video + description: An amazing video explaining the string theory + public: false + panoramic: false + mp4Support: true + tags: + - maths + - string theory + - video + metadata: + - key: Author + value: John Doe + - key: Format + value: Tutorial + publishedAt: 2019-12-16T08:25:51+00:00 + updatedAt: 2019-12-16T08:48:49+00:00 + discarded: true + discardedAt: 2024-10-16T08:48:49+00:00 + deletesAt: 2024-11-16T08:48:49+00:00 + source: + uri: /videos/c188ed58-3403-46a2-b91b-44603d10b2c9/source + assets: null + - videoId: vi4blUQJFrYWbaG44NChkH27 + title: Video Title + description: A description for your video. + public: false + panoramic: false + mp4Support: true + tags: + - books + - short stories + metadata: + - key: Author + value: John Doe + - key: Science Fiction + value: Cyberpunk + - key: Technology + value: Computers + publishedAt: 2019-12-16T08:25:51+00:00 + updatedAt: 2019-12-16T08:48:49+00:00 + discarded: true + discardedAt: 2024-10-16T08:48:49+00:00 + deletesAt: 2024-11-16T08:48:49+00:00 + source: + uri: /videos/vi4blUQJFrYWbaG44NChkH27/source + assets: null + - videoId: vi4blUQJFrYWbaG44NChkH27 + playerId: pl45KFKdlddgk654dspkze + title: My Video Title + description: A brief description of the video. + public: false + panoramic: false + mp4Support: true + tags: + - General + - Videos + metadata: + - key: Length + value: Short + publishedAt: 2019-12-16T08:25:51+00:00 + updatedAt: 2019-12-16T08:48:49+00:00 + discarded: true + discardedAt: 2024-10-16T08:48:49+00:00 + deletesAt: 2024-11-16T08:48:49+00:00 + source: + uri: /videos/vi4blUQJFrYWbaG44NChkH27/source + assets: null + pagination: + currentPage: 1 + pageSize: 25 + pagesTotal: 1 + itemsTotal: 11 + currentPageItems: 11 + links: + - rel: self + uri: https://ws.api.video/videos?currentPage=1 + - rel: first + uri: https://ws.api.video/videos?currentPage=1 + - rel: last + uri: https://ws.api.video/videos?currentPage=1 + schema: + $ref: '#/components/schemas/videos-list-response' + description: Success + headers: + X-RateLimit-Limit: + description: The request limit per minute. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Remaining: + description: The number of available requests left for the current time + window. + explode: false + schema: + type: integer + style: simple + X-RateLimit-Retry-After: + description: The number of seconds left until the current rate limit + window resets. + explode: false + schema: + type: integer + style: simple + "400": content: application/json: examples: response: value: - type: https://docs.api.video/reference/resource-not-found - title: The requested resource was not found. - name: videoId - status: 404 + title: This parameter is out of the allowed range of values. + name: page + status: 400 + range: + min: 1 + problems: + - title: This parameter is out of the allowed range of values. + name: page + range: + min: 1 + - title: This parameter is out of the allowed range of values. + name: pageSize + range: + min: 10 + max: 100 schema: - $ref: '#/components/schemas/not-found' - description: Not Found + $ref: '#/components/schemas/bad-request' + description: Bad Request headers: X-RateLimit-Limit: description: The request limit per minute. @@ -2674,102 +3701,116 @@ paths: style: simple security: - apiKey: [] - summary: Delete a video object + summary: List all discarded video objects tags: - Videos x-client-description: - default: If you do not need a video any longer, you can send a request to - delete it. All you need is the videoId. - x-client-action: delete + default: This method returns a list of your discarded videos (with all their + details). With no parameters added, the API returns the first page of all + discarded videos. You can filter discarded videos using the parameters described + below. x-doctave: code-samples: - - language: go - code: "// First install the go client with \"go get github.com/apivideo/api.video-go-client\"\ - \n// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#delete\n\ - \npackage main\nimport (\n \"context\"\n \"fmt\"\n \"os\"\n \ - \ apivideosdk \"github.com/apivideo/api.video-go-client\"\n)\nfunc main()\ - \ {\n client := apivideosdk.ClientBuilder(\"YOUR_API_KEY\").Build()\n\ - \ // if you rather like to use the sandbox environment:\n // client\ - \ := apivideosdk.SandboxClientBuilder(\"YOUR_SANDBOX_API_KEY\").Build()\n\ - \ \n videoId := \"vi4k0jvEUuaTdRAEjQ4Jfrgz\" // string | The\ - \ video ID for the video you want to delete.\n err := client.Videos.Delete(videoId)\n\ - \ if err != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling\ - \ `Videos.Delete``: %v\\\n\", err)\n }\n} \n" - - language: node - code: "// First install the \"@api.video/nodejs-client\" npm package\n//\ - \ Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#delete\n\ - \nconst client = new ApiVideoClient({ apiKey: \"YOUR_API_KEY\" });\n\n\ - const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // the id of the video to\ - \ delete\nawait client.videos.delete(videoId); \n" - - language: python + - language: php code: | - # First install the api client with "pip install api.video" - # Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/VideosApi.md#delete + delete: %s\n" % e) + require __DIR__ . '/vendor/autoload.php'; + + + $client = new \ApiVideo\Client\Client( + 'https://ws.api.video', + 'YOUR_API_KEY', + new \Symfony\Component\HttpClient\Psr18Client() + ); + + // list all videos (all pages) + $allVideos = []; + do { + $currentPage = $client->videos()->list([]); + $allVideos = array_merge($allVideos, $currentPage->getData()); + } while($currentPage->getPagination()->getCurrentPage() < $currentPage->getPagination()->getPagesTotal()); + + // list videos that have all the given tags (only first results page) + $videosWithTag = $client->videos()->list(['tags' => ['TAG2','TAG1']]); + + // list videos that have all the given metadata values (only first results page) + $videosWithMetadata = $client->videos()->list(['metadata' => ['key1' => 'key1value1', 'key2' => 'key2value1']]); - language: java - code: "// First add the \"video.api:java-api-client\" maven dependency to\ - \ your project\n// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#delete\n\ - \nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ - import video.api.client.api.models.*;\nimport video.api.client.api.clients.VideosApi;\n\ - import java.util.*;\n \npublic class Example {\n public static void\ - \ main(String[] args) {\n ApiVideoClient client = new ApiVideoClient(\"\ - YOUR_API_KEY\");\n // if you rather like to use the sandbox environment:\n\ - \ // ApiVideoClient client = new ApiVideoClient(\"YOUR_SANDBOX_API_KEY\"\ - , ApiVideoClient.Environment.SANDBOX);\n \n VideosApi apiInstance\ - \ = client.videos();\n \n String videoId = \"vi4k0jvEUuaTdRAEjQ4Jfrgz\"\ - ; // The video ID for the video you want to delete.\n \n try {\n\ - \ apiInstance.delete(videoId);\n } catch (ApiException e) {\n\ - \ System.err.println(\"Exception when calling VideosApi#delete\"\ - );\n System.err.println(\"Status code: \" + e.getCode());\n \ - \ System.err.println(\"Reason: \" + e.getMessage());\n System.err.println(\"\ - Response headers: \" + e.getResponseHeaders());\n e.printStackTrace();\n\ - \ }\n }\n}\n" + code: |- + // First add the "video.api:java-api-client" maven dependency to your project + // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#list + + ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY"); + VideosApi videosApi = client.videos(); + + // list all videos (all pages) + Page