diff --git a/oas_apivideo.yaml b/oas_apivideo.yaml index 07e3345d..69e3e24c 100644 --- a/oas_apivideo.yaml +++ b/oas_apivideo.yaml @@ -193,7 +193,7 @@ paths: example: '["captions", "dialogue"]' - name: metadata in: query - 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.' + 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.' required: false style: deepObject x-is-deep-object: true @@ -283,8 +283,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: @@ -309,8 +312,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: @@ -332,8 +338,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: @@ -568,7 +577,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: @@ -627,7 +639,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. @@ -979,7 +991,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: @@ -1328,7 +1343,7 @@ paths: response: value: watermarkId: watermark_1BWr2L5MTQwxGkuxKjzh6i - createdAt: '2020-03-03T12:52:03.085Z' + createdAt: '2020-03-03T12:52:03+00:00' '400': headers: X-RateLimit-Limit: @@ -1617,9 +1632,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 @@ -1963,8 +1978,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: @@ -2291,7 +2309,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: @@ -2590,8 +2611,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/vi4blUQJFrYWbaG44NChkH27/source assets: @@ -2791,45 +2815,1006 @@ paths: } } - language: php - code: |- + 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 + delete: + tags: + - Videos + summary: Delete a video object + description: | + Delete a video object by video ID. + + 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-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' + operationId: DELETE-video + parameters: + - name: videoId + in: path + description: The video ID for the video you want to delete. + required: true + style: simple + explode: false + schema: + type: string + example: vi4k0jvEUuaTdRAEjQ4Jfrgz + responses: + '204': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: No Content + '404': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/not-found' + examples: + response: + value: + type: 'https://docs.api.video/reference/resource-not-found' + title: The requested resource was not found. + name: videoId + status: 404 + '429': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Too Many Requests + content: + application/json: + schema: + $ref: '#/components/schemas/too-many-requests' + examples: + Too many requests: + value: + type: 'https://docs.api.video/reference/too-many-requests' + title: Too many requests. + status: 429 + security: + - apiKey: [] + 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" + // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#delete + + package main + import ( + "context" + "fmt" + "os" + apivideosdk "github.com/apivideo/api.video-go-client" + ) + func main() { + client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build() + // if you rather like to use the sandbox environment: + // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build() + + videoId := "vi4k0jvEUuaTdRAEjQ4Jfrgz" // string | The video ID for the video you want to delete. + err := client.Videos.Delete(videoId) + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `Videos.Delete``: %v\ + ", err) + } + } + - language: node + code: | + // First install the "@api.video/nodejs-client" npm package + // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#delete + + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); + + const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // the id of the video to delete + await client.videos.delete(videoId); + - 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 + // Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/VideosApi.md#delete + + import video.api.client.ApiVideoClient; + import video.api.client.api.ApiException; + import video.api.client.api.models.*; + import video.api.client.api.clients.VideosApi; + import java.util.*; + + public class Example { + public static void main(String[] args) { + ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY"); + // if you rather like to use the sandbox environment: + // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX); + + VideosApi apiInstance = client.videos(); + + String videoId = "vi4k0jvEUuaTdRAEjQ4Jfrgz"; // The video ID for the video you want to delete. + + try { + apiInstance.delete(videoId); + } catch (ApiException e) { + System.err.println("Exception when calling VideosApi#delete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getMessage()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } + } + - language: csharp + code: | + // First add the "ApiVideo" NuGet package to your project + // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#delete + + using System.Diagnostics; + using ApiVideo.Client; + + namespace Example + { + public class deleteExample + { + public static void Main() + { + var basePath = ApiVideoClient.Client.Environment.SANDBOX; + var apiKey = "YOUR_API_KEY"; + var apiInstance = new ApiVideoClient(apiKey,basePath); + var videoId = vi4k0jvEUuaTdRAEjQ4Jfrgz; // string | The video ID for the video you want to delete. + var apiVideosInstance = apiInstance.Videos(); + try + { + // Delete a video + apiVideosInstance.delete(videoId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling VideosApi.delete: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } + } + - 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 + patch: + tags: + - Videos + summary: Update a video object + description: Update the parameters associated with a video ID. + 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. + + NOTE: 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. + operationId: PATCH-video + parameters: + - name: videoId + in: path + description: The video ID for the video you want to update. + required: true + style: simple + explode: false + schema: + type: string + example: vi4k0jvEUuaTdRAEjQ4Jfrgz + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/video-update-payload' + responses: + '200': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/video' + 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' + '400': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/bad-request' + 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 + '404': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/not-found' + examples: + response: + value: + type: 'https://docs.api.video/reference/resource-not-found' + title: The requested resource was not found. + name: videoId + status: 404 + '429': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Too Many Requests + content: + application/json: + schema: + $ref: '#/components/schemas/too-many-requests' + examples: + Too many requests: + value: + type: 'https://docs.api.video/reference/too-many-requests' + title: Too many requests. + status: 429 + security: + - apiKey: [] + 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" + // Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/VideosApi.md#update + + package main + + import ( + "context" + "fmt" + "os" + apivideosdk "github.com/apivideo/api.video-go-client" + ) + + func main() { + client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build() + // if you rather like to use the sandbox environment: + // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build() + + videoId := "vi4k0jvEUuaTdRAEjQ4Jfrgz" // string | The video ID for the video you want to delete. + videoUpdatePayload := *apivideosdk.NewVideoUpdatePayload() // VideoUpdatePayload | + + + res, err := client.Videos.Update(videoId, videoUpdatePayload) + + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `Videos.Update``: %v\ + ", err) + } + // response from `Update`: Video + fmt.Fprintf(os.Stdout, "Response from `Videos.Update`: %v\ + ", res) + } + - language: node + code: | + // First install the "@api.video/nodejs-client" npm package + // Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/VideosApi.md#update + + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); + + const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The video ID for the video you want to update. + + // define the value you want to update + const videoUpdatePayload = { + playerId: "pl4k0jvEUuaTdRAEjQ4Jfrgz", // The unique ID for the player you want to associate with your video. + title: "title_example", // The title you want to use for your video. + description: "A film about good books.", // A brief description of the video. + _public: true, // Whether the video is publicly available or not. False means it is set to private. + panoramic: false, // Whether the video is a 360 degree or immersive video. + mp4Support: true, // Whether the player supports the mp4 format. + 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. + 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. + }; + + + const updatedVideo = await client.videos.update(videoId, videoUpdatePayload); + - 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#update + + import apivideo + from apivideo.api import videos_api + from apivideo.model.video_update_payload import VideoUpdatePayload + from apivideo.model.bad_request import BadRequest + 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 = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | The video ID for the video you want to delete. + video_update_payload = VideoUpdatePayload( + player_id="pl4k0jvEUuaTdRAEjQ4Jfrgz", + title="title_example", + description="A film about good books.", + public=True, + panoramic=False, + mp4_support=True, + tags=["maths", "string theory", "video"], + metadata=[ + Metadata( + key="Color", + value="Green", + ), + ], + ) # VideoUpdatePayload | + + # example passing only required values which don't have defaults set + try: + # Update a video + api_response = api_instance.update(video_id, video_update_payload) + pprint(api_response) + except apivideo.ApiException as e: + print("Exception when calling VideosApi->update: %s\ + " % e) + - language: java + 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#update + + import video.api.client.ApiVideoClient; + import video.api.client.api.ApiException; + import video.api.client.api.models.*; + import video.api.client.api.clients.VideosApi; + import java.util.*; + + public class Example { + public static void main(String[] args) { + ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY"); + // if you rather like to use the sandbox environment: + // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX); + + VideosApi apiInstance = client.videos(); + + String videoId = "vi4k0jvEUuaTdRAEjQ4Jfrgz"; // The video ID for the video you want to delete. + VideoUpdatePayload videoUpdatePayload = new VideoUpdatePayload(); // + videoUpdatePayload.setPlayerId("pl4k0jvEUuaTdRAEjQ4Jfrgz"); // The unique ID for the player you want to associate with your video. + videoUpdatePayload.setTitle("null"); // The title you want to use for your video. + videoUpdatePayload.setDescription("A film about good books."); // A brief description of the video. + videoUpdatePayload.setPublic(true); // Whether the video is publicly available or not. False means it is set to private. + videoUpdatePayload.setPanoramic(false); // Whether the video is a 360 degree or immersive video. + videoUpdatePayload.setMp4Support(true); // Whether the player supports the mp4 format. + 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. + 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. + + + try { + Video result = apiInstance.update(videoId, videoUpdatePayload); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling VideosApi#update"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getMessage()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } + } + - language: csharp + code: | + // First add the "ApiVideo" NuGet package to your project + // Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/VideosApi.md#update + + using System.Diagnostics; + using ApiVideo.Client; + + namespace Example + { + public class updateExample + { + public static void Main() + { + var basePath = ApiVideoClient.Client.Environment.SANDBOX; + var apiKey = "YOUR_API_KEY"; + + var apiInstance = new ApiVideoClient(apiKey,basePath); + + var videoId = vi4k0jvEUuaTdRAEjQ4Jfrgz; // string | The video ID for the video you want to delete. + var videoUpdatePayload = new VideoUpdatePayload(); // VideoUpdatePayload | + var apiVideosInstance = apiInstance.Videos(); + try + { + // Update a video + Video result = apiVideosInstance.update(videoId, videoUpdatePayload); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling VideosApi.update: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } + } + - language: php + code: |- + videos()->update($videoId, (new \ApiVideo\Client\Model\VideoUpdatePayload()) + ->setPlayerId("pl4k0jvEUuaTdRAEjQ4Jfrgz") // The unique ID for the player you want to associate with your video. + ->setTitle("The new title") // The title you want to use for your video. + ->setDescription("A new description") // A brief description of the video. + ->setPublic(false) // Whether the video is publicly available or not. False means it is set to private. + ->setPanoramic(false) // Whether the video is a 360 degree or immersive video. + ->setMp4Support(true) // Whether the player supports the mp4 format. + ->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. + ->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. + new \ApiVideo\Client\Model\Metadata(["key" => "aa", 'value' => "bb"]), + 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 + // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#update + /discarded/videos: + get: + tags: + - Videos + summary: List all discarded video objects + description: List all the video objects that are associated with the current workspace. + x-client-description: + 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.' + operationId: LIST-discarded-videos + parameters: + - name: title + in: query + 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. + required: false + style: form + explode: true + schema: + type: string + example: My Video.mp4 + - name: 'tags[]' + in: query + 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. + required: false + style: form + explode: true + schema: + type: array + items: + type: string + example: '["captions", "dialogue"]' + - name: metadata + in: query + 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.' + required: false + style: deepObject + x-is-deep-object: true + explode: true + schema: + type: object + additionalProperties: + type: string + example: 'metadata[Author]=John Doe&metadata[Format]=Tutorial' + - name: description + in: query + description: 'Retrieve video objects by `description`.' + required: false + style: form + explode: true + schema: + type: string + example: New Zealand + - name: liveStreamId + in: query + description: 'Retrieve video objects that were recorded from a live stream by `liveStreamId`.' + required: false + style: form + explode: true + schema: + type: string + example: li400mYKSgQ6xs7taUeSaEKr + - name: sortBy + in: query + description: 'Use this parameter to sort videos by the their created time, published time, updated time, or by title.' + required: false + style: form + explode: true + schema: + type: string + enum: [title, createdAt, publishedAt, updatedAt] + example: publishedAt + - name: sortOrder + in: query + 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.' + required: false + style: form + explode: true + schema: + type: string + enum: [asc, desc] + example: asc + - $ref: '#/components/parameters/current-page' + - $ref: '#/components/parameters/page-size' + responses: + '200': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/videos-list-response' + 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: + - 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: + - 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: + 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' + '400': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/bad-request' + examples: + response: + value: + 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 + '429': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Too Many Requests + content: + application/json: + schema: + $ref: '#/components/schemas/too-many-requests' + examples: + Too many requests: + value: + type: 'https://docs.api.video/reference/too-many-requests' + title: Too many requests. + status: 429 + security: + - apiKey: [] + x-doctave: + code-samples: + - language: php + code: | videos()->getStatus($videoId); + // 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 + // 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