openapi: 3.0.0 info: description: api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes. title: api.video version: "1" servers: - description: Production server url: https://ws.api.video - description: Test server `all videos are watermarked, and deleted after 24 hours. url: https://sandbox.api.video paths: /auth/api-key: post: description: |- To get started, submit your API key in the body of your request. api.video returns an access token that is valid for one hour (3600 seconds). A refresh token is also returned. View a [tutorial](https://api.video/blog/tutorials/authentication-tutorial) on authentication. All tutorials using the [authentication endpoint](https://api.video/blog/endpoints/authenticate) operationId: POST_auth-api-key requestBody: content: application/json: schema: $ref: '#/components/schemas/authenticate-payload' required: true responses: "200": content: application/json: examples: response: value: token_type: Bearer expires_in: 3600 access_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjUyZWM4NWUyMjFkODZjOWI0NDQ5NzBhMjQwMzUyOWQ4MDQyNGQ3ZmJjYjFlYWM2MjVlM2VkMjI2YWRlNTcxMDY2NDUyZDc0NjdhN2E4NjI0In0.eyJhdWQiOiJsaWJjYXN0IiwianRpIjoiNTJlYzg1ZTIyMWQ4NmM5YjQ0NDk3MGEyNDAzNTI5ZDgwNDI0ZDdmYmNiMWVhYzYyNWUzZWQyMjZhZGU1NzEwNjY0NTJkNzQ2N2E3YTg2MjQiLCJpYXQiOjE1MjUyNzYxNDcsIm5iZiI6MTUyNTI3NjE0NywiZXhwIjoxNTI1Mjc5NzQ3LCJzdWIiOiJ1c01vbml0b3IiLCJzY29wZXMiOlsibW9uaXRvci5saWJjYXN0LmNvbSJdLCJjb250ZXh0Ijp7InVzZXIiOiJ1c01vbml0b3IiLCJwcm9qZWN0IjoicHJNb25pdG9yIiwibWVtYmVyIjoibWVNb25pdG9yIn19.rUvishDNyJLNlI4W5VmguNecm5KD2uZgPkKJQbaqw-cJbSrVxkSbiKYtk_E3cz3WT7-IS2yFTsYN3uIo5Rbit8_HftweyEp2bdBRI8yjR6oZZ1sNJJXswISN1i2kk4r-aaxu7Xxf_LtsjOMUj_YZsvcc2nqBXPKjHbJCJryx3DDJaIcymOqao7nhQaCCQyrQooAXNTYs4E9fWN1dC_x2O-zok5TuG-xhEW-umwxfSUMWNgSTkz38ACceQ0PCJSgB3jqjDH4MwC7B3ppEPZuK5E6JhKeyRlalswRyYq3UQPnVeMTam7YQHsuTgbehF6WySW8i44o7V_MCe9hjPdp-WA refresh_token: def50200a28d88fb9aaa921be78eeb5604b071101a334899a7d5fc7492cf8ea752962ddc8961fe5c126101d4ecacd980396eb2fd494995b812dffcb98256c4277f790d1f658fc2d2e34f350740544e5232d69d68d34c648271d706c5e7049adac0b1832d0fdf71809715cc7e97fa63f65966deadb501a55ff469b0fd23a637cb6acbe9d9b8594a17f09efc2efeed82984764a0065d5e29c950c7b081a61ba2aaa192be3085c400ee37eac50fa9320ce2cfe8916c8165418d23e9f91b6a5c8515e1d74ee193a5a1ca01954fbff27361c20184240be2359e0afbed0bf1c762cf872450b5e8b5d4704f4fd9583e4470adc98409dd42965709712806bd9019378a72eea0b4912ce684ffd833db5806ab84174f905db2a75380071d004615c944bb8f8c4045cce7234c2be9a2330522cf7f067b8e58f57cffb6edb4b7ef91313e12bcde47e5e76ceee7fa52990132288f345d33ed917ae4fd54b7284f8964d898e97e1ee3bc4157f75d7fee63976e4be66ac1ec32ef74afa533f0eb593523f226cbec57d196ac8962 schema: $ref: '#/components/schemas/access-token' description: Success "400": content: application/json: examples: response: value: type: https://docs.api.video/docs/authenticationinvalid_credentials title: The user credentials were incorrect. name: "" status: 400 schema: $ref: '#/components/schemas/bad-request' description: Bad Request summary: Authenticate tags: - Authentication x-client-action: authenticate x-client-hidden: true x-readme: code-samples: - language: go code: | //With the api.video API clients, authentication is taken care of with each client created. // You get to skip this step! - language: node code: | //With the api.video API clients, authentication is taken care of with each client created. // You get to skip this step! - language: php code: | //With the api.video API clients, authentication is taken care of with each client created. // You get to skip this step! - language: python code: | #With the api.video API clients, authentication is taken care of with each client created. # You get to skip this step! - language: java code: | //With the api.video API clients, authentication is taken care of with each client created. // You get to skip this step! - language: csharp code: | //With the api.video API clients, authentication is taken care of with each client created. // You get to skip this step! /auth/refresh: post: description: "Use the refresh endpoint with the refresh token you received when\ \ you first authenticated using the api-key endpoint. Send the refresh token\ \ in the body of your request. The api.video API returns a new access token\ \ that is valid for one hour (3600 seconds) and a new refresh token. \n" operationId: POST_auth-refresh requestBody: content: application/json: schema: $ref: '#/components/schemas/refresh-token-payload' required: true responses: "200": content: application/json: examples: response: value: token_type: Bearer expires_in: 3600 access_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjUyZWM4NWUyMjFkODZjOWI0NDQ5NzBhMjQwMzUyOWQ4MDQyNGQ3ZmJjYjFlYWM2MjVlM2VkMjI2YWRlNTcxMDY2NDUyZDc0NjdhN2E4NjI0In0.eyJhdWQiOiJsaWJjYXN0IiwianRpIjoiNTJlYzg1ZTIyMWQ4NmM5YjQ0NDk3MGEyNDAzNTI5ZDgwNDI0ZDdmYmNiMWVhYzYyNWUzZWQyMjZhZGU1NzEwNjY0NTJkNzQ2N2E3YTg2MjQiLCJpYXQiOjE1MjUyNzYxNDcsIm5iZiI6MTUyNTI3NjE0NywiZXhwIjoxNTI1Mjc5NzQ3LCJzdWIiOiJ1c01vbml0b3IiLCJzY29wZXMiOlsibW9uaXRvci5saWJjYXN0LmNvbSJdLCJjb250ZXh0Ijp7InVzZXIiOiJ1c01vbml0b3IiLCJwcm9qZWN0IjoicHJNb25pdG9yIiwibWVtYmVyIjoibWVNb25pdG9yIn19.rUvishDNyJLNlI4W5VmguNecm5KD2uZgPkKJQbaqw-cJbSrVxkSbiKYtk_E3cz3WT7-IS2yFTsYN3uIo5Rbit8_HftweyEp2bdBRI8yjR6oZZ1sNJJXswISN1i2kk4r-aaxu7Xxf_LtsjOMUj_YZsvcc2nqBXPKjHbJCJryx3DDJaIcymOqao7nhQaCCQyrQooAXNTYs4E9fWN1dC_x2O-zok5TuG-xhEW-umwxfSUMWNgSTkz38ACceQ0PCJSgB3jqjDH4MwC7B3ppEPZuK5E6JhKeyRlalswRyYq3UQPnVeMTam7YQHsuTgbehF6WySW8i44o7V_MCe9hjPdp-WA refresh_token: def50200a28d88fb9aaa921be78eeb5604b071101a334899a7d5fc7492cf8ea752962ddc8961fe5c126101d4ecacd980396eb2fd494995b812dffcb98256c4277f790d1f658fc2d2e34f350740544e5232d69d68d34c648271d706c5e7049adac0b1832d0fdf71809715cc7e97fa63f65966deadb501a55ff469b0fd23a637cb6acbe9d9b8594a17f09efc2efeed82984764a0065d5e29c950c7b081a61ba2aaa192be3085c400ee37eac50fa9320ce2cfe8916c8165418d23e9f91b6a5c8515e1d74ee193a5a1ca01954fbff27361c20184240be2359e0afbed0bf1c762cf872450b5e8b5d4704f4fd9583e4470adc98409dd42965709712806bd9019378a72eea0b4912ce684ffd833db5806ab84174f905db2a75380071d004615c944bb8f8c4045cce7234c2be9a2330522cf7f067b8e58f57cffb6edb4b7ef91313e12bcde47e5e76ceee7fa52990132288f345d33ed917ae4fd54b7284f8964d898e97e1ee3bc4157f75d7fee63976e4be66ac1ec32ef74afa533f0eb593523f226cbec57d196ac8962 schema: $ref: '#/components/schemas/access-token' description: Success "400": content: application/json: examples: response: value: status: 400 type: https://docs.api.video/docs/authenticationinvalid_credentials title: The user credentials were incorrect. name: "" schema: $ref: '#/components/schemas/bad-request' description: Bad Request summary: Refresh token tags: - Authentication x-client-action: refresh x-client-hidden: true x-readme: code-samples: - language: go code: | //With the api.video API clients, authentication is taken care of with each client created. // You get to skip this step! - language: node code: | //With the api.video API clients, authentication is taken care of with each client created. // You get to skip this step! - language: php code: | //With the api.video API clients, authentication is taken care of with each client created. // You get to skip this step! - language: python code: | #With the api.video API clients, authentication is taken care of with each client created. # You get to skip this step! - language: java code: | //With the api.video API clients, authentication is taken care of with each client created. // You get to skip this step! - language: csharp code: | //With the api.video API clients, authentication is taken care of with each client created. // You get to skip this step! /videos: get: description: Requests to this endpoint return a list of your videos (with all their details). With no parameters added to this query, the API returns all videos. You can filter what videos the API returns using the parameters described below. We have [several tutorials](https://api.video/blog/endpoints/video-list) that demonstrate this endpoint. operationId: LIST-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. [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 name: metadata required: false schema: additionalProperties: type: string type: object style: deepObject x-is-deep-object: true - description: If you described a video with a term or sentence, you can add it here to return videos containing this string. example: New Zealand explode: true in: query name: description required: false schema: type: string style: form - description: If you know the ID for a live stream, you can retrieve the stream by adding the ID for it here. example: li400mYKSgQ6xs7taUeSaEKr explode: true in: query name: liveStreamId required: false schema: type: string style: form - description: 'Allowed: publishedAt, title. You can search by the time videos were published at, or by title.' example: publishedAt explode: true in: query name: sortBy required: false schema: type: string style: form - description: 'Allowed: asc, desc. 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: 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 source: uri: /videos/c188ed58-3403-46a2-b91b-44603d10b2c9/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/1080/source.mp4 - 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 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/1080/source.mp4 - 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 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/1080/source.mp4 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 "400": content: application/json: 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 schema: $ref: '#/components/schemas/bad-request' description: Bad Request security: - bearerAuth: [] summary: List all videos tags: - Videos x-readme: code-samples: - language: php code: | 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']]); x-client-action: list x-group-parameters: true x-client-paginated: true x-optional-object: true post: description: |2 ## We have tutorials on: * [Creating and uploading videos](https://api.video/blog/tutorials/video-upload-tutorial) * [Uploading large videos](https://api.video/blog/tutorials/video-upload-tutorial-large-videos) * [Using tags with videos](https://api.video/blog/tutorials/video-tagging-best-practices) * [Private videos](https://api.video/blog/tutorials/tutorial-private-videos) * [Using Dynamic Metadata](https://api.video/blog/tutorials/dynamic-metadata) * Full list of [tutorials](https://api.video/blog/endpoints/video-create) that demonstrate this endpoint. operationId: POST-video requestBody: content: application/json: schema: $ref: '#/components/schemas/video-creation-payload' description: video to create required: true responses: "201": content: application/json: examples: response: value: videoId: vi4blUQJFrYWbaG44NChkH27 title: Maths video description: An amazing video explaining the string theory public: false panoramic: false mp4Support: true playerId: pl4k0jvEUuaTdRAEjQ4Jfrgz tags: - maths - string theory - video metadata: - key: Author value: John Doe - key: Format value: Tutorial publishedAt: 4665-07-14T23:36:18.598Z 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/1080/source.mp4 schema: $ref: '#/components/schemas/video' description: Created "202": content: application/json: schema: $ref: '#/components/schemas/video' description: Accepted "400": content: application/json: examples: response: value: type: https://docs.api.video/docs/attributerequired title: This attribute is required. name: title status: 400 problems: - type: https://docs.api.video/docs/attributerequired title: This attribute is required. name: title - type: https://docs.api.video/docs/attributeinvalid title: This attribute must be a ISO8601 date. name: scheduledAt - type: https://docs.api.video/docs/attributeinvalid title: This attribute must be an array. name: tags - type: https://docs.api.video/docs/attributeinvalid title: This attribute must be an array. name: metadata schema: $ref: '#/components/schemas/bad-request' description: Bad Request security: - bearerAuth: [] summary: Create a video tags: - Videos x-client-action: create x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n videoCreationPayload := *apivideosdk.NewVideoCreationPayload(\"\ Maths video\") // VideoCreationPayload | video to create\n\n \n \ \ res, err := client.Videos.Create(videoCreationPayload)\n\n if err\ \ != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling `Videos.Create``:\ \ %v\\n\", err)\n }\n // response from `Create`: Video\n fmt.Fprintf(os.Stdout,\ \ \"Response from `Videos.Create`: %v\\n\", res)\n}\n" - language: node code: "//install the module with npm or yarn\n//npm install @api.video/nodejs-client\ \ --save\n//yarn add @api.video/nodejs-client\nconst client = new ApiVideoClient({\ \ apiKey: \"YOUR_API_TOKEN\" });\nconst videoCreationPayload = {\n title:\ \ \"Maths video\", // The title of your new video.\n description: \"\ A video about string theory.\", // A brief description of your video.\n\ \ source: \"https://www.myvideo.url.com/video.mp4\", // If you add a\ \ video already on the web, this is where you enter the url for the video.\n\ \ _public: true, // Whether your video can be viewed by everyone, or\ \ requires authentication to see it. A setting of false will require a\ \ unique token for each view.\n panoramic: false, // Indicates if your\ \ video is a 360/immersive video.\n mp4Support: true, // Enables mp4\ \ version in addition to streamed version.\n playerId: \"pl45KFKdlddgk654dspkze\"\ , // The unique identification number for your video player.\n tags:\ \ [\"maths\", \"string theory\", \"video\"], // A list of tags you want\ \ to use to describe your video.\n metadata: [{\"key\": \"Author\", \"\ value\": \"John Doe\"}], // A list of key value pairs that you use to\ \ provide metadata for your video. These pairs can be made dynamic, allowing\ \ you to segment your audience. You can also just use the pairs as another\ \ way to tag and categorize your videos.\n}; \n\n// Video\nconst result\ \ = await client.videos.create(videoCreationPayload);\n" - language: php code: | videos()->create((new VideoCreationPayload()) ->setTitle('Video B') ->setTags(array("TAG1", "TAG2")) ->setMetadata(array( new Metadata(['key' => 'key1', 'value' => 'key1value1']), new Metadata(['key' => 'key2', 'value' => 'key2value1'])))); - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import videos_api from apivideo.model.video_creation_payload import VideoCreationPayload from apivideo.model.bad_request import BadRequest 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_creation_payload = VideoCreationPayload( title="Maths video", description="A video about string theory.", source="https://www.myvideo.url.com/video.mp4", public=True, panoramic=False, mp4_support=True, player_id="pl45KFKdlddgk654dspkze", tags=["maths", "string theory", "video"], metadata=[ Metadata( key="Color", value="Green", ), ], ) # VideoCreationPayload | video to create # example passing only required values which don't have defaults set try: # Create a video api_response = api_instance.create(video_creation_payload) pprint(api_response) except apivideo.ApiException as e: print("Exception when calling VideosApi->create: %s\n" % e) - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\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_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n VideosApi apiInstance =\ \ client.videos();\n \n VideoCreationPayload videoCreationPayload\ \ = new VideoCreationPayload(); // video to create\n videoCreationPayload.setTitle(\"\ Maths video\"); // The title of your new video.\n videoCreationPayload.setDescription(\"\ A video about string theory.\"); // A brief description of your video.\n\ \ videoCreationPayload.setSource(\"https://www.myvideo.url.com/video.mp4\"\ ); // If you add a video already on the web, this is where you enter the\ \ url for the video.\n videoCreationPayload.setPublic(true); // Whether\ \ your video can be viewed by everyone, or requires authentication to\ \ see it. A setting of false will require a unique token for each view.\n\ \ videoCreationPayload.setPanoramic(false); // Indicates if your video\ \ is a 360/immersive video.\n videoCreationPayload.setMp4Support(true);\ \ // Enables mp4 version in addition to streamed version.\n videoCreationPayload.setPlayerId(\"\ pl45KFKdlddgk654dspkze\"); // The unique identification number for your\ \ video player.\n videoCreationPayload.setTags(Arrays.asList(\"maths\"\ , \"string theory\", \"video\")); // A list of tags you want to use to\ \ describe your video.\n videoCreationPayload.setMetadata(Collections.emptyList());\ \ // A list of key value pairs that you use to provide metadata for your\ \ video. These pairs can be made dynamic, allowing you to segment your\ \ audience. You can also just use the pairs as another way to tag and\ \ categorize your videos.\n\n\n try {\n Video result = apiInstance.create(videoCreationPayload);\n\ \ System.out.println(result);\n } catch (ApiException e) {\n \ \ System.err.println(\"Exception when calling VideosApi#create\");\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: | //install via Nuget //Install-Package ApiVideo using System.Diagnostics; using ApiVideo.Client; namespace Example { public class createExample { public static void Main() { var basePath = ApiVideoClient.Client.Environment.SANDBOX; var apiKey = "YOUR_API_KEY"; var apiInstance = new ApiVideoClient(apiKey,basePath); var videoCreationPayload = new VideoCreationPayload(); // VideoCreationPayload | video to create var apiVideosInstance = apiInstance.Videos(); try { // Create a video Video result = apiVideosInstance.create(videoCreationPayload); Debug.WriteLine(result); } catch (ApiException e) { Debug.Print("Exception when calling VideosApi.create: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } } } /videos/{videoId}/source: post: description: "To upload a video to the videoId you created. Replace {videoId}\ \ with the id you'd like to use, {access_token} with your token, and /path/to/video.mp4\ \ with the path to the video you'd like to upload. You can only upload your\ \ video to the videoId once.\nWe offer 2 types of upload: \n* Regular upload\ \ \n* Progressive upload\nThe latter allows you to split a video source into\ \ X chunks and send those chunks independently (concurrently or sequentially).\ \ The 2 main goals for our users are to\n * allow the upload of video sources\ \ > 200 MiB (200 MiB = the max. allowed file size for regular upload)\n *\ \ allow to send a video source \"progressively\", i.e., before before knowing\ \ the total size of the video.\n Once all chunks have been sent, they are\ \ reaggregated to one source file. The video source is considered as \"completely\ \ sent\" when the \"last\" chunk is sent (i.e., the chunk that \"completes\"\ \ the upload).\n```bash\ncurl https://ws.api.video/videos/{videoId}/source\ \ \\\n -H 'Authorization: Bearer {access_token}' \\\n -F file=@/path/to/video.mp4\n\ \n ```\nTutorials using [video upload](https://api.video/blog/endpoints/video-upload)." operationId: POST_videos-videoId-source parameters: - description: Enter the videoId you want to use to upload your video. example: vi4k0jvEUuaTdRAEjQ4Jfrgz explode: false in: path name: videoId required: true schema: type: string style: simple - description: "Content-Range can be used if you want to split your file. You\ \ can do this by parts, or by chunk.\n* If you split your file by parts\ \ (recommended option), the `Content-Range` header value must match the\ \ following pattern: `part /`:\n * `` is a positive\ \ integer representing the part number. The first sequential part number\ \ is always 1.\n * `` is a positive integer representing the\ \ total parts of the video source. It can also be `*` if or as long as it\ \ is unknown. Technically, this value is required only one time and cannot\ \ differ in several requests.\n* If you split your file by bytes, bear in\ \ mind byte ranges are inclusive, meaning that bytes 0-5242879 represents\ \ the first 5,242,880 bytes in a file or object. Also, the Content-Range\ \ header value must match the following pattern: `bytes -/`:\n\ \ * `` is a positive integer or 0. It represents the range start\ \ (aka lower bound), i.e., the first byte of the chunk compared to the total\ \ bytes composing the full video source. The first sequential range always\ \ starts at 0.\n * `` is a positive integer representing the range\ \ end (aka upper bound), i.e., the last byte of the chunk compared to the\ \ total bytes composing the full video source.\n * `` is a\ \ positive integer representing the total bytes composing the full video\ \ source. It can also be `*` if or as long as it is unknown. Technically,\ \ this value is required only one time and cannot differ in several requests.\n\ * Ordering and chunk or part size\n * The order in which the chunks are\ \ received on our side does not matter. \n * Example: `part 3/*` then\ \ `part 2/*` then `part 1/3` works.\n * The chunks can be sent concurrently.\ \ We have a lock mechanism to ensure they are still technically processed\ \ one by one to ensure the \"completion\" check behaves as expected.\n \ \ * The only chunk that can be smaller than our minimum allowed chunk size\ \ (5 MiB) is the last sequential one (i.e., the last sequential range for\ \ the \"byte-range\" system and the last part for the \"part\" system.\n\ \ * For instance, if your video is 10.5 MiB big, your last chunk would\ \ be 500 KiB, and that would work. \n * Another example is if your video\ \ is 2 MiB big, then your first and last chunk will be 2MiB and that will\ \ work as well.\n" example: bytes 209715200-419430399/524288000 OR part 2/3 explode: false in: header name: Content-Range required: false schema: pattern: /(?:bytes (?\d+)-(?\d+)|part (?\d+))\/(?\d+|\*)/ type: string style: simple x-client-ignore: true requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/video-upload-payload' required: true responses: "201": content: application/json: examples: response: value: videoId: vi4blUQJFrYWbaG44NChkH27 title: Maths video description: An amazing video explaining the string theory. public: false panoramic: false mp4Support: true playerId: pl45KFKdlddgk654dspkze tags: - maths - string theory - video metadata: - key: Author value: John Doe - key: Format value: Tutorial publishedAt: 4665-07-14T23:36:18.598+00:00 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/1080/source.mp4 schema: $ref: '#/components/schemas/video' description: Created "400": content: application/json: examples: response: value: type: https://docs.api.video/docs/filealreadyuploaded title: The source of the video is already uploaded. name: file status: 400 problems: - type: https://docs.api.video/docs/filealreadyuploaded title: The source of the video is already uploaded. name: file - type: https://docs.api.video/docs/filealreadyuploaded title: The video xxxx has already been uploaded. name: video - type: https://docs.api.video/docs/filemissing title: There is no uploaded file in the request. name: file - type: https://docs.api.video/docs/multiplefilesuploaded title: There is more than one uploaded file in the request. name: file schema: $ref: '#/components/schemas/bad-request' description: Bad Request "404": content: application/json: examples: response: value: type: https://docs.api.video/docs/resourcenot_found title: The requested resource was not found. name: videoId status: 404 schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: Upload a video tags: - Videos x-client-action: upload x-client-chunk-upload: true x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n\n videoId := \"vi4k0jvEUuaTdRAEjQ4Jfrgz\" \n // string\ \ | Enter the videoId you want to use to upload your video.\n file\ \ := os.NewFile(1234, \"some_file\") \n // *os.File | The path to the\ \ video you would like to upload. The path must be local. If you want\ \ to use a video from an online source, you must use the \\\\\\\"/videos\\\ \\\\\" endpoint and add the \\\\\\\"source\\\\\\\" parameter when you\ \ create a new video.\n \n \n res, err := client.Videos.UploadFile(videoId,\ \ file)\n \n // you can also use a Reader instead of a File:\n\ \ // client.Videos.Upload(videoId, fileName, fileReader, fileSize)\n\ \ \n if err != nil {\n fmt.Fprintf(os.Stderr, \"Error\ \ when calling `Videos.Upload``: %v\\n\", err)\n }\n // response\ \ from `Upload`: Video\n fmt.Fprintf(os.Stdout, \"Response from `Videos.Upload`:\ \ %v\\n\", res)\n }\n }\n" - language: node code: "//install the module with npm or yarn\n//npm install @api.video/nodejs-client\ \ --save\n//yarn add @api.video/nodejs-client\n(async () => {\n try\ \ {\n const client = new ApiVideoClient({ apiKey: \"YOUR_API_TOKEN\"\ \ });\n \n const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // Enter\ \ the videoId you want to use to upload your video.\n const file\ \ = 'BINARY_DATA_HERE'; // The path to the video you would like to upload.\ \ The path must be local. If you want to use a video from an online source,\ \ you must use the \\\\\\\"/videos\\\\\\\" endpoint and add the \\\\\\\ \"source\\\\\\\" parameter when you create a new video.\n \n \ \ // Video\n const result = await client.videos.upload(videoId,\ \ file);\n console.log(result);\n } catch (e) {\n console.error(e);\n\ \ }\n})();\n" - language: php code: | videos()->create((new VideoCreationPayload())->setTitle('Uploaded video')); $client->videos()->upload($myVideo->getVideoId(), new SplFileObject(__DIR__ . '/../../../tests/resources/558k.mp4')); // create a new video & upload a video file using progressive upload (the file is uploaded by parts) $myVideo2 = $client->videos()->create((new VideoCreationPayload())->setTitle('Uploaded video (progressive upload)')); $progressiveSession = $client->videos()->createUploadProgressiveSession($myVideo2->getVideoId()); $progressiveSession->uploadPart(new SplFileObject(__DIR__ . '/../../../tests/resources/10m.mp4.part.a')); $progressiveSession->uploadPart(new SplFileObject(__DIR__ . '/../../../tests/resources/10m.mp4.part.b')); $progressiveSession->uploadLastPart(new SplFileObject(__DIR__ . '/../../../tests/resources/10m.mp4.part.c')); - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import videos_api from apivideo.model.bad_request import BadRequest from apivideo.model.not_found import NotFound from apivideo.model.video import Video from apivideo.configuration import Configuration from pprint import pprint # Enter a context with an instance of the API client # When uploading a file you can change the chunk size (in octet) configuration = Configuration(chunk_size=10 * 1024 * 1024) with apivideo.AuthenticatedApiClient(__API_KEY__, configuration=configuration) as api_client: # Create an instance of the API class api_instance = videos_api.VideosApi(api_client) video_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | Enter the videoId you want to use to upload your video. file = open('/path/to/file', 'rb') # file_type | The path to the video you would like to upload. The path must be local. If you want to use a video from an online source, you must use the \\\"/videos\\\" endpoint and add the \\\"source\\\" parameter when you create a new video. # example passing only required values which don't have defaults set try: # Upload a video api_response = api_instance.upload(video_id, file) pprint(api_response) except apivideo.ApiException as e: print("Exception when calling VideosApi->upload: %s\n" % e) - language: java code: | //dependency addition instructions //https://github.com/apivideo/api.video-java-client // Import classes: 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_TOKEN"); // if you rather like to use the sandbox environment: // ApiVideoClient client = new ApiVideoClient("YOU_SANDBOX_API_TOKEN", ApiVideoClient.Environment.SANDBOX); VideosApi apiInstance = client.videos(); String videoId = "vi4k0jvEUuaTdRAEjQ4Jfrgz"; // Enter the videoId you want to use to upload your video. File file = new File("/path/to/file"); // The path to the video you would like to upload. The path must be local. If you want to use a video from an online source, you must use the \\\"/videos\\\" endpoint and add the \\\"source\\\" parameter when you create a new video. try { Video result = apiInstance.upload(videoId, file); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling VideosApi#upload"); 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: | //install via Nuget //Install-Package ApiVideo using System.Diagnostics; using ApiVideo.Client; namespace Example { public class uploadExample { 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 | Enter the videoId you want to use to upload your video. var file = BINARY_DATA_HERE; // System.IO.Stream | The path to the video you would like to upload. The path must be local. If you want to use a video from an online source, you must use the \\\"/videos\\\" endpoint and add the \\\"source\\\" parameter when you create a new video. var apiVideosInstance = apiInstance.Videos(); try { // Upload a video Video result = apiVideosInstance.upload(videoId, file); Debug.WriteLine(result); } catch (ApiException e) { Debug.Print("Exception when calling VideosApi.upload: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } } } /watermarks: get: description: List all watermarks. A watermark is a static image overlapping a video used as a "stamp" to limit leetching. operationId: LIST-watermarks parameters: - description: 'Allowed: createdAt. You can search by the time watermark were created at.' example: createdAt explode: true in: query name: sortBy required: false schema: type: string style: form - description: 'Allowed: asc, desc. 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: 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: - watermarkId: watermark_1BWr2L5MTQwxGkuxKjzh6i createdAt: 2019-12-16T08:25:51+00:00 - watermarkId: watermark_3BWC2L5MTQwxGkuxKjzh7g createdAt: 2019-12-16T08:25:51+00:00 pagination: currentPage: 1 pageSize: 25 pagesTotal: 1 itemsTotal: 11 currentPageItems: 11 links: - rel: self uri: https://ws.api.video/watermarks?currentPage=1 - rel: first uri: https://ws.api.video/watermarks?currentPage=1 - rel: last uri: https://ws.api.video/watermarks?currentPage=1 schema: $ref: '#/components/schemas/watermarks-list-response' description: Success "400": content: application/json: 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 schema: $ref: '#/components/schemas/bad-request' description: Bad Request security: - bearerAuth: [] summary: List all watermarks tags: - Watermarks x-client-action: list x-group-parameters: true x-client-paginated: true post: description: Create a new watermark by uploading a .jpg or a .png image. A watermark is a static image overlapping a video used as a "stamp" to limit leetching. operationId: POST_watermark requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/watermark-upload-payload' required: true responses: "200": content: application/json: examples: response: value: watermarkId: watermark_1BWr2L5MTQwxGkuxKjzh6i createdAt: 2020-03-03T12:52:03.085+00:00 schema: $ref: '#/components/schemas/watermark' description: Success "400": content: application/json: examples: response: value: status: 400 type: https://docs.api.video/docs/fileextension title: Only [jpeg, jpg, JPG, JPEG, png, PNG] extensions are supported. name: file schema: $ref: '#/components/schemas/bad-request' description: Bad Request security: - bearerAuth: [] summary: Upload a watermark tags: - Watermarks x-client-action: upload x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n\n videoId := \"videoId_example\" // string | Unique identifier\ \ of the chosen video \n file := os.NewFile(1234, \"some_file\") //\ \ *os.File | The .jpg image to be added as a thumbnail.\n\n\n res,\ \ err := client.Videos.UploadThumbnailFile(videoId, file)\n\n // you\ \ can also use a Reader instead of a File:\n // client.Videos.UploadThumbnail(videoId,\ \ fileName, fileReader)\n\n if err != nil {\n fmt.Fprintf(os.Stderr,\ \ \"Error when calling `Videos.UploadThumbnail``: %v\\n\", err)\n }\n\ \ // response from `UploadThumbnail`: Video\n fmt.Fprintf(os.Stdout,\ \ \"Response from `Videos.UploadThumbnail`: %v\\n\", res)\n}\n" - language: node code: "//install the module with npm or yarn\n//npm install @api.video/nodejs-client\ \ --save\n//yarn add @api.video/nodejs-client\n(async () => {\n try\ \ {\n const client = new ApiVideoClient({ apiKey: \"YOUR_API_TOKEN\"\ \ });\n\n const videoId = 'videoId_example'; // Unique identifier\ \ of the chosen video \n const file = 'BINARY_DATA_HERE'; // The\ \ .jpg image to be added as a thumbnail.\n\n // Video\n \ \ const result = await client.videos.uploadThumbnail(videoId, file);\n\ \ console.log(result);\n } catch (e) {\n console.error(e);\n\ \ }\n})();\n" - language: python code: "#install the api.video API client library\n#pip install api.video\n\ \nimport apivideo\nfrom apivideo.api import videos_api\nfrom apivideo.model.bad_request\ \ import BadRequest\nfrom 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 = \"videoId_example\"\ \ # str | Unique identifier of the chosen video \n file = open('/path/to/file',\ \ 'rb') # file_type | The .jpg image to be added as a thumbnail.\n\n \ \ # example passing only required values which don't have defaults set\n\ \ try:\n # Upload a thumbnail\n api_response = api_instance.upload_thumbnail(video_id,\ \ file)\n pprint(api_response)\n except apivideo.ApiException\ \ as e:\n print(\"Exception when calling VideosApi->upload_thumbnail:\ \ %s\\n\" % e)\n" - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\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_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n // ApiVideoClient\ \ client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\", ApiVideoClient.Environment.SANDBOX);\n\ \n VideosApi apiInstance = client.videos();\n\n String videoId = \"\ videoId_example\"; // Unique identifier of the chosen video \n File\ \ file = new File(\"/path/to/file\"); // The .jpg image to be added as\ \ a thumbnail.\n\n try {\n Video result = apiInstance.uploadThumbnail(videoId,\ \ file);\n System.out.println(result);\n } catch (ApiException e)\ \ {\n System.err.println(\"Exception when calling VideosApi#uploadThumbnail\"\ );\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: "//install via Nuget\n//Install-Package ApiVideo\n\nusing System.Diagnostics;\n\ using ApiVideo.Client;\n\nnamespace Example\n{\n public class uploadThumbnailExample\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 | Unique identifier\ \ of the chosen video \n var file = BINARY_DATA_HERE; // System.IO.Stream\ \ | The .jpg image to be added as a thumbnail.\n var apiVideosInstance\ \ = apiInstance.Videos();\n try\n {\n \ \ // Upload a thumbnail\n Video result = apiVideosInstance.uploadThumbnail(videoId,\ \ file);\n Debug.WriteLine(result);\n }\n \ \ catch (ApiException e)\n {\n Debug.Print(\"\ Exception when calling VideosApi.uploadThumbnail: \" + e.Message );\n\ \ Debug.Print(\"Status Code: \"+ e.ErrorCode);\n \ \ Debug.Print(e.StackTrace);\n }\n }\n }\n\ }\n" /watermarks/{watermarkId}: delete: description: Delete a watermark. A watermark is a static image overlapping a video used as a "stamp" to limit leetching. operationId: DELETE_watermark parameters: - description: The watermark ID for the watermark you want to delete. example: watermark_1BWr2L5MTQwxGkuxKjzh6i explode: false in: path name: watermarkId required: true schema: type: string style: simple responses: "204": description: No Content "404": content: application/json: examples: response: value: type: https://docs.api.video/docs/resourcenot_found title: The requested resource was not found. name: watermarkId status: 404 schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: Delete a watermark tags: - Watermarks x-client-action: delete /videos/{videoId}/thumbnail: patch: description: |- Pick a thumbnail from the given time code. If you'd like to upload an image for your thumbnail, use the [Upload a Thumbnail](https://docs.api.video/reference#post_videos-videoid-thumbnail) endpoint. There may be a short delay for the thumbnail to update. Tutorials using [Thumbnail picking](https://api.video/blog/endpoints/video-pick-a-thumbnail). operationId: PATCH_videos-videoId-thumbnail parameters: - description: Unique identifier of the video you want to add a thumbnail to, where you use a section of your video as the thumbnail. example: vi4k0jvEUuaTdRAEjQ4Jfrgz explode: false in: path name: videoId required: true schema: type: string style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/video-thumbnail-pick-payload' required: true 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: 4665-07-14T23:36:18.598+00:00 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/1080/source.mp4 schema: $ref: '#/components/schemas/video' description: Success "404": content: application/json: examples: response: value: type: https://docs.api.video/docs/resourcenot_found title: The requested resource was not found. name: videoId status: 404 schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: Pick a thumbnail tags: - Videos x-client-action: pickThumbnail x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n videoId := \"vi4k0jvEUuaTdRAEjQ4Jfrgz\" // string\ \ | Unique identifier of the video you want to add a thumbnail to, where\ \ you use a section of your video as the thumbnail.\n videoThumbnailPickPayload\ \ := *apivideosdk.NewVideoThumbnailPickPayload(\"Timecode_example\") //\ \ VideoThumbnailPickPayload | \n\n \n res, err := client.Videos.PickThumbnail(videoId,\ \ videoThumbnailPickPayload)\n\n if err != nil {\n fmt.Fprintf(os.Stderr,\ \ \"Error when calling `Videos.PickThumbnail``: %v\\n\", err)\n }\n\ \ // response from `PickThumbnail`: Video\n fmt.Fprintf(os.Stdout,\ \ \"Response from `Videos.PickThumbnail`: %v\\n\", res)\n}\n" - language: node code: "//install the module with npm or yarn\n//npm install @api.video/nodejs-client\ \ --save\n//yarn add @api.video/nodejs-client\n(async () => {\n try {\n\ \ const client = new ApiVideoClient({ apiKey: \"YOUR_API_TOKEN\"\ \ });\n\n const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // Unique identifier\ \ of the video you want to add a thumbnail to, where you use a section\ \ of your video as the thumbnail.\n const videoThumbnailPickPayload\ \ = {\n timecode: \"timecode_example\", \n // Frame in video\ \ to be used as a placeholder before the video plays. \n //Example:\ \ '\\\"00:01:00.000\\\" for 1 minute into the video.' Valid Patterns:\ \ \\\"hh:mm:ss.ms\\\" \\\"hh:mm:ss:frameNumber\\\" \\\"124\\\" (integer\ \ value is reported as seconds) If selection is out of range, \\\"00:00:00.00\\\ \" will be chosen.\n }; \n\n // Video\n const result = await\ \ client.videos.pickThumbnail(videoId, videoThumbnailPickPayload);\n \ \ console.log(result);\n } catch (e) {\n console.error(e);\n\ \ }\n })();\n" - language: python code: "#install the api.video API client library\n#pip install api.video\n\ import apivideo\nfrom apivideo.api import videos_api\nfrom apivideo.model.video_thumbnail_pick_payload\ \ import VideoThumbnailPickPayload\nfrom 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 | Unique identifier\ \ of the video you want to add a thumbnail to, where you use a section\ \ of your video as the thumbnail.\n video_thumbnail_pick_payload =\ \ VideoThumbnailPickPayload(\n timecode=\"04:80:72\",\n ) #\ \ VideoThumbnailPickPayload | \n\n # example passing only required\ \ values which don't have defaults set\n try:\n # Pick a thumbnail\n\ \ api_response = api_instance.pick_thumbnail(video_id, video_thumbnail_pick_payload)\n\ \ pprint(api_response)\n except apivideo.ApiException as e:\n\ \ print(\"Exception when calling VideosApi->pick_thumbnail: %s\\\ n\" % e)\n" - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\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_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n VideosApi apiInstance =\ \ client.videos();\n \n String videoId = \"vi4k0jvEUuaTdRAEjQ4Jfrgz\"\ ; // Unique identifier of the video you want to add a thumbnail to, where\ \ you use a section of your video as the thumbnail.\n VideoThumbnailPickPayload\ \ videoThumbnailPickPayload = new VideoThumbnailPickPayload(); // \n \ \ videoThumbnailPickPayload.setTimecode(\"null\"); // Frame in video\ \ to be used as a placeholder before the video plays.\nExample: '"00:01:00.000"\ \ for 1 minute into the video.'\nValid Patterns:\n"hh:mm:ss.ms"\n\ "hh:mm:ss:frameNumber"\n"124" (integer value is reported\ \ as seconds)\nIf selection is out of range, "00:00:00.00" will\ \ be chosen.\n\n\n try {\n Video result = apiInstance.pickThumbnail(videoId,\ \ videoThumbnailPickPayload);\n System.out.println(result);\n \ \ } catch (ApiException e) {\n System.err.println(\"Exception when\ \ calling VideosApi#pickThumbnail\");\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: "//install via Nuget\n//Install-Package ApiVideo\nusing System.Diagnostics;\n\ using ApiVideo.Client;\n\nnamespace Example\n{\n public class pickThumbnailExample\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 | Unique\ \ identifier of the video you want to add a thumbnail to, where you use\ \ a section of your video as the thumbnail.\n var videoThumbnailPickPayload\ \ = new VideoThumbnailPickPayload(); // VideoThumbnailPickPayload | \n\ \ var apiVideosInstance = apiInstance.Videos();\n \ \ try\n {\n // Pick a thumbnail\n \ \ Video result = apiVideosInstance.pickThumbnail(videoId, videoThumbnailPickPayload);\n\ \ Debug.WriteLine(result);\n }\n \ \ catch (ApiException e)\n {\n Debug.Print(\"\ Exception when calling VideosApi.pickThumbnail: \" + e.Message );\n \ \ Debug.Print(\"Status Code: \"+ e.ErrorCode);\n \ \ Debug.Print(e.StackTrace);\n }\n }\n }\n\ } \n" post: description: "The thumbnail is the poster that appears in the player window\ \ before video playback begins.\nThis endpoint allows you to upload an image\ \ for the thumbnail.\nTo select a still frame from the video using a time\ \ stamp, use [Pick a Thumbnail](https://docs.api.video/reference#patch_videos-videoid-thumbnail)\ \ to pick a time in the video. \nNote: There may be a short delay before the\ \ new thumbnail is delivered to our CDN.\nTutorials using [Thumbnail upload](https://api.video/blog/endpoints/videos-upload-a-thumbnail)." operationId: POST_videos-videoId-thumbnail parameters: - description: 'Unique identifier of the chosen video ' explode: false in: path name: videoId required: true schema: type: string style: simple requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/video-thumbnail-upload-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 createdAt: 2020-03-03T12:52:03.085+00:00 publishedAt: 2020-07-14T23:36:18.598+00:00 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/1080/source.mp4 schema: $ref: '#/components/schemas/video' description: Success "400": content: application/json: examples: response: value: status: 400 type: https://docs.api.video/docs/fileextension title: Only [jpeg, jpg, JPG, JPEG] extensions are supported. name: file schema: $ref: '#/components/schemas/bad-request' description: Bad Request "404": content: application/json: examples: response: value: type: https://docs.api.video/docs/resourcenot_found title: The requested resource was not found. name: videoId status: 404 schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: Upload a thumbnail tags: - Videos x-client-action: uploadThumbnail x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n\n videoId := \"videoId_example\" // string | Unique identifier\ \ of the chosen video \n file := os.NewFile(1234, \"some_file\") //\ \ *os.File | The .jpg image to be added as a thumbnail.\n\n\n res,\ \ err := client.Videos.UploadThumbnailFile(videoId, file)\n\n // you\ \ can also use a Reader instead of a File:\n // client.Videos.UploadThumbnail(videoId,\ \ fileName, fileReader)\n\n if err != nil {\n fmt.Fprintf(os.Stderr,\ \ \"Error when calling `Videos.UploadThumbnail``: %v\\n\", err)\n }\n\ \ // response from `UploadThumbnail`: Video\n fmt.Fprintf(os.Stdout,\ \ \"Response from `Videos.UploadThumbnail`: %v\\n\", res)\n}\n" - language: node code: "//install the module with npm or yarn\n//npm install @api.video/nodejs-client\ \ --save\n//yarn add @api.video/nodejs-client\n(async () => {\n try\ \ {\n const client = new ApiVideoClient({ apiKey: \"YOUR_API_TOKEN\"\ \ });\n\n const videoId = 'videoId_example'; // Unique identifier\ \ of the chosen video \n const file = 'BINARY_DATA_HERE'; // The\ \ .jpg image to be added as a thumbnail.\n\n // Video\n \ \ const result = await client.videos.uploadThumbnail(videoId, file);\n\ \ console.log(result);\n } catch (e) {\n console.error(e);\n\ \ }\n})();\n" - language: python code: "#install the api.video API client library\n#pip install api.video\n\ \nimport apivideo\nfrom apivideo.api import videos_api\nfrom apivideo.model.bad_request\ \ import BadRequest\nfrom 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 = \"videoId_example\"\ \ # str | Unique identifier of the chosen video \n file = open('/path/to/file',\ \ 'rb') # file_type | The .jpg image to be added as a thumbnail.\n\n \ \ # example passing only required values which don't have defaults set\n\ \ try:\n # Upload a thumbnail\n api_response = api_instance.upload_thumbnail(video_id,\ \ file)\n pprint(api_response)\n except apivideo.ApiException\ \ as e:\n print(\"Exception when calling VideosApi->upload_thumbnail:\ \ %s\\n\" % e)\n" - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\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_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n // ApiVideoClient\ \ client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\", ApiVideoClient.Environment.SANDBOX);\n\ \n VideosApi apiInstance = client.videos();\n\n String videoId = \"\ videoId_example\"; // Unique identifier of the chosen video \n File\ \ file = new File(\"/path/to/file\"); // The .jpg image to be added as\ \ a thumbnail.\n\n try {\n Video result = apiInstance.uploadThumbnail(videoId,\ \ file);\n System.out.println(result);\n } catch (ApiException e)\ \ {\n System.err.println(\"Exception when calling VideosApi#uploadThumbnail\"\ );\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: "//install via Nuget\n//Install-Package ApiVideo\n\nusing System.Diagnostics;\n\ using ApiVideo.Client;\n\nnamespace Example\n{\n public class uploadThumbnailExample\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 | Unique identifier\ \ of the chosen video \n var file = BINARY_DATA_HERE; // System.IO.Stream\ \ | The .jpg image to be added as a thumbnail.\n var apiVideosInstance\ \ = apiInstance.Videos();\n try\n {\n \ \ // Upload a thumbnail\n Video result = apiVideosInstance.uploadThumbnail(videoId,\ \ file);\n Debug.WriteLine(result);\n }\n \ \ catch (ApiException e)\n {\n Debug.Print(\"\ Exception when calling VideosApi.uploadThumbnail: \" + e.Message );\n\ \ Debug.Print(\"Status Code: \"+ e.ErrorCode);\n \ \ Debug.Print(e.StackTrace);\n }\n }\n }\n\ }\n" /videos/{videoId}: delete: description: If you do not need a video any longer, you can send a request to delete it. All you need is the videoId. Tutorials using [video deletion](https://api.video/blog/endpoints/video-delete). operationId: DELETE-video parameters: - description: The video ID for the video you want to delete. example: vi4k0jvEUuaTdRAEjQ4Jfrgz explode: false in: path name: videoId required: true schema: type: string style: simple responses: "204": description: No Content "404": content: application/json: examples: response: value: type: https://docs.api.video/docs/resourcenot_found title: The requested resource was not found. name: videoId status: 404 schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: Delete a video tags: - Videos x-client-action: delete x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\").Build()\n\ \ // if you rather like to use the sandbox environment:\n // client\ \ := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\").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: | //install the module with npm or yarn //npm install @api.video/nodejs-client --save //yarn add @api.video/nodejs-client (async () => { try { const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The video ID for the video you want to delete. // void const result = await client.videos.delete(videoId); console.log(result); } catch (e) { console.error(e); } })(); - language: python code: | #install the api.video API client library #pip install api.video 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: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\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_TOKEN\");\n // if you rather like to use the sandbox environment:\n\ \ // ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , 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: "//install via Nuget\n//Install-Package ApiVideo\nusing System.Diagnostics;\n\ using 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" get: description: This call provides the same JSON 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. Tutorials using [video GET](https://api.video/blog/endpoints/video-get). 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 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/1080/source.mp4 schema: $ref: '#/components/schemas/video' description: Success "404": content: application/json: examples: response: value: type: https://docs.api.video/docs/resourcenot_found title: The requested resource was not found. name: videoId status: 404 schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: Show a video tags: - Videos x-client-action: get x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).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: | //install the module with npm or yarn //npm install @api.video/nodejs-client --save //yarn add @api.video/nodejs-client (async () => { try { const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); const videoId = 'videoId_example'; // The unique identifier for the video you want details about. // Video const result = await client.videos.get(videoId); console.log(result); } catch (e) { console.error(e); } })(); - language: python code: | #install the api.video API client library #pip install api.video 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: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\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_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , 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: "//install via Nuget\n//Install-Package ApiVideo\nusing System.Diagnostics;\n\ using 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" patch: description: 'Use this endpoint to update the parameters associated with your video. The video you are updating is determined by the video ID you provide in the path. For each parameter you want to update, include the update in the request body. 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. Tutorials using [video update](https://api.video/blog/endpoints/video-update).' operationId: PATCH-video parameters: - description: The video ID for the video you want to delete. 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 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/1080/source.mp4 schema: $ref: '#/components/schemas/video' description: Success "400": content: application/json: examples: response: value: type: https://docs.api.video/docs/attributeinvalid title: This attribute must be a ISO-8601 date. name: scheduledAt status: 400 problems: - type: https://docs.api.video/docs/attributeinvalid title: This attribute must be a ISO-8601 date. name: scheduledAt - type: https://docs.api.video/docs/attributeinvalid title: This attribute must be an array. name: tags - type: https://docs.api.video/docs/attributeinvalid title: This attribute must be an array. name: metadata schema: $ref: '#/components/schemas/bad-request' description: Bad Request "404": content: application/json: examples: response: value: type: https://docs.api.video/docs/resourcenot_found title: The requested resource was not found. name: videoId status: 404 schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: Update a video tags: - Videos x-client-action: update x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).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: "//install the module with npm or yarn\n//npm install @api.video/nodejs-client\ \ --save\n//yarn add @api.video/nodejs-client\n(async () => {\n try\ \ {\n const client = new ApiVideoClient({ apiKey: \"YOUR_API_TOKEN\"\ \ });\n\n const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The video\ \ ID for the video you want to delete.\n const 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: null, // 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 // Video\n const\ \ result = await client.videos.update(videoId, videoUpdatePayload);\n\ \ console.log(result);\n } catch (e) {\n console.error(e);\n\ \ }\n})();\n" - language: python code: "#install the api.video API client library\n#pip install api.video\n\ import 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: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\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_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , 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: "//install via Nuget\n//Install-Package ApiVideo\nusing System.Diagnostics;\n\ using 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("vi6DEWhlgoHU3Ig5tgPlYkBc", (new VideoUpdatePayload()) ->setTitle("The new title") ->setPublic(false) ->setDescription("A new description") ->setTags(["tag1", "tag2"]) ->setMetadata(array( new Metadata(["key" => "aa", 'value' => "bb"]), new Metadata(["key" => "aa2", 'value' => "bb2"])))); /videos/{videoId}/status: get: description: This API provides upload status & encoding status to determine when the video is uploaded or ready to playback. Once encoding is completed, the response also lists the available stream qualities. Tutorials using [video status](https://api.video/blog/endpoints/video-status). operationId: GET-video-status parameters: - description: The unique identifier for the video you want the status for. example: vi4k0jvEUuaTdRAEjQ4Jfrgz explode: false in: path name: videoId required: true schema: type: string style: simple responses: "200": content: application/json: examples: response: value: ingest: status: uploaded filesize: 273579401 receivedBytes: - to: 134217727 from: 0 total: 273579401 - to: 268435455 from: 134217728 total: 273579401 - to: 273579400 from: 268435456 total: 273579401 encoding: playable: true qualities: - quality: 360p status: encoded - quality: 480p status: encoded - quality: 720p status: encoded - quality: 1080p status: encoding - quality: 2160p status: waiting metadata: width: 424 height: 240 bitrate: 411.218 duration: 4176 framerate: 24 samplerate: 48000 videoCodec: h264 audioCodec: aac aspectRatio: 16/9 schema: $ref: '#/components/schemas/video-status' description: Success "404": content: application/json: examples: response: value: type: https://docs.api.video/docs/resourcenot_found title: The requested resource was not found. name: videoId status: 404 schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: Show video status tags: - Videos x-client-action: getStatus x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ \ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n videoId := \"vi4k0jvEUuaTdRAEjQ4Jfrgz\" // string\ \ | The unique identifier for the video you want the status for.\n\n \ \ \n res, err := client.Videos.GetStatus(videoId)\n\n if err !=\ \ nil {\n fmt.Fprintf(os.Stderr, \"Error when calling `Videos.GetStatus``:\ \ %v\\n\", err)\n }\n // response from `GetStatus`: VideoStatus\n\ \ fmt.Fprintf(os.Stdout, \"Response from `Videos.GetStatus`: %v\\n\"\ , res)\n} \n" - language: node code: | //install the module with npm or yarn //npm install @api.video/nodejs-client --save //yarn add @api.video/nodejs-client (async () => { try { const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want the status for. // VideoStatus const result = await client.videos.getStatus(videoId); console.log(result); } catch (e) { console.error(e); } })(); - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import videos_api from apivideo.model.video_status import VideoStatus 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 unique identifier for the video you want the status for. # example passing only required values which don't have defaults set try: # Show video status api_response = api_instance.get_status(video_id) pprint(api_response) except apivideo.ApiException as e: print("Exception when calling VideosApi->get_status: %s\n" % e) - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\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_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n VideosApi apiInstance =\ \ client.videos();\n \n String videoId = \"vi4k0jvEUuaTdRAEjQ4Jfrgz\"\ ; // The unique identifier for the video you want the status for.\n\n\ \ try {\n VideoStatus result = apiInstance.getStatus(videoId);\n\ \ System.out.println(result);\n } catch (ApiException e) {\n \ \ System.err.println(\"Exception when calling VideosApi#getStatus\"\ );\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: | //install via Nuget //Install-Package ApiVideo using System.Diagnostics; using ApiVideo.Client; namespace Example { public class getStatusExample { 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 unique identifier for the video you want the status for. var apiVideosInstance = apiInstance.Videos(); try { // Show video status VideoStatus result = apiVideosInstance.getStatus(videoId); Debug.WriteLine(result); } catch (ApiException e) { Debug.Print("Exception when calling VideosApi.getStatus: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } } } /upload-tokens: get: description: |- A delegated token is used to allow secure uploads without exposing your API key. Use this endpoint to retrieve a list of all currently active delegated tokens. Tutorials using [delegated upload](https://api.video/blog/endpoints/delegated-upload). operationId: GET_upload-tokens parameters: - description: 'Allowed: createdAt, ttl. You can use these to sort by when a token was created, or how much longer the token will be active (ttl - time to live). Date and time is presented in ISO-8601 format.' example: ttl explode: true in: query name: sortBy required: false schema: enum: - createdAt - ttl type: string style: form - description: 'Allowed: asc, desc. Ascending is 0-9 or A-Z. Descending is 9-0 or Z-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: - token: to37YfoPDRR2pcDKa6LsUE0M ttl: 3600 createdAt: 2020-12-02T10:26:46+00:00 expiresAt: 2020-12-02T11:26:46+00:00 - token: to1W3ZS9PdUBZWzzTEZr1B79 ttl: 0 createdAt: 2020-12-02T10:26:28+00:00 pagination: currentPage: 1 currentPageItems: 2 pageSize: 25 pagesTotal: 1 itemsTotal: 2 links: - rel: self uri: /upload-tokens?currentPage=1&pageSize=25 - rel: first uri: /upload-tokens?currentPage=1&pageSize=25 - rel: last uri: /upload-tokens?currentPage=1&pageSize=25 schema: $ref: '#/components/schemas/token-list-response' description: Success security: - bearerAuth: [] summary: List all active upload tokens. tags: - Upload Tokens x-group-parameters: true x-client-paginated: true x-optional-object: true x-client-action: list x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package main\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_TOKEN\").Build()\n\ \ // if you rather like to use the sandbox environment:\n // client\ \ := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\").Build()\n\ \ \n uploadToken := \"to1tcmSFHeYY5KzyhOqVKMKb\" // string |\ \ The unique identifier for the token you want information about.\n\n\ \ \n res, err := client.UploadTokens.GetToken(uploadToken)\n\n \ \ if err != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling\ \ `UploadTokens.GetToken``: %v\\n\", err)\n }\n // response from\ \ `GetToken`: UploadToken\n fmt.Fprintf(os.Stdout, \"Response from\ \ `UploadTokens.GetToken`: %v\\n\", res)\n}\n" - language: node code: | //install the module with npm or yarn //npm install @api.video/nodejs-client --save //yarn add @api.video/nodejs-client (async () => { try { const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); const uploadToken = 'to1tcmSFHeYY5KzyhOqVKMKb'; // The unique identifier for the token you want information about. // UploadToken const result = await client.uploadTokens.getToken(uploadToken); console.log(result); } catch (e) { console.error(e); } })(); - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import upload_tokens_api from apivideo.model.not_found import NotFound from apivideo.model.upload_token import UploadToken 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 = upload_tokens_api.UploadTokensApi(api_client) upload_token = "to1tcmSFHeYY5KzyhOqVKMKb" # str | The unique identifier for the token you want information about. # example passing only required values which don't have defaults set try: # Show upload token api_response = api_instance.get_token(upload_token) pprint(api_response) except apivideo.ApiException as e: print("Exception when calling UploadTokensApi->get_token: %s\n" % e) - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.UploadTokensApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n UploadTokensApi apiInstance\ \ = client.uploadTokens();\n \n String uploadToken = \"to1tcmSFHeYY5KzyhOqVKMKb\"\ ; // The unique identifier for the token you want information about.\n\ \n try {\n UploadToken result = apiInstance.getToken(uploadToken);\n\ \ System.out.println(result);\n } catch (ApiException e) {\n \ \ System.err.println(\"Exception when calling UploadTokensApi#getToken\"\ );\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: | //install via Nuget //Install-Package ApiVideo using System.Diagnostics; using ApiVideo.Client; namespace Example { public class getTokenExample { public static void Main() { var basePath = ApiVideoClient.Client.Environment.SANDBOX; var apiKey = "YOUR_API_KEY"; var apiInstance = new ApiVideoClient(apiKey,basePath); var uploadToken = to1tcmSFHeYY5KzyhOqVKMKb; // string | The unique identifier for the token you want information about. var apiUploadTokensInstance = apiInstance.UploadTokens(); try { // Show upload token UploadToken result = apiUploadTokensInstance.getToken(uploadToken); Debug.WriteLine(result); } catch (ApiException e) { Debug.Print("Exception when calling UploadTokensApi.getToken: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } } } post: description: Use this endpoint to generate an upload token. You can use this token to authenticate video uploads while keeping your API key safe. Tutorials using [delegated upload](https://api.video/blog/endpoints/delegated-upload). operationId: POST_upload-tokens requestBody: content: application/json: schema: $ref: '#/components/schemas/token-creation-payload' required: true responses: "200": content: application/json: examples: response: value: token: to1tcmSFHeYY5KzyhOqVKMKb ttl: 3600 createdAt: 2020-12-02T10:13:19+00:00 expiresAt: 2020-12-02T11:13:19+00:00 schema: $ref: '#/components/schemas/upload-token' description: Success "400": content: application/json: schema: $ref: '#/components/schemas/bad-request' description: Bad Request security: - bearerAuth: [] summary: Generate an upload token tags: - Upload Tokens x-client-action: createToken x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n tokenCreationPayload := *apivideosdk.NewTokenCreationPayload()\ \ // TokenCreationPayload | \n\n \n res, err := client.UploadTokens.CreateToken(tokenCreationPayload)\n\ \n if err != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling\ \ `UploadTokens.CreateToken``: %v\\n\", err)\n }\n // response from\ \ `CreateToken`: UploadToken\n fmt.Fprintf(os.Stdout, \"Response from\ \ `UploadTokens.CreateToken`: %v\\n\", res)\n}\n" - language: node code: "//install the module with npm or yarn\n//npm install @api.video/nodejs-client\ \ --save\n//yarn add @api.video/nodejs-client\n(async () => {\n try\ \ {\n const client = new ApiVideoClient({ apiKey: \"YOUR_API_TOKEN\"\ \ });\n\n const tokenCreationPayload = {\n ttl: 56, // Time\ \ in seconds that the token will be active. A value of 0 means that the\ \ token has no expiration date. The default is to have no expiration.\n\ \ }; \n\n // UploadToken\n const result = await client.uploadTokens.createToken(tokenCreationPayload);\n\ \ console.log(result);\n } catch (e) {\n console.error(e);\n\ \ }\n})();\n" - language: python code: "#install the api.video API client library\n#pip install api.video\n\ import apivideo\nfrom apivideo.api import upload_tokens_api\nfrom apivideo.model.bad_request\ \ import BadRequest\nfrom apivideo.model.upload_token import UploadToken\n\ from apivideo.model.token_creation_payload import TokenCreationPayload\n\ from 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 = upload_tokens_api.UploadTokensApi(api_client)\n\ \ token_creation_payload = TokenCreationPayload(\n ttl=0,\n\ \ ) # TokenCreationPayload | \n\n # example passing only required\ \ values which don't have defaults set\n try:\n # Generate an\ \ upload token\n api_response = api_instance.create_token(token_creation_payload)\n\ \ pprint(api_response)\n except apivideo.ApiException as e:\n\ \ print(\"Exception when calling UploadTokensApi->create_token:\ \ %s\\n\" % e)\n" - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.UploadTokensApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n UploadTokensApi apiInstance\ \ = client.uploadTokens();\n \n TokenCreationPayload tokenCreationPayload\ \ = new TokenCreationPayload(); // \n tokenCreationPayload.setTtl();\ \ // Time in seconds that the token will be active. A value of 0 means\ \ that the token has no expiration date. The default is to have no expiration.\n\ \n\n try {\n UploadToken result = apiInstance.createToken(tokenCreationPayload);\n\ \ System.out.println(result);\n } catch (ApiException e) {\n \ \ System.err.println(\"Exception when calling UploadTokensApi#createToken\"\ );\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: "//install via Nuget\n//Install-Package ApiVideo\nusing System.Diagnostics;\n\ using ApiVideo.Client;\n\nnamespace Example\n{\n public class createTokenExample\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 tokenCreationPayload = new TokenCreationPayload(); //\ \ TokenCreationPayload | \n var apiUploadTokensInstance = apiInstance.UploadTokens();\n\ \ try\n {\n // Generate an upload\ \ token\n UploadToken result = apiUploadTokensInstance.createToken(tokenCreationPayload);\n\ \ Debug.WriteLine(result);\n }\n \ \ catch (ApiException e)\n {\n Debug.Print(\"\ Exception when calling UploadTokensApi.createToken: \" + e.Message );\n\ \ Debug.Print(\"Status Code: \"+ e.ErrorCode);\n \ \ Debug.Print(e.StackTrace);\n }\n }\n }\n\ }\n" /upload-tokens/{uploadToken}: delete: description: Delete an existing upload token. This is especially useful for tokens you may have created that do not expire. operationId: DELETE_upload-tokens-uploadToken parameters: - description: The unique identifier for the upload token you want to delete. Deleting a token will make it so the token can no longer be used for authentication. example: to1tcmSFHeYY5KzyhOqVKMKb explode: false in: path name: uploadToken required: true schema: type: string style: simple responses: "204": description: No Content "404": content: application/json: schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: Delete an upload token tags: - Upload Tokens x-client-action: deleteToken x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n uploadToken := \"to1tcmSFHeYY5KzyhOqVKMKb\" //\ \ string | The unique identifier for the upload token you want to delete.\ \ Deleting a token will make it so the token can no longer be used for\ \ authentication.\n\n \n err := client.UploadTokens.DeleteToken(uploadToken)\n\ \n if err != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling\ \ `UploadTokens.DeleteToken``: %v\\n\", err)\n }\n}\n" - language: node code: | //install the module with npm or yarn //npm install @api.video/nodejs-client --save //yarn add @api.video/nodejs-client (async () => { try { const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); const uploadToken = 'to1tcmSFHeYY5KzyhOqVKMKb'; // The unique identifier for the upload token you want to delete. Deleting a token will make it so the token can no longer be used for authentication. // void const result = await client.uploadTokens.deleteToken(uploadToken); console.log(result); } catch (e) { console.error(e); } })(); - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import upload_tokens_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 = upload_tokens_api.UploadTokensApi(api_client) upload_token = "to1tcmSFHeYY5KzyhOqVKMKb" # str | The unique identifier for the upload token you want to delete. Deleting a token will make it so the token can no longer be used for authentication. # example passing only required values which don't have defaults set try: # Delete an upload token api_instance.delete_token(upload_token) except apivideo.ApiException as e: print("Exception when calling UploadTokensApi->delete_token: %s\n" % e) - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.UploadTokensApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n UploadTokensApi apiInstance\ \ = client.uploadTokens();\n \n String uploadToken = \"to1tcmSFHeYY5KzyhOqVKMKb\"\ ; // The unique identifier for the upload token you want to delete. Deleting\ \ a token will make it so the token can no longer be used for authentication.\n\ \n try {\n apiInstance.deleteToken(uploadToken);\n } catch\ \ (ApiException e) {\n System.err.println(\"Exception when calling\ \ UploadTokensApi#deleteToken\");\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: | //install via Nuget //Install-Package ApiVideo using System.Diagnostics; using ApiVideo.Client; namespace Example { public class deleteTokenExample { public static void Main() { var basePath = ApiVideoClient.Client.Environment.SANDBOX; var apiKey = "YOUR_API_KEY"; var apiInstance = new ApiVideoClient(apiKey,basePath); var uploadToken = to1tcmSFHeYY5KzyhOqVKMKb; // string | The unique identifier for the upload token you want to delete. Deleting a token will make it so the token can no longer be used for authentication. var apiUploadTokensInstance = apiInstance.UploadTokens(); try { // Delete an upload token apiUploadTokensInstance.deleteToken(uploadToken); } catch (ApiException e) { Debug.Print("Exception when calling UploadTokensApi.deleteToken: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } } } get: description: You can retrieve details about a specific upload token if you have the unique identifier for the upload token. Add it in the path of the endpoint. Details include time-to-live (ttl), when the token was created, and when it will expire. operationId: GET_upload-tokens-uploadToken parameters: - description: The unique identifier for the token you want information about. example: to1tcmSFHeYY5KzyhOqVKMKb explode: false in: path name: uploadToken required: true schema: type: string style: simple responses: "200": content: application/json: examples: response: value: token: to1tcmSFHeYY5KzyhOqVKMKb ttl: 0 createdAt: 2020-12-02T10:13:19+00:00 schema: $ref: '#/components/schemas/upload-token' description: Success "404": content: application/json: schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: Show upload token tags: - Upload Tokens x-client-action: getToken x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n uploadToken := \"to1tcmSFHeYY5KzyhOqVKMKb\" //\ \ string | The unique identifier for the token you want information about.\n\ \n \n res, err := client.UploadTokens.GetToken(uploadToken)\n\n\ \ if err != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling\ \ `UploadTokens.GetToken``: %v\\n\", err)\n }\n // response from\ \ `GetToken`: UploadToken\n fmt.Fprintf(os.Stdout, \"Response from\ \ `UploadTokens.GetToken`: %v\\n\", res)\n}\n" - language: node code: | //install the module with npm or yarn //npm install @api.video/nodejs-client --save //yarn add @api.video/nodejs-client (async () => { try { const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); const uploadToken = 'to1tcmSFHeYY5KzyhOqVKMKb'; // The unique identifier for the token you want information about. // UploadToken const result = await client.uploadTokens.getToken(uploadToken); console.log(result); } catch (e) { console.error(e); } })(); - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import upload_tokens_api from apivideo.model.not_found import NotFound from apivideo.model.upload_token import UploadToken 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 = upload_tokens_api.UploadTokensApi(api_client) upload_token = "to1tcmSFHeYY5KzyhOqVKMKb" # str | The unique identifier for the token you want information about. # example passing only required values which don't have defaults set try: # Show upload token api_response = api_instance.get_token(upload_token) pprint(api_response) except apivideo.ApiException as e: print("Exception when calling UploadTokensApi->get_token: %s\n" % e) - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.UploadTokensApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n UploadTokensApi apiInstance\ \ = client.uploadTokens();\n \n String uploadToken = \"to1tcmSFHeYY5KzyhOqVKMKb\"\ ; // The unique identifier for the token you want information about.\n\ \n try {\n UploadToken result = apiInstance.getToken(uploadToken);\n\ \ System.out.println(result);\n } catch (ApiException e) {\n \ \ System.err.println(\"Exception when calling UploadTokensApi#getToken\"\ );\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: | //install via Nuget //Install-Package ApiVideo using System.Diagnostics; using ApiVideo.Client; namespace Example { public class getTokenExample { public static void Main() { var basePath = ApiVideoClient.Client.Environment.SANDBOX; var apiKey = "YOUR_API_KEY"; var apiInstance = new ApiVideoClient(apiKey,basePath); var uploadToken = to1tcmSFHeYY5KzyhOqVKMKb; // string | The unique identifier for the token you want information about. var apiUploadTokensInstance = apiInstance.UploadTokens(); try { // Show upload token UploadToken result = apiUploadTokensInstance.getToken(uploadToken); Debug.WriteLine(result); } catch (ApiException e) { Debug.Print("Exception when calling UploadTokensApi.getToken: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } } } /upload: post: description: "When given a token, anyone can upload a file to the URI `https://ws.api.video/upload?token=`.\n\ \nExample with cURL:\n\n```curl\n$ curl --request POST --url 'https://ws.api.video/upload?token=toXXX'\n\ \ --header 'content-type: multipart/form-data'\n -F file=@video.mp4\n```\n\ \nOr in an HTML form, with a little JavaScript to convert the form into JSON:\n\ ```html\n\n
\n \n
\n\ \ \n
\n
\n\n\n```\n\n\n### Dealing\ \ with large files\n\nYou can upload large files on api.video with Progressive\ \ Upload. Alternatively, if you want to use regular upload, we have created\ \ a tutorial\ \ to walk through the steps required." operationId: POST_upload parameters: - description: The unique identifier for the token you want to use to upload a video. example: to1tcmSFHeYY5KzyhOqVKMKb explode: true in: query name: token required: true schema: type: string style: form - description: Content-Range represents the range of bytes that will be returned as a result of the request. Byte ranges are inclusive, meaning that bytes 0-999 represents the first 1000 bytes in a file or object. example: 'Content-Range: bytes 200-100/5000' explode: false in: header name: Content-Range required: false schema: pattern: ^bytes [0-9]*-[0-9]*\/[0-9]*$ type: string style: simple x-client-ignore: true requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/token-upload-payload' required: true responses: "201": content: application/json: examples: response: value: videoId: vi4k0jvEUuaTdRAEjQ4Jfrgz playerId: pl45KFKdlddgk654dspkze title: Maths video description: An amazing video explaining the string theory public: false panoramic: false tags: - maths - string theory - video metadata: - key: Author value: John Doe - key: Format value: Tutorial publishedAt: 4665-07-14T23:36:18.598Z source: uri: /videos/vi4k0jvEUuaTdRAEjQ4Jfrgz/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/1080/source.mp4 schema: $ref: '#/components/schemas/video' description: Created "400": content: application/json: schema: $ref: '#/components/schemas/bad-request' description: Bad Request security: [] summary: Upload with an upload token tags: - Videos x-client-action: uploadWithUploadToken x-client-chunk-upload: true x-readme: code-samples: - language: go code: "//The upload will happen on the front end, and not on the backend\ \ code. \n//Our [JavaScript uploader(https://docs.api.video/docs/video-uploader)\ \ is a great place to look for uploading videos with the delegated token.\n\ //We also have uploaders for a number of [mobile languages](https://docs.api.video/docs/flutter-uploader).\n" - language: node code: "//The upload will happen on the front end, and not on the backend\ \ code. \n//Our [JavaScript uploader(https://docs.api.video/docs/video-uploader)\ \ is a great place to look for uploading videos with the delegated token.\n\ //We also have uploaders for a number of [mobile languages](https://docs.api.video/docs/flutter-uploader).\n" - language: python code: "#The upload will happen on the front end, and not on the backend\ \ code. \n#Our [JavaScript uploader(https://docs.api.video/docs/video-uploader)\ \ is a great place to look for uploading videos with the delegated token.\n\ #We also have uploaders for a number of [mobile languages](https://docs.api.video/docs/flutter-uploader).\n" - language: java code: "//The upload will happen on the front end, and not on the backend\ \ code. \n//Our [JavaScript uploader(https://docs.api.video/docs/video-uploader)\ \ is a great place to look for uploading videos with the delegated token.\n\ //We also have uploaders for a number of [mobile languages](https://docs.api.video/docs/flutter-uploader).\n" - language: csharp code: "//The upload will happen on the front end, and not on the backend\ \ code. \n//Our [JavaScript uploader(https://docs.api.video/docs/video-uploader)\ \ is a great place to look for uploading videos with the delegated token.\n\ //We also have uploaders for a number of [mobile languages](https://docs.api.video/docs/flutter-uploader).\n" /live-streams: get: description: With no parameters added to the url, this will return all livestreams. Query by name or key to limit the list. operationId: GET_live-streams parameters: - description: The unique stream key that allows you to stream videos. example: 30087931-229e-42cf-b5f9-e91bcc1f7332 explode: true in: query name: streamKey required: false schema: type: string style: form - description: You can filter live streams by their name or a part of their name. example: My Video explode: true in: query name: name required: false schema: type: string style: form - description: 'Allowed: createdAt, publishedAt, name. createdAt - the time a livestream was created using the specified streamKey. publishedAt - the time a livestream was published using the specified streamKey. name - the name of the livestream. If you choose one of the time based options, the time is presented in ISO-8601 format.' example: createdAt explode: true in: query name: sortBy required: false schema: type: string style: form - description: 'Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones. For title, it is 0-9 and A-Z ascending and Z-A, 9-0 descending.' example: desc 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: - liveStreamId: li400mYKSgQ6xs7taUeSaEKr createdAt: 2020-01-31T10:17:47+00:00 updatedAt: 2020-03-09T13:19:43+00:00 streamKey: 30087931-229e-42cf-b5f9-e91bcc1f7332 name: Live Stream From the browser public: true record: true broadcasting: false assets: iframe: player: https://embed.api.video/live/li400mYKSgQ6xs7taUeSaEKr hls: https://live.api.video/li400mYKSgQ6xs7taUeSaEKr.m3u8 thumbnail: https://cdn.api.video/live/li400mYKSgQ6xs7taUeSaEKr/thumbnail.jpg - liveStreamId: li4pqNqGUkhKfWcBGpZVLRY5 createdAt: 2020-07-29T10:45:35+00:00 updatedAt: 2020-07-29T10:45:35+00:00 streamKey: cc1b4df0-d1c5-4064-a8f9-9f0368385135 name: Live From New York public: true record: true broadcasting: false assets: iframe: player: https://embed.api.video/live/li4pqNqGUkhKfWcBGpZVLRY5 hls: https://live.api.video/li4pqNqGUkhKfWcBGpZVLRY5.m3u8 thumbnail: https://cdn.api.video/live/li4pqNqGUkhKfWcBGpZVLRY5/thumbnail.jpg pagination: currentPage: 1 currentPageItems: 19 pageSize: 25 pagesTotal: 1 itemsTotal: 19 links: - rel: self uri: /live-streams?currentPage=1&pageSize=25 - rel: first uri: /live-streams?currentPage=1&pageSize=25 - rel: last uri: /live-streams?currentPage=1&pageSize=25 schema: $ref: '#/components/schemas/live-stream-list-response' description: Success security: - bearerAuth: [] summary: List all live streams tags: - Live Streams x-client-action: list x-group-parameters: true x-client-paginated: true x-optional-object: true x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package main\n \n import (\n \"context\"\n \"fmt\"\n \ \ \"os\"\n apivideosdk \"github.com/apivideo/api.video-go-client\"\ \n )\n \n func main() {\n client := apivideosdk.ClientBuilder(\"\ YOUR_API_TOKEN\").Build()\n // if you rather like to use the sandbox\ \ environment:\n // client := apivideosdk.SandboxClientBuilder(\"\ YOU_SANDBOX_API_TOKEN\").Build()\n req := apivideosdk.LiveStreamsApiListRequest{}\n\ \ \n req.StreamKey(\"30087931-229e-42cf-b5f9-e91bcc1f7332\"\ ) // string | The unique stream key that allows you to stream videos.\n\ \ req.Name(\"My Video\") // string | You can filter live streams\ \ by their name or a part of their name.\n req.SortBy(\"createdAt\"\ ) // string | Allowed: createdAt, publishedAt, name. createdAt - the time\ \ a livestream was created using the specified streamKey. publishedAt\ \ - the time a livestream was published using the specified streamKey.\ \ name - the name of the livestream. If you choose one of the time based\ \ options, the time is presented in ISO-8601 format.\n req.SortOrder(\"\ desc\") // string | Allowed: asc, desc. Ascending for date and time means\ \ that earlier values precede later ones. Descending means that later\ \ values preced earlier ones. For title, it is 0-9 and A-Z ascending and\ \ Z-A, 9-0 descending.\n req.CurrentPage(int32(2)) // int32 | Choose\ \ the number of search results to return per page. Minimum value: 1 (default\ \ to 1)\n req.PageSize(int32(30)) // int32 | Results per page. Allowed\ \ values 1-100, default is 25. (default to 25)\n \n res, err :=\ \ client.LiveStreams.List(req)\n \n \n if err != nil {\n \ \ fmt.Fprintf(os.Stderr, \"Error when calling `LiveStreams.List``:\ \ %v\\n\", err)\n }\n // response from `List`: LiveStreamListResponse\n\ \ fmt.Fprintf(os.Stdout, \"Response from `LiveStreams.List`: %v\\\ n\", res)\n }\n" - language: node code: | //install the module with npm or yarn //npm install @api.video/nodejs-client --save //yarn add @api.video/nodejs-client (async () => { try { const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); const streamKey = '30087931-229e-42cf-b5f9-e91bcc1f7332'; // The unique stream key that allows you to stream videos. const name = 'My Video'; // You can filter live streams by their name or a part of their name. const sortBy = 'createdAt'; // Allowed: createdAt, publishedAt, name. createdAt - the time a livestream was created using the specified streamKey. publishedAt - the time a livestream was published using the specified streamKey. name - the name of the livestream. If you choose one of the time based options, the time is presented in ISO-8601 format. const sortOrder = 'desc'; // Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones. For title, it is 0-9 and A-Z ascending and Z-A, 9-0 descending. const currentPage = '2'; // Choose the number of search results to return per page. Minimum value: 1 const pageSize = '30'; // Results per page. Allowed values 1-100, default is 25. // LiveStreamListResponse const result = await client.liveStreams.list({ streamKey, name, sortBy, sortOrder, currentPage, pageSize }) console.log(result); } catch (e) { console.error(e); } })(); - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import live_streams_api from apivideo.model.live_stream import LiveStream 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 = live_streams_api.LiveStreamsApi(api_client) live_stream_id = "li400mYKSgQ6xs7taUeSaEKr" # str | The unique ID for the live stream you want to watch. # example passing only required values which don't have defaults set try: # Show live stream api_response = api_instance.get(live_stream_id) pprint(api_response) except apivideo.ApiException as e: print("Exception when calling LiveStreamsApi->get: %s\n" % e) - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.LiveStreamsApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n LiveStreamsApi apiInstance\ \ = client.liveStreams();\n \n String streamKey = \"30087931-229e-42cf-b5f9-e91bcc1f7332\"\ ; // The unique stream key that allows you to stream videos.\n String\ \ name = \"My Video\"; // You can filter live streams by their name or\ \ a part of their name.\n String sortBy = \"createdAt\"; // Allowed:\ \ createdAt, publishedAt, name. createdAt - the time a livestream was\ \ created using the specified streamKey. publishedAt - the time a livestream\ \ was published using the specified streamKey. name - the name of the\ \ livestream. If you choose one of the time based options, the time is\ \ presented in ISO-8601 format.\n String sortOrder = \"desc\"; // Allowed:\ \ asc, desc. Ascending for date and time means that earlier values precede\ \ later ones. Descending means that later values preced earlier ones.\ \ For title, it is 0-9 and A-Z ascending and Z-A, 9-0 descending.\n \ \ Integer currentPage = 1; // Choose the number of search results to\ \ return per page. Minimum value: 1\n Integer pageSize = 25; // Results\ \ per page. Allowed values 1-100, default is 25.\n\n try {\n Page\ \ result = apiInstance.list()\n .streamKey(streamKey)\n \ \ .name(name)\n .sortBy(sortBy)\n .sortOrder(sortOrder)\n\ \ .currentPage(currentPage)\n .pageSize(pageSize)\n\ \ .execute();\n System.out.println(result);\n } catch\ \ (ApiException e) {\n System.err.println(\"Exception when calling\ \ LiveStreamsApi#list\");\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: | //install via Nuget //Install-Package ApiVideo using System.Diagnostics; using ApiVideo.Client; namespace Example { public class getExample { public static void Main() { var basePath = ApiVideoClient.Client.Environment.SANDBOX; var apiKey = "YOUR_API_KEY"; var apiInstance = new ApiVideoClient(apiKey,basePath); var liveStreamId = li400mYKSgQ6xs7taUeSaEKr; // string | The unique ID for the live stream you want to watch. var apiLiveStreamsInstance = apiInstance.LiveStreams(); try { // Show live stream LiveStream result = apiLiveStreamsInstance.get(liveStreamId); Debug.WriteLine(result); } catch (ApiException e) { Debug.Print("Exception when calling LiveStreamsApi.get: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } } } post: description: |- A live stream will give you the 'connection point' to RTMP your video stream to api.video. It will also give you the details for viewers to watch the same livestream. The public=false 'private livestream' is available as a BETA feature, and should be limited to livestreams of 3,000 viewers or fewer. See our [Live Stream Tutorial](https://api.video/blog/tutorials/live-stream-tutorial) for a walkthrough of this API with OBS. Your RTMP endpoint for the livestream is rtmp://broadcast.api.video/s/{streamKey} Tutorials that [create live streams](https://api.video/blog/endpoints/live-create). operationId: POST_live-streams requestBody: content: application/json: schema: $ref: '#/components/schemas/live-stream-creation-payload' required: true responses: "200": content: application/json: examples: response: value: liveStreamId: li4pqNqGUkhKfWcBGpZVLRY5 createdAt: 2020-07-29T10:45:35+00:00 updatedAt: 2020-07-29T10:45:35+00:00 streamKey: cc1b4df0-d1c5-4064-a8f9-9f0368385135 name: Live From New York public: true record: true broadcasting: false assets: iframe: player: https://embed.api.video/live/li4pqNqGUkhKfWcBGpZVLRY5 hls: https://live.api.video/li4pqNqGUkhKfWcBGpZVLRY5.m3u8 thumbnail: https://cdn.api.video/live/li4pqNqGUkhKfWcBGpZVLRY5/thumbnail.jpg schema: $ref: '#/components/schemas/live-stream' description: Success "400": content: application/json: schema: $ref: '#/components/schemas/bad-request' description: Bad Request security: - bearerAuth: [] summary: Create live stream tags: - Live Streams x-client-action: create x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n liveStreamCreationPayload := *apivideosdk.NewLiveStreamCreationPayload(\"\ My Live Stream Video\") // LiveStreamCreationPayload | \n\n \n res,\ \ err := client.LiveStreams.Create(liveStreamCreationPayload)\n\n if\ \ err != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling `LiveStreams.Create``:\ \ %v\\n\", err)\n }\n // response from `Create`: LiveStream\n \ \ fmt.Fprintf(os.Stdout, \"Response from `LiveStreams.Create`: %v\\n\"\ , res)\n}\n" - language: node code: "//install the module with npm or yarn\n//npm install @api.video/nodejs-client\ \ --save\n//yarn add @api.video/nodejs-client\n(async () => {\n try\ \ {\n const client = new ApiVideoClient({ apiKey: \"YOUR_API_TOKEN\"\ \ });\n\n const liveStreamCreationPayload = {\n name: \"My\ \ Live Stream Video\", // Add a name for your live stream here.\n \ \ record: true, // Whether you are recording or not. True for record,\ \ false for not record.\n _public: true, // BETA FEATURE Please limit\ \ all public = false (\\\"private\\\") livestreams to 3,000 users. Whether\ \ your video can be viewed by everyone, or requires authentication to\ \ see it. A setting of false will require a unique token for each view.\n\ \ playerId: \"pl4f4ferf5erfr5zed4fsdd\", // The unique identifier\ \ for the player.\n }; \n\n // LiveStream\n const result\ \ = await client.liveStreams.create(liveStreamCreationPayload);\n \ \ console.log(result);\n } catch (e) {\n console.error(e);\n\ \ }\n})();\n" - language: python code: "#install the api.video API client library\n#pip install api.video\n\ import apivideo\nfrom apivideo.api import live_streams_api\nfrom apivideo.model.bad_request\ \ import BadRequest\nfrom apivideo.model.live_stream_creation_payload\ \ import LiveStreamCreationPayload\nfrom apivideo.model.live_stream import\ \ LiveStream\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\ \ = live_streams_api.LiveStreamsApi(api_client)\n live_stream_creation_payload\ \ = LiveStreamCreationPayload(\n name=\"My Live Stream Video\"\ ,\n record=True,\n public=True,\n player_id=\"pl4f4ferf5erfr5zed4fsdd\"\ ,\n ) # LiveStreamCreationPayload | \n\n # example passing only\ \ required values which don't have defaults set\n try:\n # Create\ \ live stream\n api_response = api_instance.create(live_stream_creation_payload)\n\ \ pprint(api_response)\n except apivideo.ApiException as e:\n\ \ print(\"Exception when calling LiveStreamsApi->create: %s\\n\"\ \ % e)\n" - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.LiveStreamsApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n LiveStreamsApi apiInstance\ \ = client.liveStreams();\n \n LiveStreamCreationPayload liveStreamCreationPayload\ \ = new LiveStreamCreationPayload(); // \n liveStreamCreationPayload.setName(\"\ My Live Stream Video\"); // Add a name for your live stream here.\n \ \ liveStreamCreationPayload.setRecord(true); // Whether you are recording\ \ or not. True for record, false for not record.\n liveStreamCreationPayload.setPublic();\ \ // BETA FEATURE Please limit all public = false ("private")\ \ livestreams to 3,000 users. Whether your video can be viewed by everyone,\ \ or requires authentication to see it. A setting of false will require\ \ a unique token for each view.\n liveStreamCreationPayload.setPlayerId(\"\ pl4f4ferf5erfr5zed4fsdd\"); // The unique identifier for the player.\n\ \n\n try {\n LiveStream result = apiInstance.create(liveStreamCreationPayload);\n\ \ System.out.println(result);\n } catch (ApiException e) {\n \ \ System.err.println(\"Exception when calling LiveStreamsApi#create\"\ );\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: "//install via Nuget\n//Install-Package ApiVideo\nusing System.Diagnostics;\n\ using ApiVideo.Client;\n\nnamespace Example\n{\n public class createExample\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 liveStreamCreationPayload = new LiveStreamCreationPayload();\ \ // LiveStreamCreationPayload | \n var apiLiveStreamsInstance\ \ = apiInstance.LiveStreams();\n try\n {\n \ \ // Create live stream\n LiveStream result =\ \ apiLiveStreamsInstance.create(liveStreamCreationPayload);\n \ \ Debug.WriteLine(result);\n }\n catch (ApiException\ \ e)\n {\n Debug.Print(\"Exception when calling\ \ LiveStreamsApi.create: \" + e.Message );\n Debug.Print(\"\ Status Code: \"+ e.ErrorCode);\n Debug.Print(e.StackTrace);\n\ \ }\n }\n }\n}\n" /live-streams/{liveStreamId}: delete: operationId: DELETE_live-streams-liveStreamId parameters: - description: The unique ID for the live stream that you want to remove. example: li400mYKSgQ6xs7taUeSaEKr explode: false in: path name: liveStreamId required: true schema: type: string style: simple responses: "204": description: No Content security: - bearerAuth: [] summary: Delete a live stream tags: - Live Streams x-client-action: delete x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n liveStreamId := \"li400mYKSgQ6xs7taUeSaEKr\"\ \ // string | The unique ID for the live stream that you want to remove.\n\ \n \n err := client.LiveStreams.Delete(liveStreamId)\n\n if err\ \ != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling `LiveStreams.Delete``:\ \ %v\\n\", err)\n }\n}\n" - language: node code: | //install the module with npm or yarn //npm install @api.video/nodejs-client --save //yarn add @api.video/nodejs-client (async () => { try { const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); const liveStreamId = 'li400mYKSgQ6xs7taUeSaEKr'; // The unique ID for the live stream that you want to remove. // void const result = await client.liveStreams.delete(liveStreamId); console.log(result); } catch (e) { console.error(e); } })(); - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import live_streams_api 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 = live_streams_api.LiveStreamsApi(api_client) live_stream_id = "li400mYKSgQ6xs7taUeSaEKr" # str | The unique ID for the live stream that you want to remove. # example passing only required values which don't have defaults set try: # Delete a live stream api_instance.delete(live_stream_id) except apivideo.ApiException as e: print("Exception when calling LiveStreamsApi->delete: %s\n" % e) - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\n import video.api.client.ApiVideoClient;\n import\ \ video.api.client.api.ApiException;\n import video.api.client.api.models.*;\n\ \ import video.api.client.api.clients.LiveStreamsApi;\n import java.util.*;\n\ \ \n public class Example {\n public static void main(String[] args)\ \ {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n \ \ // ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n \n LiveStreamsApi apiInstance\ \ = client.liveStreams();\n \n String liveStreamId = \"li400mYKSgQ6xs7taUeSaEKr\"\ ; // The unique ID for the live stream that you want to remove.\n \n\ \ try {\n apiInstance.delete(liveStreamId);\n } catch\ \ (ApiException e) {\n System.err.println(\"Exception when calling\ \ LiveStreamsApi#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: | //install via Nuget //Install-Package ApiVideo 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 liveStreamId = li400mYKSgQ6xs7taUeSaEKr; // string | The unique ID for the live stream that you want to remove. var apiLiveStreamsInstance = apiInstance.LiveStreams(); try { // Delete a live stream apiLiveStreamsInstance.delete(liveStreamId); } catch (ApiException e) { Debug.Print("Exception when calling LiveStreamsApi.delete: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } } } get: description: Supply a LivestreamId, and you'll get all the details for streaming into, and watching the livestream. Tutorials that use the [show livestream endpoint](https://api.video/blog/endpoints/live-stream-status). operationId: GET_live-streams-liveStreamId parameters: - description: The unique ID for the live stream you want to watch. example: li400mYKSgQ6xs7taUeSaEKr explode: false in: path name: liveStreamId required: true schema: type: string style: simple responses: "200": content: application/json: examples: response: value: liveStreamId: li400mYKSgQ6xs7taUeSaEKr createdAt: 2020-01-31T10:17:47+00:00 updatedAt: 2020-03-09T13:19:43+00:00 streamKey: 30087931-229e-42cf-b5f9-e91bcc1f7332 name: Live Stream From the browser public: true record: true broadcasting: false assets: iframe: player: https://embed.api.video/live/li400mYKSgQ6xs7taUeSaEKr hls: https://live.api.video/li400mYKSgQ6xs7taUeSaEKr.m3u8 thumbnail: https://cdn.api.video/live/li400mYKSgQ6xs7taUeSaEKr/thumbnail.jpg schema: $ref: '#/components/schemas/live-stream' description: Success security: - bearerAuth: [] summary: Show live stream tags: - Live Streams x-client-action: get x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n liveStreamId := \"li400mYKSgQ6xs7taUeSaEKr\"\ \ // string | The unique ID for the live stream you want to watch.\n\n\ \ \n res, err := client.LiveStreams.Get(liveStreamId)\n\n if\ \ err != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling `LiveStreams.Get``:\ \ %v\\n\", err)\n }\n // response from `Get`: LiveStream\n fmt.Fprintf(os.Stdout,\ \ \"Response from `LiveStreams.Get`: %v\\n\", res)\n}\n" - language: node code: | //install the module with npm or yarn //npm install @api.video/nodejs-client --save //yarn add @api.video/nodejs-client (async () => { try { const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); const liveStreamId = 'li400mYKSgQ6xs7taUeSaEKr'; // The unique ID for the live stream you want to watch. // LiveStream const result = await client.liveStreams.get(liveStreamId); console.log(result); } catch (e) { console.error(e); } })(); - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import live_streams_api from apivideo.model.live_stream import LiveStream 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 = live_streams_api.LiveStreamsApi(api_client) live_stream_id = "li400mYKSgQ6xs7taUeSaEKr" # str | The unique ID for the live stream you want to watch. # example passing only required values which don't have defaults set try: # Show live stream api_response = api_instance.get(live_stream_id) pprint(api_response) except apivideo.ApiException as e: print("Exception when calling LiveStreamsApi->get: %s\n" % e) - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.LiveStreamsApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n LiveStreamsApi apiInstance\ \ = client.liveStreams();\n \n String liveStreamId = \"li400mYKSgQ6xs7taUeSaEKr\"\ ; // The unique ID for the live stream you want to watch.\n\n try {\n\ \ LiveStream result = apiInstance.get(liveStreamId);\n System.out.println(result);\n\ \ } catch (ApiException e) {\n System.err.println(\"Exception\ \ when calling LiveStreamsApi#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: | //install via Nuget //Install-Package ApiVideo using System.Diagnostics; using ApiVideo.Client; namespace Example { public class getExample { public static void Main() { var basePath = ApiVideoClient.Client.Environment.SANDBOX; var apiKey = "YOUR_API_KEY"; var apiInstance = new ApiVideoClient(apiKey,basePath); var liveStreamId = li400mYKSgQ6xs7taUeSaEKr; // string | The unique ID for the live stream you want to watch. var apiLiveStreamsInstance = apiInstance.LiveStreams(); try { // Show live stream LiveStream result = apiLiveStreamsInstance.get(liveStreamId); Debug.WriteLine(result); } catch (ApiException e) { Debug.Print("Exception when calling LiveStreamsApi.get: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } } } patch: description: 'Use this endpoint to update the player, or to turn recording on/off (saving a copy of the livestream). NOTE: If the livestream is actively streaming, changing the recording status will only affect the NEXT stream. The public=false ''private livestream'' is available as a BETA feature, and should be limited to livestreams of 3,000 viewers or fewer.' operationId: PATCH_live-streams-liveStreamId parameters: - description: The unique ID for the live stream that you want to update information for such as player details, or whether you want the recording on or off. example: li400mYKSgQ6xs7taUeSaEKr explode: false in: path name: liveStreamId required: true schema: type: string style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/live-stream-update-payload' required: true responses: "200": content: application/json: examples: response: value: liveStreamId: li400mYKSgQ6xs7taUeSaEKr createdAt: 2020-01-31T10:17:47+00:00 updatedAt: 2020-03-09T13:19:43+00:00 streamKey: 30087931-229e-42cf-b5f9-e91bcc1f7332 name: Live Stream From the browser public: true record: true broadcasting: false assets: iframe: player: https://embed.api.video/live/li400mYKSgQ6xs7taUeSaEKr hls: https://live.api.video/li400mYKSgQ6xs7taUeSaEKr.m3u8 thumbnail: https://cdn.api.video/live/li400mYKSgQ6xs7taUeSaEKr/thumbnail.jpg schema: $ref: '#/components/schemas/live-stream' description: Success "400": content: application/json: schema: $ref: '#/components/schemas/bad-request' description: Bad Request security: - bearerAuth: [] summary: Update a live stream tags: - Live Streams x-client-action: update x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n liveStreamId := \"li400mYKSgQ6xs7taUeSaEKr\"\ \ // string | The unique ID for the live stream that you want to update\ \ information for such as player details, or whether you want the recording\ \ on or off.\n liveStreamUpdatePayload := *apivideosdk.NewLiveStreamUpdatePayload()\ \ // LiveStreamUpdatePayload | \n\n \n res, err := client.LiveStreams.Update(liveStreamId,\ \ liveStreamUpdatePayload)\n\n if err != nil {\n fmt.Fprintf(os.Stderr,\ \ \"Error when calling `LiveStreams.Update``: %v\\n\", err)\n }\n \ \ // response from `Update`: LiveStream\n fmt.Fprintf(os.Stdout,\ \ \"Response from `LiveStreams.Update`: %v\\n\", res)\n}\n" - language: node code: "//install the module with npm or yarn\n//npm install @api.video/nodejs-client\ \ --save\n//yarn add @api.video/nodejs-client\n(async () => {\n try\ \ {\n const client = new ApiVideoClient({ apiKey: \"YOUR_API_TOKEN\"\ \ });\n\n const liveStreamId = 'li400mYKSgQ6xs7taUeSaEKr'; // The\ \ unique ID for the live stream that you want to update information for\ \ such as player details, or whether you want the recording on or off.\n\ \ const liveStreamUpdatePayload = {\n name: \"My Live Stream\ \ Video\", // The name you want to use for your live stream.\n _public:\ \ true, // BETA FEATURE Please limit all public = false (\\\"private\\\ \") livestreams to 3,000 users. Whether your video can be viewed by everyone,\ \ or requires authentication to see it. A setting of false will require\ \ a unique token for each view.\n record: true, // Use this to indicate\ \ whether you want the recording on or off. On is true, off is false.\n\ \ playerId: \"pl45KFKdlddgk654dspkze\", // The unique ID for the\ \ player associated with a live stream that you want to update.\n };\ \ \n\n // LiveStream\n const result = await client.liveStreams.update(liveStreamId,\ \ liveStreamUpdatePayload);\n console.log(result);\n } catch\ \ (e) {\n console.error(e);\n }\n})();\n" - language: python code: "#install the api.video API client library\n#pip install api.video\n\ import apivideo\nfrom apivideo.api import live_streams_api\nfrom apivideo.model.bad_request\ \ import BadRequest\nfrom apivideo.model.live_stream_update_payload import\ \ LiveStreamUpdatePayload\nfrom apivideo.model.live_stream import LiveStream\n\ from 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 = live_streams_api.LiveStreamsApi(api_client)\n\ \ live_stream_id = \"li400mYKSgQ6xs7taUeSaEKr\" # str | The unique\ \ ID for the live stream that you want to update information for such\ \ as player details, or whether you want the recording on or off.\n \ \ live_stream_update_payload = LiveStreamUpdatePayload(\n name=\"\ My Live Stream Video\",\n public=True,\n record=True,\n\ \ player_id=\"pl45KFKdlddgk654dspkze\",\n ) # LiveStreamUpdatePayload\ \ | \n\n # example passing only required values which don't have defaults\ \ set\n try:\n # Update a live stream\n api_response\ \ = api_instance.update(live_stream_id, live_stream_update_payload)\n\ \ pprint(api_response)\n except apivideo.ApiException as e:\n\ \ print(\"Exception when calling LiveStreamsApi->update: %s\\n\"\ \ % e)\n" - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.LiveStreamsApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n LiveStreamsApi apiInstance\ \ = client.liveStreams();\n \n String liveStreamId = \"li400mYKSgQ6xs7taUeSaEKr\"\ ; // The unique ID for the live stream that you want to update information\ \ for such as player details, or whether you want the recording on or\ \ off.\n LiveStreamUpdatePayload liveStreamUpdatePayload = new LiveStreamUpdatePayload();\ \ // \n liveStreamUpdatePayload.setName(\"My Live Stream Video\");\ \ // The name you want to use for your live stream.\n liveStreamUpdatePayload.setPublic();\ \ // BETA FEATURE Please limit all public = false ("private")\ \ livestreams to 3,000 users.\nWhether your video can be viewed by everyone,\ \ or requires authentication to see it. A setting of false will require\ \ a unique token for each view.\n liveStreamUpdatePayload.setRecord(true);\ \ // Use this to indicate whether you want the recording on or off. On\ \ is true, off is false.\n liveStreamUpdatePayload.setPlayerId(\"pl45KFKdlddgk654dspkze\"\ ); // The unique ID for the player associated with a live stream that\ \ you want to update.\n\n\n try {\n LiveStream result = apiInstance.update(liveStreamId,\ \ liveStreamUpdatePayload);\n System.out.println(result);\n }\ \ catch (ApiException e) {\n System.err.println(\"Exception when\ \ calling LiveStreamsApi#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: "//install via Nuget\n//Install-Package ApiVideo\nusing System.Diagnostics;\n\ using 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 liveStreamId = li400mYKSgQ6xs7taUeSaEKr; // string\ \ | The unique ID for the live stream that you want to update information\ \ for such as player details, or whether you want the recording on or\ \ off.\n var liveStreamUpdatePayload = new LiveStreamUpdatePayload();\ \ // LiveStreamUpdatePayload | \n var apiLiveStreamsInstance\ \ = apiInstance.LiveStreams();\n try\n {\n \ \ // Update a live stream\n LiveStream result\ \ = apiLiveStreamsInstance.update(liveStreamId, liveStreamUpdatePayload);\n\ \ Debug.WriteLine(result);\n }\n \ \ catch (ApiException e)\n {\n Debug.Print(\"\ Exception when calling LiveStreamsApi.update: \" + e.Message );\n \ \ Debug.Print(\"Status Code: \"+ e.ErrorCode);\n \ \ Debug.Print(e.StackTrace);\n }\n }\n }\n}\n" /live-streams/{liveStreamId}/thumbnail: delete: description: Send the unique identifier for a live stream to delete it from the system. operationId: DELETE_live-streams-liveStreamId-thumbnail parameters: - description: 'The unique identifier for the live stream you want to delete. ' example: li400mYKSgQ6xs7taUeSaEKr explode: false in: path name: liveStreamId required: true schema: type: string style: simple responses: "200": content: application/json: schema: $ref: '#/components/schemas/live-stream' description: Success "404": content: application/json: examples: response: value: type: https://docs.api.video/docs/resourcenot_found title: The requested resource was not found. name: liveStreamId status: 404 schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: Delete a thumbnail tags: - Live Streams x-client-action: deleteThumbnail x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n liveStreamId := \"li400mYKSgQ6xs7taUeSaEKr\"\ \ // string | The unique identifier for the live stream you want to delete.\ \ \n\n \n res, err := client.LiveStreams.DeleteThumbnail(liveStreamId)\n\ \n if err != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling\ \ `LiveStreams.DeleteThumbnail``: %v\\n\", err)\n }\n // response\ \ from `DeleteThumbnail`: LiveStream\n fmt.Fprintf(os.Stdout, \"Response\ \ from `LiveStreams.DeleteThumbnail`: %v\\n\", res)\n}\n" - language: node code: "//install the module with npm or yarn\n//npm install @api.video/nodejs-client\ \ --save\n//yarn add @api.video/nodejs-client\n(async () => {\n try\ \ {\n const client = new ApiVideoClient({ apiKey: \"YOUR_API_TOKEN\"\ \ });\n\n const liveStreamId = 'li400mYKSgQ6xs7taUeSaEKr'; // The\ \ unique identifier for the live stream you want to delete. \n\n \ \ // LiveStream\n const result = await client.liveStreams.deleteThumbnail(liveStreamId);\n\ \ console.log(result);\n } catch (e) {\n console.error(e);\n\ \ }\n})();\n" - language: python code: "#install the api.video API client library\n#pip install api.video\n\ import apivideo\nfrom apivideo.api import live_streams_api\nfrom apivideo.model.not_found\ \ import NotFound\nfrom apivideo.model.live_stream import LiveStream\n\ from 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 = live_streams_api.LiveStreamsApi(api_client)\n\ \ live_stream_id = \"li400mYKSgQ6xs7taUeSaEKr\" # str | The unique\ \ identifier for the live stream you want to delete. \n\n # example\ \ passing only required values which don't have defaults set\n try:\n\ \ # Delete a thumbnail\n api_response = api_instance.delete_thumbnail(live_stream_id)\n\ \ pprint(api_response)\n except apivideo.ApiException as e:\n\ \ print(\"Exception when calling LiveStreamsApi->delete_thumbnail:\ \ %s\\n\" % e)\n" - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.LiveStreamsApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n LiveStreamsApi apiInstance\ \ = client.liveStreams();\n \n String liveStreamId = \"li400mYKSgQ6xs7taUeSaEKr\"\ ; // The unique identifier for the live stream you want to delete. \n\n\ \ try {\n LiveStream result = apiInstance.deleteThumbnail(liveStreamId);\n\ \ System.out.println(result);\n } catch (ApiException e) {\n \ \ System.err.println(\"Exception when calling LiveStreamsApi#deleteThumbnail\"\ );\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: "//install via Nuget\n//Install-Package ApiVideo\nusing System.Diagnostics;\n\ using ApiVideo.Client;\n\nnamespace Example\n{\n public class deleteThumbnailExample\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 liveStreamId = li400mYKSgQ6xs7taUeSaEKr; // string\ \ | The unique identifier for the live stream you want to delete. \n \ \ var apiLiveStreamsInstance = apiInstance.LiveStreams();\n\ \ try\n {\n // Delete a thumbnail\n\ \ LiveStream result = apiLiveStreamsInstance.deleteThumbnail(liveStreamId);\n\ \ Debug.WriteLine(result);\n }\n \ \ catch (ApiException e)\n {\n Debug.Print(\"\ Exception when calling LiveStreamsApi.deleteThumbnail: \" + e.Message\ \ );\n Debug.Print(\"Status Code: \"+ e.ErrorCode);\n \ \ Debug.Print(e.StackTrace);\n }\n }\n\ \ }\n}\n" post: description: Upload an image to use as a backdrop for your livestream. Tutorials that [update live stream thumbnails](https://api.video/blog/endpoints/live-upload-a-thumbnail). operationId: POST_live-streams-liveStreamId-thumbnail parameters: - description: The unique ID for the live stream you want to upload. example: vi4k0jvEUuaTdRAEjQ4Jfrgz explode: false in: path name: liveStreamId required: true schema: type: string style: simple requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/live-stream-thumbnail-upload-payload' required: true responses: "201": content: application/json: schema: $ref: '#/components/schemas/live-stream' description: Created "400": content: application/json: examples: response: value: status: 400 type: https://docs.api.video/docs/fileextension title: Only [jpeg, jpg, JPG, JPEG] extensions are supported. name: file schema: $ref: '#/components/schemas/bad-request' description: Bad Request "404": content: application/json: examples: response: value: type: https://docs.api.video/docs/resourcenot_found title: The requested resource was not found. name: liveStreamId status: 404 schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: Upload a thumbnail tags: - Live Streams x-client-action: uploadThumbnail x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n liveStreamId := \"vi4k0jvEUuaTdRAEjQ4Jfrgz\"\ \ // string | The unique ID for the live stream you want to upload.\n\ \ file := os.NewFile(1234, \"some_file\") // *os.File | The .jpg image\ \ to be added as a thumbnail.\n\n \n res, err := client.LiveStreams.UploadThumbnailFile(liveStreamId,\ \ file)\n\n // you can also use a Reader instead of a File:\n //\ \ client.LiveStreams.UploadThumbnail(liveStreamId, fileName, fileReader)\n\ \n if err != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling\ \ `LiveStreams.UploadThumbnail``: %v\\n\", err)\n }\n // response\ \ from `UploadThumbnail`: LiveStream\n fmt.Fprintf(os.Stdout, \"Response\ \ from `LiveStreams.UploadThumbnail`: %v\\n\", res)\n}\n" - language: node code: | //install the module with npm or yarn //npm install @api.video/nodejs-client --save //yarn add @api.video/nodejs-client (async () => { try { const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); const liveStreamId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique ID for the live stream you want to upload. const file = 'BINARY_DATA_HERE'; // The .jpg image to be added as a thumbnail. // LiveStream const result = await client.liveStreams.uploadThumbnail(liveStreamId, file); console.log(result); } catch (e) { console.error(e); } })(); - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import live_streams_api from apivideo.model.bad_request import BadRequest from apivideo.model.not_found import NotFound from apivideo.model.live_stream import LiveStream 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 = live_streams_api.LiveStreamsApi(api_client) live_stream_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | The unique ID for the live stream you want to upload. file = open('/path/to/file', 'rb') # file_type | The .jpg image to be added as a thumbnail. # example passing only required values which don't have defaults set try: # Upload a thumbnail api_response = api_instance.upload_thumbnail(live_stream_id, file) pprint(api_response) except apivideo.ApiException as e: print("Exception when calling LiveStreamsApi->upload_thumbnail: %s\n" % e) - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.LiveStreamsApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n LiveStreamsApi apiInstance\ \ = client.liveStreams();\n \n String liveStreamId = \"vi4k0jvEUuaTdRAEjQ4Jfrgz\"\ ; // The unique ID for the live stream you want to upload.\n File file\ \ = new File(\"/path/to/file\"); // The .jpg image to be added as a thumbnail.\n\ \n try {\n LiveStream result = apiInstance.uploadThumbnail(liveStreamId,\ \ file);\n System.out.println(result);\n } catch (ApiException\ \ e) {\n System.err.println(\"Exception when calling LiveStreamsApi#uploadThumbnail\"\ );\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: | //install via Nuget //Install-Package ApiVideo using System.Diagnostics; using ApiVideo.Client; namespace Example { public class uploadThumbnailExample { public static void Main() { var basePath = ApiVideoClient.Client.Environment.SANDBOX; var apiKey = "YOUR_API_KEY"; var apiInstance = new ApiVideoClient(apiKey,basePath); var liveStreamId = vi4k0jvEUuaTdRAEjQ4Jfrgz; // string | The unique ID for the live stream you want to upload. var file = BINARY_DATA_HERE; // System.IO.Stream | The .jpg image to be added as a thumbnail. var apiLiveStreamsInstance = apiInstance.LiveStreams(); try { // Upload a thumbnail LiveStream result = apiLiveStreamsInstance.uploadThumbnail(liveStreamId, file); Debug.WriteLine(result); } catch (ApiException e) { Debug.Print("Exception when calling LiveStreamsApi.uploadThumbnail: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } } } /videos/{videoId}/captions/{language}: delete: description: Delete a caption in a specific language by providing the video ID for the video you want to delete the caption from and the language the caption is in. operationId: DELETE_videos-videoId-captions-language parameters: - description: The unique identifier for the video you want to delete a caption from. example: vi4k0jvEUuaTdRAEjQ4Prklgc explode: false in: path name: videoId required: true schema: type: string style: simple - description: A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. example: en explode: false in: path name: language required: true schema: type: string style: simple responses: "204": description: No Content "404": content: application/json: schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: Delete a caption tags: - Captions x-client-action: delete x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n videoId := \"vi4k0jvEUuaTdRAEjQ4Prklgc\" // string\ \ | The unique identifier for the video you want to delete a caption from.\n\ \ language := \"en\" // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ \ language representation.\n\n \n err := client.Captions.Delete(videoId,\ \ language)\n\n if err != nil {\n fmt.Fprintf(os.Stderr, \"\ Error when calling `Captions.Delete``: %v\\n\", err)\n }\n}\n" - language: node code: | //install the module with npm or yarn //npm install @api.video/nodejs-client --save //yarn add @api.video/nodejs-client (async () => { try { const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); const videoId = 'vi4k0jvEUuaTdRAEjQ4Prklgc'; // The unique identifier for the video you want to delete a caption from. const language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. // void const result = await client.captions.delete(videoId, language); console.log(result); } catch (e) { console.error(e); } })(); - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import captions_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 = captions_api.CaptionsApi(api_client) video_id = "vi4k0jvEUuaTdRAEjQ4Prklgc" # str | The unique identifier for the video you want to delete a caption from. language = "en" # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. # example passing only required values which don't have defaults set try: # Delete a caption api_instance.delete(video_id, language) except apivideo.ApiException as e: print("Exception when calling CaptionsApi->delete: %s\n" % e) - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.CaptionsApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n CaptionsApi apiInstance\ \ = client.captions();\n \n String videoId = \"vi4k0jvEUuaTdRAEjQ4Prklgc\"\ ; // The unique identifier for the video you want to delete a caption\ \ from.\n String language = \"en\"; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ \ language representation.\n\n try {\n apiInstance.delete(videoId,\ \ language);\n } catch (ApiException e) {\n System.err.println(\"\ Exception when calling CaptionsApi#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: | //install via Nuget //Install-Package ApiVideo 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 = vi4k0jvEUuaTdRAEjQ4Prklgc; // string | The unique identifier for the video you want to delete a caption from. var language = en; // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. var apiCaptionsInstance = apiInstance.Captions(); try { // Delete a caption apiCaptionsInstance.delete(videoId, language); } catch (ApiException e) { Debug.Print("Exception when calling CaptionsApi.delete: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } } } get: description: |- Display a caption for a video in a specific language. If the language is available, the caption is returned. Otherwise, you will get a response indicating the caption was not found. Tutorials that use the [captions endpoint](https://api.video/blog/endpoints/captions). operationId: GET_videos-videoId-captions-language parameters: - description: The unique identifier for the video you want captions for. example: vi4k0jvEUuaTdRAEjQ4Prklg explode: false in: path name: videoId required: true schema: type: string style: simple - description: A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation example: en explode: false in: path name: language required: true schema: type: string style: simple responses: "200": content: application/json: examples: response: value: uri: /videos/vi3N6cDinStg3oBbN79GklWS/captions/en src: https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/captions/en.vtt srclang: en default: false schema: $ref: '#/components/schemas/caption' description: Success "404": content: application/json: schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: Show a caption tags: - Captions x-client-action: get x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n videoId := \"vi4k0jvEUuaTdRAEjQ4Prklg\" // string\ \ | The unique identifier for the video you want captions for.\n language\ \ := \"en\" // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ \ language representation\n\n \n res, err := client.Captions.Get(videoId,\ \ language)\n\n if err != nil {\n fmt.Fprintf(os.Stderr, \"\ Error when calling `Captions.Get``: %v\\n\", err)\n }\n // response\ \ from `Get`: Caption\n fmt.Fprintf(os.Stdout, \"Response from `Captions.Get`:\ \ %v\\n\", res)\n}\n" - language: node code: | //install the module with npm or yarn //npm install @api.video/nodejs-client --save //yarn add @api.video/nodejs-client (async () => { try { const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); const videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg'; // The unique identifier for the video you want captions for. const language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation // Caption const result = await client.captions.get(videoId, language); console.log(result); } catch (e) { console.error(e); } })(); - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import captions_api from apivideo.model.not_found import NotFound from apivideo.model.caption import Caption 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 = captions_api.CaptionsApi(api_client) video_id = "vi4k0jvEUuaTdRAEjQ4Prklg" # str | The unique identifier for the video you want captions for. language = "en" # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation # example passing only required values which don't have defaults set try: # Show a caption api_response = api_instance.get(video_id, language) pprint(api_response) except apivideo.ApiException as e: print("Exception when calling CaptionsApi->get: %s\n" % e) - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.CaptionsApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n CaptionsApi apiInstance\ \ = client.captions();\n \n String videoId = \"vi4k0jvEUuaTdRAEjQ4Prklg\"\ ; // The unique identifier for the video you want captions for.\n String\ \ language = \"en\"; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ \ language representation\n\n try {\n Caption result = apiInstance.get(videoId,\ \ language);\n System.out.println(result);\n } catch (ApiException\ \ e) {\n System.err.println(\"Exception when calling CaptionsApi#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: | //install via Nuget //Install-Package ApiVideo using System.Diagnostics; using ApiVideo.Client; namespace Example { public class getExample { public static void Main() { var basePath = ApiVideoClient.Client.Environment.SANDBOX; var apiKey = "YOUR_API_KEY"; var apiInstance = new ApiVideoClient(apiKey,basePath); var videoId = vi4k0jvEUuaTdRAEjQ4Prklg; // string | The unique identifier for the video you want captions for. var language = en; // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation var apiCaptionsInstance = apiInstance.Captions(); try { // Show a caption Caption result = apiCaptionsInstance.get(videoId, language); Debug.WriteLine(result); } catch (ApiException e) { Debug.Print("Exception when calling CaptionsApi.get: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } } } patch: description: 'To have the captions on automatically, use this PATCH to set default: true.' operationId: PATCH_videos-videoId-captions-language parameters: - description: The unique identifier for the video you want to have automatic captions for. example: vi4k0jvEUuaTdRAEjQ4Prklg explode: false in: path name: videoId required: true schema: type: string style: simple - description: A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. example: en explode: false in: path name: language required: true schema: type: string style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/captions-update-payload' required: true responses: "200": content: application/json: examples: response: value: uri: /videos/vi3N6cDinStg3oBbN79GklWS/captions/en src: https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/captions/en.vtt srclang: en default: true schema: $ref: '#/components/schemas/caption' description: Success "400": content: application/json: examples: response: value: type: string (required) title: string (required) name: string (required) status: integer (required) problems: - null schema: $ref: '#/components/schemas/bad-request' description: Bad Request "404": content: application/json: examples: response: value: type: Lorem sit culpa non title: sunt do fugiat tempor name: irure mollit aute status: 85925135 schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: Update caption tags: - Captions x-client-action: update x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n videoId := \"vi4k0jvEUuaTdRAEjQ4Prklg\" // string\ \ | The unique identifier for the video you want to have automatic captions\ \ for.\n language := \"en\" // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ \ language representation.\n captionsUpdatePayload := *apivideosdk.NewCaptionsUpdatePayload()\ \ // CaptionsUpdatePayload | \n\n \n res, err := client.Captions.Update(videoId,\ \ language, captionsUpdatePayload)\n\n if err != nil {\n fmt.Fprintf(os.Stderr,\ \ \"Error when calling `Captions.Update``: %v\\n\", err)\n }\n //\ \ response from `Update`: Caption\n fmt.Fprintf(os.Stdout, \"Response\ \ from `Captions.Update`: %v\\n\", res)\n}\n" - language: node code: "//install the module with npm or yarn\n//npm install @api.video/nodejs-client\ \ --save\n//yarn add @api.video/nodejs-client\n(async () => {\n try\ \ {\n const client = new ApiVideoClient({ apiKey: \"YOUR_API_TOKEN\"\ \ });\n\n const videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg'; // The unique\ \ identifier for the video you want to have automatic captions for.\n\ \ const language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ \ language representation.\n const captionsUpdatePayload = {\n\ \ _default: true,\n }; \n\n // Caption\n const result\ \ = await client.captions.update(videoId, language, captionsUpdatePayload);\n\ \ console.log(result);\n } catch (e) {\n console.error(e);\n\ \ }\n})();\n" - language: python code: "#install the api.video API client library\n#pip install api.video\n\ import apivideo\nfrom apivideo.api import captions_api\nfrom apivideo.model.bad_request\ \ import BadRequest\nfrom apivideo.model.captions_update_payload import\ \ CaptionsUpdatePayload\nfrom apivideo.model.not_found import NotFound\n\ from apivideo.model.caption import Caption\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\ \ = captions_api.CaptionsApi(api_client)\n video_id = \"vi4k0jvEUuaTdRAEjQ4Prklg\"\ \ # str | The unique identifier for the video you want to have automatic\ \ captions for.\n language = \"en\" # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ \ language representation.\n captions_update_payload = CaptionsUpdatePayload(\n\ \ default=True,\n ) # CaptionsUpdatePayload | \n\n # example\ \ passing only required values which don't have defaults set\n try:\n\ \ # Update caption\n api_response = api_instance.update(video_id,\ \ language, captions_update_payload)\n pprint(api_response)\n \ \ except apivideo.ApiException as e:\n print(\"Exception when\ \ calling CaptionsApi->update: %s\\n\" % e)\n" - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.CaptionsApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n CaptionsApi apiInstance\ \ = client.captions();\n \n String videoId = \"vi4k0jvEUuaTdRAEjQ4Prklg\"\ ; // The unique identifier for the video you want to have automatic captions\ \ for.\n String language = \"en\"; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ \ language representation.\n CaptionsUpdatePayload captionsUpdatePayload\ \ = new CaptionsUpdatePayload(); // \n captionsUpdatePayload.setDefault();\ \ // \n\n\n try {\n Caption result = apiInstance.update(videoId,\ \ language, captionsUpdatePayload);\n System.out.println(result);\n\ \ } catch (ApiException e) {\n System.err.println(\"Exception\ \ when calling CaptionsApi#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: "//install via Nuget\n//Install-Package ApiVideo\nusing System.Diagnostics;\n\ using 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 = vi4k0jvEUuaTdRAEjQ4Prklg; // string | The\ \ unique identifier for the video you want to have automatic captions\ \ for.\n var language = en; // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ \ language representation.\n var captionsUpdatePayload = new\ \ CaptionsUpdatePayload(); // CaptionsUpdatePayload | \n var\ \ apiCaptionsInstance = apiInstance.Captions();\n try\n \ \ {\n // Update caption\n Caption\ \ result = apiCaptionsInstance.update(videoId, language, captionsUpdatePayload);\n\ \ Debug.WriteLine(result);\n }\n \ \ catch (ApiException e)\n {\n Debug.Print(\"\ Exception when calling CaptionsApi.update: \" + e.Message );\n \ \ Debug.Print(\"Status Code: \"+ e.ErrorCode);\n \ \ Debug.Print(e.StackTrace);\n }\n }\n }\n}\n" post: description: |- Upload a VTT file to add captions to your video. Read our [captioning tutorial](https://api.video/blog/tutorials/adding-captions) for more details. operationId: POST_videos-videoId-captions-language parameters: - description: The unique identifier for the video you want to add a caption to. example: vi4k0jvEUuaTdRAEjQ4Prklg explode: false in: path name: videoId required: true schema: type: string style: simple - description: A valid BCP 47 language representation. example: en explode: false in: path name: language required: true schema: type: string style: simple requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/captions-upload-payload' required: true responses: "200": content: application/json: examples: response: value: uri: /videos/vi3N6cDinStg3oBbN79GklWS/captions/en src: https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/captions/en.vtt srclang: en default: false schema: $ref: '#/components/schemas/caption' description: Success "400": content: application/json: schema: $ref: '#/components/schemas/bad-request' description: Bad Request "404": content: application/json: schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: Upload a caption tags: - Captions x-client-action: upload x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n videoId := \"vi4k0jvEUuaTdRAEjQ4Prklg\" // string\ \ | The unique identifier for the video you want to add a caption to.\n\ \ language := \"en\" // string | A valid BCP 47 language representation.\n\ \ file := os.NewFile(1234, \"some_file\") // *os.File | The video text\ \ track (VTT) you want to upload.\n\n \n res, err := client.Captions.UploadFile(videoId,\ \ language, file)\n\n // you can also use a Reader instead of a File:\n\ \ // client.Captions.Upload(videoId, language, fileName, fileReader)\n\ \n if err != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling\ \ `Captions.Upload``: %v\\n\", err)\n }\n // response from `Upload`:\ \ Caption\n fmt.Fprintf(os.Stdout, \"Response from `Captions.Upload`:\ \ %v\\n\", res)\n}\n" - language: node code: | //install the module with npm or yarn //npm install @api.video/nodejs-client --save //yarn add @api.video/nodejs-client (async () => { try { const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); const videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg'; // The unique identifier for the video you want to add a caption to. const language = 'en'; // A valid BCP 47 language representation. const file = 'BINARY_DATA_HERE'; // The video text track (VTT) you want to upload. // Caption const result = await client.captions.upload(videoId, language, file); console.log(result); } catch (e) { console.error(e); } })(); - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import captions_api from apivideo.model.bad_request import BadRequest from apivideo.model.not_found import NotFound from apivideo.model.caption import Caption 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 = captions_api.CaptionsApi(api_client) video_id = "vi4k0jvEUuaTdRAEjQ4Prklg" # str | The unique identifier for the video you want to add a caption to. language = "en" # str | A valid BCP 47 language representation. file = open('/path/to/file', 'rb') # file_type | The video text track (VTT) you want to upload. # example passing only required values which don't have defaults set try: # Upload a caption api_response = api_instance.upload(video_id, language, file) pprint(api_response) except apivideo.ApiException as e: print("Exception when calling CaptionsApi->upload: %s\n" % e) - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.CaptionsApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n CaptionsApi apiInstance\ \ = client.captions();\n \n String videoId = \"vi4k0jvEUuaTdRAEjQ4Prklg\"\ ; // The unique identifier for the video you want captions for.\n String\ \ language = \"en\"; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ \ language representation\n\n try {\n Caption result = apiInstance.get(videoId,\ \ language);\n System.out.println(result);\n } catch (ApiException\ \ e) {\n System.err.println(\"Exception when calling CaptionsApi#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: | //install via Nuget //Install-Package ApiVideo using System.Diagnostics; using ApiVideo.Client; namespace Example { public class uploadExample { public static void Main() { var basePath = ApiVideoClient.Client.Environment.SANDBOX; var apiKey = "YOUR_API_KEY"; var apiInstance = new ApiVideoClient(apiKey,basePath); var videoId = vi4k0jvEUuaTdRAEjQ4Prklg; // string | The unique identifier for the video you want to add a caption to. var language = en; // string | A valid BCP 47 language representation. var file = BINARY_DATA_HERE; // System.IO.Stream | The video text track (VTT) you want to upload. var apiCaptionsInstance = apiInstance.Captions(); try { // Upload a caption Caption result = apiCaptionsInstance.upload(videoId, language, file); Debug.WriteLine(result); } catch (ApiException e) { Debug.Print("Exception when calling CaptionsApi.upload: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } } } /videos/{videoId}/captions: get: description: Retrieve a list of available captions for the videoId you provide. operationId: GET_videos-videoId-captions parameters: - description: The unique identifier for the video you want to retrieve a list of captions for. example: vi4k0jvEUuaTdRAEjQ4Prklg explode: false in: path name: videoId required: true schema: type: string style: simple - 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: - uri: /videos/vi3N6cDinStg3oBbN79GklWS/captions/en src: https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/captions/en.vtt srclang: en default: false - uri: /videos/vi3N6cDinStg3oBbN79GklWS/captions/fr src: https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/captions/fr.vtt srclang: fr default: false pagination: currentPage: 1 currentPageItems: 2 pageSize: 25 pagesTotal: 1 itemsTotal: 2 links: - rel: self uri: /videos/vi3N6cDinStg3oBbN79GklWS/captions?currentPage=1&pageSize=25 - rel: first uri: /videos/vi3N6cDinStg3oBbN79GklWS/captions?currentPage=1&pageSize=25 - rel: last uri: /videos/vi3N6cDinStg3oBbN79GklWS/captions?currentPage=1&pageSize=25 schema: $ref: '#/components/schemas/captions-list-response' description: Success "404": content: application/json: schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: List video captions tags: - Captions x-client-action: list x-group-parameters: true x-client-paginated: true x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n videoId := \"vi4k0jvEUuaTdRAEjQ4Prklg\" // string\ \ | The unique identifier for the video you want captions for.\n language\ \ := \"en\" // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ \ language representation\n\n \n res, err := client.Captions.Get(videoId,\ \ language)\n\n if err != nil {\n fmt.Fprintf(os.Stderr, \"\ Error when calling `Captions.Get``: %v\\n\", err)\n }\n // response\ \ from `Get`: Caption\n fmt.Fprintf(os.Stdout, \"Response from `Captions.Get`:\ \ %v\\n\", res)\n}\n" - language: node code: | //install the module with npm or yarn //npm install @api.video/nodejs-client --save //yarn add @api.video/nodejs-client (async () => { try { const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); const videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg'; // The unique identifier for the video you want captions for. const language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation // Caption const result = await client.captions.get(videoId, language); console.log(result); } catch (e) { console.error(e); } })(); - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import captions_api from apivideo.model.not_found import NotFound from apivideo.model.caption import Caption 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 = captions_api.CaptionsApi(api_client) video_id = "vi4k0jvEUuaTdRAEjQ4Prklg" # str | The unique identifier for the video you want captions for. language = "en" # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation # example passing only required values which don't have defaults set try: # Show a caption api_response = api_instance.get(video_id, language) pprint(api_response) except apivideo.ApiException as e: print("Exception when calling CaptionsApi->get: %s\n" % e) - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.CaptionsApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n CaptionsApi apiInstance\ \ = client.captions();\n \n String videoId = \"vi4k0jvEUuaTdRAEjQ4Prklg\"\ ; // The unique identifier for the video you want captions for.\n String\ \ language = \"en\"; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ \ language representation\n\n try {\n Caption result = apiInstance.get(videoId,\ \ language);\n System.out.println(result);\n } catch (ApiException\ \ e) {\n System.err.println(\"Exception when calling CaptionsApi#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: | //install via Nuget //Install-Package ApiVideo using System.Diagnostics; using ApiVideo.Client; namespace Example { public class getExample { public static void Main() { var basePath = ApiVideoClient.Client.Environment.SANDBOX; var apiKey = "YOUR_API_KEY"; var apiInstance = new ApiVideoClient(apiKey,basePath); var videoId = vi4k0jvEUuaTdRAEjQ4Prklg; // string | The unique identifier for the video you want captions for. var language = en; // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation var apiCaptionsInstance = apiInstance.Captions(); try { // Show a caption Caption result = apiCaptionsInstance.get(videoId, language); Debug.WriteLine(result); } catch (ApiException e) { Debug.Print("Exception when calling CaptionsApi.get: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } } } /videos/{videoId}/chapters/{language}: delete: operationId: DELETE_videos-videoId-chapters-language parameters: - description: The unique identifier for the video you want to delete a chapter from. example: vi4k0jvEUuaTdRAEjQ4Jfrgz explode: false in: path name: videoId required: true schema: type: string style: simple - description: A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. example: en explode: false in: path name: language required: true schema: type: string style: simple responses: "204": description: No Content "404": content: application/json: schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: Delete a chapter tags: - Chapters x-client-action: delete x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n videoId := \"vi4k0jvEUuaTdRAEjQ4Jfrgz\" // string\ \ | The unique identifier for the video you want to delete a chapter from.\n\ \ language := \"en\" // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ \ language representation.\n\n \n err := client.Chapters.Delete(videoId,\ \ language)\n\n if err != nil {\n fmt.Fprintf(os.Stderr, \"\ Error when calling `Chapters.Delete``: %v\\n\", err)\n }\n}\n" - language: node code: | //install the module with npm or yarn //npm install @api.video/nodejs-client --save //yarn add @api.video/nodejs-client (async () => { try { const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want to delete a chapter from. const language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. // void const result = await client.chapters.delete(videoId, language); console.log(result); } catch (e) { console.error(e); } })(); - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import chapters_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 = chapters_api.ChaptersApi(api_client) video_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | The unique identifier for the video you want to delete a chapter from. language = "en" # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. # example passing only required values which don't have defaults set try: # Delete a chapter api_instance.delete(video_id, language) except apivideo.ApiException as e: print("Exception when calling ChaptersApi->delete: %s\n" % e) - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.ChaptersApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n ChaptersApi apiInstance\ \ = client.chapters();\n \n String videoId = \"vi4k0jvEUuaTdRAEjQ4Jfrgz\"\ ; // The unique identifier for the video you want to delete a chapter\ \ from.\n String language = \"en\"; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ \ language representation.\n\n try {\n apiInstance.delete(videoId,\ \ language);\n } catch (ApiException e) {\n System.err.println(\"\ Exception when calling ChaptersApi#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: | //install via Nuget //Install-Package ApiVideo 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 unique identifier for the video you want to delete a chapter from. var language = en; // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. var apiChaptersInstance = apiInstance.Chapters(); try { // Delete a chapter apiChaptersInstance.delete(videoId, language); } catch (ApiException e) { Debug.Print("Exception when calling ChaptersApi.delete: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } } } get: description: Chapters help your viewers find the sections of the video they are most interested in viewing. Tutorials that use the [chapters endpoint](https://api.video/blog/endpoints/chapters). operationId: GET_videos-videoId-chapters-language parameters: - description: The unique identifier for the video you want to show a chapter for. example: vi4k0jvEUuaTdRAEjQ4Jfrgz explode: false in: path name: videoId required: true schema: type: string style: simple - description: A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. example: en explode: false in: path name: language required: true schema: type: string style: simple responses: "200": content: application/json: examples: response: value: uri: /videos/vi3N6cDinStg3oBbN79GklWS/chapters/fr src: https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/chapters/fr.vtt language: fr schema: $ref: '#/components/schemas/chapter' description: Success "404": content: application/json: schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: Show a chapter tags: - Chapters x-client-action: get x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n videoId := \"vi4k0jvEUuaTdRAEjQ4Jfrgz\" // string\ \ | The unique identifier for the video you want to show a chapter for.\n\ \ language := \"en\" // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ \ language representation.\n\n \n res, err := client.Chapters.Get(videoId,\ \ language)\n\n if err != nil {\n fmt.Fprintf(os.Stderr, \"\ Error when calling `Chapters.Get``: %v\\n\", err)\n }\n // response\ \ from `Get`: Chapter\n fmt.Fprintf(os.Stdout, \"Response from `Chapters.Get`:\ \ %v\\n\", res)\n}\n" - language: node code: | //install the module with npm or yarn //npm install @api.video/nodejs-client --save //yarn add @api.video/nodejs-client (async () => { try { const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want to show a chapter for. const language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. // Chapter const result = await client.chapters.get(videoId, language); console.log(result); } catch (e) { console.error(e); } })(); - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import chapters_api from apivideo.model.not_found import NotFound from apivideo.model.chapter import Chapter 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 = chapters_api.ChaptersApi(api_client) video_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | The unique identifier for the video you want to show a chapter for. language = "en" # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. # example passing only required values which don't have defaults set try: # Show a chapter api_response = api_instance.get(video_id, language) pprint(api_response) except apivideo.ApiException as e: print("Exception when calling ChaptersApi->get: %s\n" % e) - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.ChaptersApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n ChaptersApi apiInstance\ \ = client.chapters();\n \n String videoId = \"vi4k0jvEUuaTdRAEjQ4Jfrgz\"\ ; // The unique identifier for the video you want to show a chapter for.\n\ \ String language = \"en\"; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ \ language representation.\n\n try {\n Chapter result = apiInstance.get(videoId,\ \ language);\n System.out.println(result);\n } catch (ApiException\ \ e) {\n System.err.println(\"Exception when calling ChaptersApi#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: | //install via Nuget //Install-Package ApiVideo using System.Diagnostics; using ApiVideo.Client; namespace Example { public class getExample { 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 unique identifier for the video you want to show a chapter for. var language = en; // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. var apiChaptersInstance = apiInstance.Chapters(); try { // Show a chapter Chapter result = apiChaptersInstance.get(videoId, language); Debug.WriteLine(result); } catch (ApiException e) { Debug.Print("Exception when calling ChaptersApi.get: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } } } post: description: Chapters help break the video into sections. Read our [tutorial](https://api.video/blog/tutorials/adding-chapters-to-your-videos) for more details. operationId: POST_videos-videoId-chapters-language parameters: - description: The unique identifier for the video you want to upload a chapter for. example: vi4k0jvEUuaTdRAEjQ4Jfrgz explode: false in: path name: videoId required: true schema: type: string style: simple - description: A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. example: en explode: false in: path name: language required: true schema: type: string style: simple requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/chapters-update-payload' required: true responses: "200": content: application/json: examples: response: value: uri: /videos/vi3N6cDinStg3oBbN79GklWS/chapters/fr src: https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/chapters/fr.vtt language: fr schema: $ref: '#/components/schemas/chapter' description: Success "400": content: application/json: schema: $ref: '#/components/schemas/bad-request' description: Bad Request "404": content: application/json: schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: Upload a chapter tags: - Chapters x-client-action: upload x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n videoId := \"vi4k0jvEUuaTdRAEjQ4Jfrgz\" // string\ \ | The unique identifier for the video you want to upload a chapter for.\n\ \ language := \"en\" // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ \ language representation.\n file := os.NewFile(1234, \"some_file\"\ ) // *os.File | The VTT file describing the chapters you want to upload.\n\ \n \n res, err := client.Chapters.UploadFile(videoId, language,\ \ file)\n\n // you can also use a Reader instead of a File:\n //\ \ client.Chapters.Upload(videoId, language, fileName, fileReader)\n\n\ \ if err != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling\ \ `Chapters.Upload``: %v\\n\", err)\n }\n // response from `Upload`:\ \ Chapter\n fmt.Fprintf(os.Stdout, \"Response from `Chapters.Upload`:\ \ %v\\n\", res)\n}\n" - language: node code: | //install the module with npm or yarn //npm install @api.video/nodejs-client --save //yarn add @api.video/nodejs-client (async () => { try { const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want to upload a chapter for. const language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. const file = 'BINARY_DATA_HERE'; // The VTT file describing the chapters you want to upload. // Chapter const result = await client.chapters.upload(videoId, language, file); console.log(result); } catch (e) { console.error(e); } })(); - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import chapters_api from apivideo.model.bad_request import BadRequest from apivideo.model.not_found import NotFound from apivideo.model.chapter import Chapter 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 = chapters_api.ChaptersApi(api_client) video_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | The unique identifier for the video you want to upload a chapter for. language = "en" # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. file = open('/path/to/file', 'rb') # file_type | The VTT file describing the chapters you want to upload. # example passing only required values which don't have defaults set try: # Upload a chapter api_response = api_instance.upload(video_id, language, file) pprint(api_response) except apivideo.ApiException as e: print("Exception when calling ChaptersApi->upload: %s\n" % e) - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.ChaptersApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n ChaptersApi apiInstance\ \ = client.chapters();\n \n String videoId = \"vi4k0jvEUuaTdRAEjQ4Jfrgz\"\ ; // The unique identifier for the video you want to upload a chapter\ \ for.\n String language = \"en\"; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ \ language representation.\n File file = new File(\"/path/to/file\"\ ); // The VTT file describing the chapters you want to upload.\n\n \ \ try {\n Chapter result = apiInstance.upload(videoId, language,\ \ file);\n System.out.println(result);\n } catch (ApiException\ \ e) {\n System.err.println(\"Exception when calling ChaptersApi#upload\"\ );\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: | //install via Nuget //Install-Package ApiVideo using System.Diagnostics; using ApiVideo.Client; namespace Example { public class uploadExample { 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 unique identifier for the video you want to upload a chapter for. var language = en; // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. var file = BINARY_DATA_HERE; // System.IO.Stream | The VTT file describing the chapters you want to upload. var apiChaptersInstance = apiInstance.Chapters(); try { // Upload a chapter Chapter result = apiChaptersInstance.upload(videoId, language, file); Debug.WriteLine(result); } catch (ApiException e) { Debug.Print("Exception when calling ChaptersApi.upload: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } } } /videos/{videoId}/chapters: get: description: Retrieve a list of all chapters for a specified video. operationId: GET_videos-videoId-chapters parameters: - description: The unique identifier for the video you want to retrieve a list of chapters for. example: vi4k0jvEUuaTdRAEjQ4Jfrgz explode: false in: path name: videoId required: true schema: type: string style: simple - 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: - uri: /videos/vi3N6cDinStg3oBbN79GklWS/chapters/fr src: https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/chapters/fr.vtt language: fr - uri: /videos/vi3N6cDinStg3oBbN79GklWS/chapters/en src: https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/chapters/en.vtt language: en pagination: currentPage: 1 currentPageItems: 2 pageSize: 25 pagesTotal: 1 itemsTotal: 2 links: - rel: self uri: /videos/vi3N6cDinStg3oBbN79GklWS/chapters?currentPage=1&pageSize=25 - rel: first uri: /videos/vi3N6cDinStg3oBbN79GklWS/chapters?currentPage=1&pageSize=25 - rel: last uri: /videos/vi3N6cDinStg3oBbN79GklWS/chapters?currentPage=1&pageSize=25 schema: $ref: '#/components/schemas/chapters-list-response' description: Success "404": content: application/json: schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: List video chapters tags: - Chapters x-client-action: list x-group-parameters: true x-client-paginated: true x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n videoId := \"vi4k0jvEUuaTdRAEjQ4Jfrgz\" // string\ \ | The unique identifier for the video you want to show a chapter for.\n\ \ language := \"en\" // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ \ language representation.\n\n \n res, err := client.Chapters.Get(videoId,\ \ language)\n\n if err != nil {\n fmt.Fprintf(os.Stderr, \"\ Error when calling `Chapters.Get``: %v\\n\", err)\n }\n // response\ \ from `Get`: Chapter\n fmt.Fprintf(os.Stdout, \"Response from `Chapters.Get`:\ \ %v\\n\", res)\n}\n" - language: node code: | //install the module with npm or yarn //npm install @api.video/nodejs-client --save //yarn add @api.video/nodejs-client (async () => { try { const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want to show a chapter for. const language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. // Chapter const result = await client.chapters.get(videoId, language); console.log(result); } catch (e) { console.error(e); } })(); - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import chapters_api from apivideo.model.not_found import NotFound from apivideo.model.chapter import Chapter 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 = chapters_api.ChaptersApi(api_client) video_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | The unique identifier for the video you want to show a chapter for. language = "en" # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. # example passing only required values which don't have defaults set try: # Show a chapter api_response = api_instance.get(video_id, language) pprint(api_response) except apivideo.ApiException as e: print("Exception when calling ChaptersApi->get: %s\n" % e) - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.ChaptersApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n ChaptersApi apiInstance\ \ = client.chapters();\n \n String videoId = \"vi4k0jvEUuaTdRAEjQ4Jfrgz\"\ ; // The unique identifier for the video you want to show a chapter for.\n\ \ String language = \"en\"; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers)\ \ language representation.\n\n try {\n Chapter result = apiInstance.get(videoId,\ \ language);\n System.out.println(result);\n } catch (ApiException\ \ e) {\n System.err.println(\"Exception when calling ChaptersApi#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: | //install via Nuget //Install-Package ApiVideo using System.Diagnostics; using ApiVideo.Client; namespace Example { public class getExample { 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 unique identifier for the video you want to show a chapter for. var language = en; // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. var apiChaptersInstance = apiInstance.Chapters(); try { // Show a chapter Chapter result = apiChaptersInstance.get(videoId, language); Debug.WriteLine(result); } catch (ApiException e) { Debug.Print("Exception when calling ChaptersApi.get: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } } } /players: get: description: |- Retrieve a list of all the player themes you created, as well as details about each one. Tutorials that use the [player endpoint](https://api.video/blog/endpoints/player). operationId: GET_players parameters: - description: createdAt is the time the player was created. updatedAt is the time the player was last updated. The time is presented in ISO-8601 format. example: createdAt explode: true in: query name: sortBy required: false schema: enum: - name - createdAt - updatedAt type: string style: form - description: 'Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones.' 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: - playerId: pl4fgtjy4tjyKDK545DRdfg createdAt: 2020-01-13T10:09:17+00:00 updatedAt: 2020-01-13T10:09:17+00:00 text: rgba(255, 255, 255, .95) link: rgba(255, 0, 0, .95) linkHover: rgba(255, 255, 255, .75) linkActive: rgba(255, 0, 0, .75) trackPlayed: rgba(255, 255, 255, .95) trackUnplayed: rgba(255, 255, 255, .1) trackBackground: rgba(0, 0, 0, 0) backgroundTop: rgba(72, 4, 45, 1) backgroundBottom: rgba(94, 95, 89, 1) backgroundText: rgba(255, 255, 255, .95) enableApi: false enableControls: false forceAutoplay: false hideTitle: false forceLoop: false - playerId: pl54fgtjy4tjyKDK45DRdfg createdAt: 2020-01-13T10:09:17+00:00 updatedAt: 2020-01-13T10:09:17+00:00 text: rgba(255, 255, 255, .95) link: rgba(255, 0, 0, .95) linkHover: rgba(255, 255, 255, .75) linkActive: rgba(255, 0, 0, .75) trackPlayed: rgba(255, 255, 255, .95) trackUnplayed: rgba(255, 255, 255, .1) trackBackground: rgba(0, 0, 0, 0) backgroundTop: rgba(72, 4, 45, 1) backgroundBottom: rgba(94, 95, 89, 1) backgroundText: rgba(255, 255, 255, .95) enableApi: true enableControls: true forceAutoplay: true hideTitle: false forceLoop: false pagination: currentPage: 1 pageSize: 25 pagesTotal: 1 itemsTotal: 4 currentPageItems: 4 links: - rel: self uri: https://ws.api.video/players?currentPage=1 - rel: first uri: https://ws.api.video/players?currentPage=1 - rel: last uri: https://ws.api.video/players?currentPage=1 schema: $ref: '#/components/schemas/player-themes-list-response' description: Success "400": content: application/json: 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 schema: $ref: '#/components/schemas/bad-request' description: Bad Request security: - bearerAuth: [] summary: List all player themes tags: - Player Themes x-client-action: list x-group-parameters: true x-client-paginated: true x-optional-object: true x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n req := apivideosdk.PlayerThemesApiListRequest{}\n \n\ \ req.SortBy(\"createdAt\") // string | createdAt is the time the player\ \ was created. updatedAt is the time the player was last updated. The\ \ time is presented in ISO-8601 format.\n req.SortOrder(\"asc\") //\ \ string | Allowed: asc, desc. Ascending for date and time means that\ \ earlier values precede later ones. Descending means that later values\ \ preced earlier ones.\n req.CurrentPage(int32(2)) // int32 | Choose\ \ the number of search results to return per page. Minimum value: 1 (default\ \ to 1)\n req.PageSize(int32(30)) // int32 | Results per page. Allowed\ \ values 1-100, default is 25. (default to 25)\n\n res, err := client.PlayerThemes.List(req)\n\ \ \n\n if err != nil {\n fmt.Fprintf(os.Stderr, \"Error when\ \ calling `PlayerThemes.List``: %v\\n\", err)\n }\n // response\ \ from `List`: PlayerThemesListResponse\n fmt.Fprintf(os.Stdout, \"\ Response from `PlayerThemes.List`: %v\\n\", res)\n}\n" - language: node code: | //install the module with npm or yarn //npm install @api.video/nodejs-client --save //yarn add @api.video/nodejs-client (async () => { try { const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); const sortBy = 'createdAt'; // createdAt is the time the player was created. updatedAt is the time the player was last updated. The time is presented in ISO-8601 format. const sortOrder = 'asc'; // Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones. const currentPage = '2'; // Choose the number of search results to return per page. Minimum value: 1 const pageSize = '30'; // Results per page. Allowed values 1-100, default is 25. // PlayerThemesListResponse const result = await client.playerThemes.list({ sortBy, sortOrder, currentPage, pageSize }) console.log(result); } catch (e) { console.error(e); } })(); - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import player_themes_api from apivideo.model.bad_request import BadRequest from apivideo.model.player_themes_list_response import PlayerThemesListResponse 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 = player_themes_api.PlayerThemesApi(api_client) sort_by = "createdAt" # str | createdAt is the time the player was created. updatedAt is the time the player was last updated. The time is presented in ISO-8601 format. (optional) sort_order = "asc" # str | Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones. (optional) current_page = 2 # int | Choose the number of search results to return per page. Minimum value: 1 (optional) if omitted the server will use the default value of 1 page_size = 30 # int | Results per page. Allowed values 1-100, default is 25. (optional) if omitted the server will use the default value of 25 # example passing only required values which don't have defaults set # and optional values try: # List all players api_response = api_instance.list(sort_by=sort_by, sort_order=sort_order, current_page=current_page, page_size=page_size) pprint(api_response) except apivideo.ApiException as e: print("Exception when calling PlayerThemesApi->list: %s\n" % e) - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.PlayerThemesApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n PlayerThemesApi apiInstance\ \ = client.playerThemes();\n \n String sortBy = \"createdAt\"; //\ \ createdAt is the time the player was created. updatedAt is the time\ \ the player was last updated. The time is presented in ISO-8601 format.\n\ \ String sortOrder = \"asc\"; // Allowed: asc, desc. Ascending for\ \ date and time means that earlier values precede later ones. Descending\ \ means that later values preced earlier ones.\n Integer currentPage\ \ = 1; // Choose the number of search results to return per page. Minimum\ \ value: 1\n Integer pageSize = 25; // Results per page. Allowed values\ \ 1-100, default is 25.\n\n try {\n Page result =\ \ apiInstance.list()\n .sortBy(sortBy)\n .sortOrder(sortOrder)\n\ \ .currentPage(currentPage)\n .pageSize(pageSize)\n\ \ .execute();\n System.out.println(result);\n } catch\ \ (ApiException e) {\n System.err.println(\"Exception when calling\ \ PlayerThemesApi#list\");\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: "//install via Nuget\n//Install-Package ApiVideo\nusing System.Diagnostics;\n\ using ApiVideo.Client;\n\nnamespace Example\n{\n public class listExample\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 sortBy = createdAt; // string | createdAt is the time\ \ the player was created. updatedAt is the time the player was last updated.\ \ The time is presented in ISO-8601 format. (optional) \n var\ \ sortOrder = asc; // string | Allowed: asc, desc. Ascending for date\ \ and time means that earlier values precede later ones. Descending means\ \ that later values preced earlier ones. (optional) \n var\ \ currentPage = 2; // int? | Choose the number of search results to return\ \ per page. Minimum value: 1 (optional) (default to 1)\n var\ \ pageSize = 30; // int? | Results per page. Allowed values 1-100, default\ \ is 25. (optional) (default to 25)\n var apiPlayerThemesInstance\ \ = apiInstance.PlayerThemes();\n try\n {\n \ \ // List all players\n PlayerThemesListResponse\ \ result = apiPlayerThemesInstance.list(sortBy, sortOrder, currentPage,\ \ pageSize);\n Debug.WriteLine(result);\n }\n\ \ catch (ApiException e)\n {\n Debug.Print(\"\ Exception when calling PlayerThemesApi.list: \" + e.Message );\n \ \ Debug.Print(\"Status Code: \"+ e.ErrorCode);\n \ \ Debug.Print(e.StackTrace);\n }\n }\n }\n}\n" post: description: Create a player for your video, and customise it. operationId: POST_players requestBody: content: application/json: schema: $ref: '#/components/schemas/player-theme-creation-payload' required: true responses: "201": content: application/json: examples: response: value: playerId: pl45d5vFFGrfdsdsd156dGhh createdAt: 2020-01-13T10:09:17+00:00 updatedAt: 2020-01-13T10:09:17+00:00 text: rgba(255, 255, 255, .95) link: rgba(255, 0, 0, .95) linkHover: rgba(255, 255, 255, .75) linkActive: rgba(255, 0, 0, .75) trackPlayed: rgba(255, 255, 255, .95) trackUnplayed: rgba(255, 255, 255, .1) trackBackground: rgba(0, 0, 0, 0) backgroundTop: rgba(72, 4, 45, 1) backgroundBottom: rgba(94, 95, 89, 1) backgroundText: rgba(255, 255, 255, .95) enableApi: false enableControls: false forceAutoplay: false hideTitle: false forceLoop: false schema: $ref: '#/components/schemas/player-theme' description: Created security: - bearerAuth: [] summary: Create a player tags: - Player Themes x-client-action: create x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n playerThemeCreationPayload := *apivideosdk.NewPlayerThemeCreationPayload()\ \ // PlayerThemeCreationPayload | \n\n \n res, err := client.PlayerThemes.Create(playerThemeCreationPayload)\n\ \n if err != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling\ \ `PlayerThemes.Create``: %v\\n\", err)\n }\n // response from `Create`:\ \ PlayerTheme\n fmt.Fprintf(os.Stdout, \"Response from `PlayerThemes.Create`:\ \ %v\\n\", res)\n}\n" - language: node code: "//install the module with npm or yarn\n//npm install @api.video/nodejs-client\ \ --save\n//yarn add @api.video/nodejs-client\n(async () => {\n try\ \ {\n const client = new ApiVideoClient({ apiKey: \"YOUR_API_TOKEN\"\ \ });\n\n const playerThemeCreationPayload = {\n text: \"\ text_example\", // RGBA color for timer text. Default: rgba(255, 255,\ \ 255, 1)\n link: \"link_example\", // RGBA color for all controls.\ \ Default: rgba(255, 255, 255, 1)\n linkHover: \"linkHover_example\"\ , // RGBA color for all controls when hovered. Default: rgba(255, 255,\ \ 255, 1)\n trackPlayed: \"trackPlayed_example\", // RGBA color playback\ \ bar: played content. Default: rgba(88, 131, 255, .95)\n trackUnplayed:\ \ \"trackUnplayed_example\", // RGBA color playback bar: downloaded but\ \ unplayed (buffered) content. Default: rgba(255, 255, 255, .35)\n \ \ trackBackground: \"trackBackground_example\", // RGBA color playback\ \ bar: background. Default: rgba(255, 255, 255, .2)\n backgroundTop:\ \ \"backgroundTop_example\", // RGBA color: top 50% of background. Default:\ \ rgba(0, 0, 0, .7)\n backgroundBottom: \"backgroundBottom_example\"\ , // RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7)\n\ \ backgroundText: \"backgroundText_example\", // RGBA color for title\ \ text. Default: rgba(255, 255, 255, 1)\n enableApi: true, // enable/disable\ \ player SDK access. Default: true\n enableControls: true, // enable/disable\ \ player controls. Default: true\n forceAutoplay: true, // enable/disable\ \ player autoplay. Default: false\n hideTitle: true, // enable/disable\ \ title. Default: false\n forceLoop: true, // enable/disable looping.\ \ Default: false\n }; \n\n // PlayerTheme\n const result\ \ = await client.playerThemes.create(playerThemeCreationPayload);\n \ \ console.log(result);\n } catch (e) {\n console.error(e);\n\ \ }\n})();\n" - language: python code: "#install the api.video API client library\n#pip install api.video\n\ import apivideo\nfrom apivideo.api import player_themes_api\nfrom apivideo.model.player_theme_creation_payload\ \ import PlayerThemeCreationPayload\nfrom apivideo.model.player_theme\ \ import PlayerTheme\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\ \ = player_themes_api.PlayerThemesApi(api_client)\n player_theme_creation_payload\ \ = PlayerThemeCreationPayload(\n text=\"text_example\",\n \ \ link=\"link_example\",\n link_hover=\"link_hover_example\"\ ,\n track_played=\"track_played_example\",\n track_unplayed=\"\ track_unplayed_example\",\n track_background=\"track_background_example\"\ ,\n background_top=\"background_top_example\",\n background_bottom=\"\ background_bottom_example\",\n background_text=\"background_text_example\"\ ,\n enable_api=True,\n enable_controls=True,\n force_autoplay=False,\n\ \ hide_title=False,\n force_loop=False,\n ) # PlayerThemeCreationPayload\ \ | \n\n # example passing only required values which don't have defaults\ \ set\n try:\n # Create a player\n api_response = api_instance.create(player_theme_creation_payload)\n\ \ pprint(api_response)\n except apivideo.ApiException as e:\n\ \ print(\"Exception when calling PlayerThemesApi->create: %s\\\ n\" % e)\n" - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.PlayerThemesApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n PlayerThemesApi apiInstance\ \ = client.playerThemes();\n \n PlayerThemeCreationPayload playerThemeCreationPayload\ \ = new PlayerThemeCreationPayload(); // \n playerThemeCreationPayload.setText(\"\ \"null\"\"); // RGBA color for timer text. Default: rgba(255, 255, 255,\ \ 1)\n playerThemeCreationPayload.setLink(\"\"null\"\"); // RGBA color\ \ for all controls. Default: rgba(255, 255, 255, 1)\n playerThemeCreationPayload.setLinkHover(\"\ \"null\"\"); // RGBA color for all controls when hovered. Default: rgba(255,\ \ 255, 255, 1)\n playerThemeCreationPayload.setTrackPlayed(\"\"null\"\ \"); // RGBA color playback bar: played content. Default: rgba(88, 131,\ \ 255, .95)\n playerThemeCreationPayload.setTrackUnplayed(\"\"null\"\ \"); // RGBA color playback bar: downloaded but unplayed (buffered) content.\ \ Default: rgba(255, 255, 255, .35)\n playerThemeCreationPayload.setTrackBackground(\"\ \"null\"\"); // RGBA color playback bar: background. Default: rgba(255,\ \ 255, 255, .2)\n playerThemeCreationPayload.setBackgroundTop(\"\"\ null\"\"); // RGBA color: top 50% of background. Default: rgba(0, 0, 0,\ \ .7)\n playerThemeCreationPayload.setBackgroundBottom(\"\"null\"\"\ ); // RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7)\n\ \ playerThemeCreationPayload.setBackgroundText(\"\"null\"\"); // RGBA\ \ color for title text. Default: rgba(255, 255, 255, 1)\n playerThemeCreationPayload.setEnableApi();\ \ // enable/disable player SDK access. Default: true\n playerThemeCreationPayload.setEnableControls();\ \ // enable/disable player controls. Default: true\n playerThemeCreationPayload.setForceAutoplay();\ \ // enable/disable player autoplay. Default: false\n playerThemeCreationPayload.setHideTitle();\ \ // enable/disable title. Default: false\n playerThemeCreationPayload.setForceLoop();\ \ // enable/disable looping. Default: false\n\n\n try {\n PlayerTheme\ \ result = apiInstance.create(playerThemeCreationPayload);\n System.out.println(result);\n\ \ } catch (ApiException e) {\n System.err.println(\"Exception\ \ when calling PlayerThemesApi#create\");\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: "//install via Nuget\n//Install-Package ApiVideo\nusing System.Diagnostics;\n\ using ApiVideo.Client;\n\nnamespace Example\n{\n public class createExample\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 playerThemeCreationPayload = new PlayerThemeCreationPayload();\ \ // PlayerThemeCreationPayload | \n var apiPlayerThemesInstance\ \ = apiInstance.PlayerThemes();\n try\n {\n \ \ // Create a player\n PlayerTheme result =\ \ apiPlayerThemesInstance.create(playerThemeCreationPayload);\n \ \ Debug.WriteLine(result);\n }\n catch\ \ (ApiException e)\n {\n Debug.Print(\"Exception\ \ when calling PlayerThemesApi.create: \" + e.Message );\n \ \ Debug.Print(\"Status Code: \"+ e.ErrorCode);\n Debug.Print(e.StackTrace);\n\ \ }\n }\n }\n}\n" /players/{playerId}: delete: description: Delete a player if you no longer need it. You can delete any player that you have the player ID for. operationId: DELETE_players-playerId parameters: - description: The unique identifier for the player you want to delete. example: pl45d5vFFGrfdsdsd156dGhh explode: false in: path name: playerId required: true schema: type: string style: simple responses: "204": description: No Content "404": content: application/json: examples: response: value: type: https://docs.api.video/docs/resourcenot_found title: The requested resource was not found. name: playerId status: 404 schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: Delete a player tags: - Player Themes x-client-action: delete x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n playerId := \"pl45d5vFFGrfdsdsd156dGhh\" // string\ \ | The unique identifier for the player you want to delete.\n\n \n\ \ err := client.PlayerThemes.Delete(playerId)\n\n if err != nil\ \ {\n fmt.Fprintf(os.Stderr, \"Error when calling `PlayerThemes.Delete``:\ \ %v\\n\", err)\n }\n}\n" - language: node code: | //install the module with npm or yarn //npm install @api.video/nodejs-client --save //yarn add @api.video/nodejs-client (async () => { try { const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); const playerId = 'pl45d5vFFGrfdsdsd156dGhh'; // The unique identifier for the player you want to delete. // void const result = await client.playerThemes.delete(playerId); console.log(result); } catch (e) { console.error(e); } })(); - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import player_themes_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 = player_themes_api.PlayerThemesApi(api_client) player_id = "pl45d5vFFGrfdsdsd156dGhh" # str | The unique identifier for the player you want to delete. # example passing only required values which don't have defaults set try: # Delete a player api_instance.delete(player_id) except apivideo.ApiException as e: print("Exception when calling PlayerThemesApi->delete: %s\n" % e) - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.PlayerThemesApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n PlayerThemesApi apiInstance\ \ = client.playerThemes();\n \n String playerId = \"pl45d5vFFGrfdsdsd156dGhh\"\ ; // The unique identifier for the player you want to delete.\n\n try\ \ {\n apiInstance.delete(playerId);\n } catch (ApiException e)\ \ {\n System.err.println(\"Exception when calling PlayerThemesApi#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: | //install via Nuget //Install-Package ApiVideo 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 playerId = pl45d5vFFGrfdsdsd156dGhh; // string | The unique identifier for the player you want to delete. var apiPlayerThemesInstance = apiInstance.PlayerThemes(); try { // Delete a player apiPlayerThemesInstance.delete(playerId); } catch (ApiException e) { Debug.Print("Exception when calling PlayerThemesApi.delete: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } } } get: description: Use a player ID to retrieve details about the player and display it for viewers. operationId: GET_players-playerId parameters: - description: 'The unique identifier for the player you want to retrieve. ' example: pl45d5vFFGrfdsdsd156dGhh explode: false in: path name: playerId required: true schema: type: string style: simple responses: "200": content: application/json: examples: response: value: playerId: pl45d5vFFGrfdsdsd156dGhh createdAt: 2020-01-13T10:09:17+00:00 updatedAt: 2020-01-13T11:12:14+00:00 text: rgba(255, 255, 255, .95) link: rgba(255, 0, 0, .95) linkHover: rgba(255, 255, 255, .75) linkActive: rgba(255, 0, 0, .75) trackPlayed: rgba(255, 255, 255, .95) trackUnplayed: rgba(255, 255, 255, .1) trackBackground: rgba(0, 0, 0, 0) backgroundTop: rgba(72, 4, 45, 1) backgroundBottom: rgba(94, 95, 89, 1) backgroundText: rgba(255, 255, 255, .95) enableApi: false enableControls: false forceAutoplay: false hideTitle: false forceLoop: false schema: $ref: '#/components/schemas/player-theme' description: Success "404": content: application/json: examples: response: value: type: https://docs.api.video/docs/resourcenot_found title: The requested resource was not found. name: playerId status: 404 schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: Show a player tags: - Player Themes x-client-action: get x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n playerId := \"pl45d5vFFGrfdsdsd156dGhh\" // string\ \ | The unique identifier for the player you want to retrieve. \n\n \ \ \n res, err := client.PlayerThemes.Get(playerId)\n\n if err !=\ \ nil {\n fmt.Fprintf(os.Stderr, \"Error when calling `PlayerThemes.Get``:\ \ %v\\n\", err)\n }\n // response from `Get`: PlayerTheme\n fmt.Fprintf(os.Stdout,\ \ \"Response from `PlayerThemes.Get`: %v\\n\", res)\n}\n" - language: node code: "//install the module with npm or yarn\n//npm install @api.video/nodejs-client\ \ --save\n//yarn add @api.video/nodejs-client\n(async () => {\n try\ \ {\n const client = new ApiVideoClient({ apiKey: \"YOUR_API_TOKEN\"\ \ });\n\n const playerId = 'pl45d5vFFGrfdsdsd156dGhh'; // The unique\ \ identifier for the player you want to retrieve. \n\n // PlayerTheme\n\ \ const result = await client.playerThemes.get(playerId);\n \ \ console.log(result);\n } catch (e) {\n console.error(e);\n\ \ }\n})();\n" - language: python code: "#install the api.video API client library\n#pip install api.video\n\ import apivideo\nfrom apivideo.api import player_themes_api\nfrom apivideo.model.not_found\ \ import NotFound\nfrom apivideo.model.player_theme import PlayerTheme\n\ from 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 = player_themes_api.PlayerThemesApi(api_client)\n\ \ player_id = \"pl45d5vFFGrfdsdsd156dGhh\" # str | The unique identifier\ \ for the player you want to retrieve. \n\n # example passing only\ \ required values which don't have defaults set\n try:\n # Show\ \ a player\n api_response = api_instance.get(player_id)\n \ \ pprint(api_response)\n except apivideo.ApiException as e:\n \ \ print(\"Exception when calling PlayerThemesApi->get: %s\\n\" % e)\n" - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.PlayerThemesApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n PlayerThemesApi apiInstance\ \ = client.playerThemes();\n \n String playerId = \"pl45d5vFFGrfdsdsd156dGhh\"\ ; // The unique identifier for the player you want to retrieve. \n\n \ \ try {\n PlayerTheme result = apiInstance.get(playerId);\n \ \ System.out.println(result);\n } catch (ApiException e) {\n \ \ System.err.println(\"Exception when calling PlayerThemesApi#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: "//install via Nuget\n//Install-Package ApiVideo\nusing System.Diagnostics;\n\ using 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 playerId = pl45d5vFFGrfdsdsd156dGhh; // string | The\ \ unique identifier for the player you want to retrieve. \n \ \ var apiPlayerThemesInstance = apiInstance.PlayerThemes();\n \ \ try\n {\n // Show a player\n \ \ PlayerTheme result = apiPlayerThemesInstance.get(playerId);\n\ \ Debug.WriteLine(result);\n }\n \ \ catch (ApiException e)\n {\n Debug.Print(\"\ Exception when calling PlayerThemesApi.get: \" + e.Message );\n \ \ Debug.Print(\"Status Code: \"+ e.ErrorCode);\n \ \ Debug.Print(e.StackTrace);\n }\n }\n }\n}\n" patch: description: 'Use a player ID to update specific details for a player. NOTE: It may take up to 10 min before the new player configuration is available from our CDN.' operationId: PATCH_players-playerId parameters: - description: The unique identifier for the player. example: pl45d5vFFGrfdsdsd156dGhh explode: false in: path name: playerId required: true schema: type: string style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/player-theme-update-payload' required: true responses: "200": content: application/json: examples: response: value: playerId: pl45d5vFFGrfdsdsd156dGhh createdAt: 2020-01-13T10:09:17+00:00 updatedAt: 2020-01-13T11:12:14+00:00 text: rgba(255, 255, 255, .95) link: rgba(255, 0, 0, .95) linkHover: rgba(255, 255, 255, .75) linkActive: rgba(255, 0, 0, .75) trackPlayed: rgba(255, 255, 255, .95) trackUnplayed: rgba(255, 255, 255, .1) trackBackground: rgba(0, 0, 0, 0) backgroundTop: rgba(72, 4, 45, 1) backgroundBottom: rgba(94, 95, 89, 1) backgroundText: rgba(255, 255, 255, .95) enableApi: false enableControls: false forceAutoplay: false hideTitle: false forceLoop: false schema: $ref: '#/components/schemas/player-theme' description: Success "404": content: application/json: examples: response: value: type: https://docs.api.video/docs/resourcenot_found title: The requested resource was not found. name: playerId status: 404 schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: Update a player tags: - Player Themes x-client-action: update x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n playerId := \"pl45d5vFFGrfdsdsd156dGhh\" // string\ \ | The unique identifier for the player.\n playerThemeUpdatePayload\ \ := *apivideosdk.NewPlayerThemeUpdatePayload() // PlayerThemeUpdatePayload\ \ | \n\n \n res, err := client.PlayerThemes.Update(playerId, playerThemeUpdatePayload)\n\ \n if err != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling\ \ `PlayerThemes.Update``: %v\\n\", err)\n }\n // response from `Update`:\ \ PlayerTheme\n fmt.Fprintf(os.Stdout, \"Response from `PlayerThemes.Update`:\ \ %v\\n\", res)\n}\n" - language: node code: "//install the module with npm or yarn\n//npm install @api.video/nodejs-client\ \ --save\n//yarn add @api.video/nodejs-client\n(async () => {\n try\ \ {\n const client = new ApiVideoClient({ apiKey: \"YOUR_API_TOKEN\"\ \ });\n\n const playerId = 'pl45d5vFFGrfdsdsd156dGhh'; // The unique\ \ identifier for the player.\n const playerThemeUpdatePayload =\ \ {\n text: \"text_example\", // RGBA color for timer text. Default:\ \ rgba(255, 255, 255, 1)\n link: \"link_example\", // RGBA color\ \ for all controls. Default: rgba(255, 255, 255, 1)\n linkHover:\ \ \"linkHover_example\", // RGBA color for all controls when hovered.\ \ Default: rgba(255, 255, 255, 1)\n trackPlayed: \"trackPlayed_example\"\ , // RGBA color playback bar: played content. Default: rgba(88, 131, 255,\ \ .95)\n trackUnplayed: \"trackUnplayed_example\", // RGBA color\ \ playback bar: downloaded but unplayed (buffered) content. Default: rgba(255,\ \ 255, 255, .35)\n trackBackground: \"trackBackground_example\",\ \ // RGBA color playback bar: background. Default: rgba(255, 255, 255,\ \ .2)\n backgroundTop: \"backgroundTop_example\", // RGBA color:\ \ top 50% of background. Default: rgba(0, 0, 0, .7)\n backgroundBottom:\ \ \"backgroundBottom_example\", // RGBA color: bottom 50% of background.\ \ Default: rgba(0, 0, 0, .7)\n backgroundText: \"backgroundText_example\"\ , // RGBA color for title text. Default: rgba(255, 255, 255, 1)\n \ \ enableApi: true, // enable/disable player SDK access. Default: true\n\ \ enableControls: true, // enable/disable player controls. Default:\ \ true\n forceAutoplay: true, // enable/disable player autoplay.\ \ Default: false\n hideTitle: true, // enable/disable title. Default:\ \ false\n forceLoop: true, // enable/disable looping. Default: false\n\ \ }; \n\n // PlayerTheme\n const result = await client.playerThemes.update(playerId,\ \ playerThemeUpdatePayload);\n console.log(result);\n } catch\ \ (e) {\n console.error(e);\n }\n})();\n" - language: python code: "#install the api.video API client library\n#pip install api.video\n\ import apivideo\nfrom apivideo.api import player_themes_api\nfrom apivideo.model.not_found\ \ import NotFound\nfrom apivideo.model.player_theme import PlayerTheme\n\ from apivideo.model.player_theme_update_payload import PlayerThemeUpdatePayload\n\ from 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 = player_themes_api.PlayerThemesApi(api_client)\n\ \ player_id = \"pl45d5vFFGrfdsdsd156dGhh\" # str | The unique identifier\ \ for the player.\n player_theme_update_payload = PlayerThemeUpdatePayload(\n\ \ text=\"text_example\",\n link=\"link_example\",\n \ \ link_hover=\"link_hover_example\",\n track_played=\"track_played_example\"\ ,\n track_unplayed=\"track_unplayed_example\",\n track_background=\"\ track_background_example\",\n background_top=\"background_top_example\"\ ,\n background_bottom=\"background_bottom_example\",\n background_text=\"\ background_text_example\",\n enable_api=True,\n enable_controls=True,\n\ \ force_autoplay=True,\n hide_title=True,\n force_loop=True,\n\ \ ) # PlayerThemeUpdatePayload | \n\n # example passing only required\ \ values which don't have defaults set\n try:\n # Update a player\n\ \ api_response = api_instance.update(player_id, player_theme_update_payload)\n\ \ pprint(api_response)\n except apivideo.ApiException as e:\n\ \ print(\"Exception when calling PlayerThemesApi->update: %s\\\ n\" % e)\n" - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.PlayerThemesApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n PlayerThemesApi apiInstance\ \ = client.playerThemes();\n \n String playerId = \"pl45d5vFFGrfdsdsd156dGhh\"\ ; // The unique identifier for the player.\n PlayerThemeUpdatePayload\ \ playerThemeUpdatePayload = new PlayerThemeUpdatePayload(); // \n \ \ playerThemeUpdatePayload.setText(\"\"null\"\"); // RGBA color for timer\ \ text. Default: rgba(255, 255, 255, 1)\n playerThemeUpdatePayload.setLink(\"\ \"null\"\"); // RGBA color for all controls. Default: rgba(255, 255, 255,\ \ 1)\n playerThemeUpdatePayload.setLinkHover(\"\"null\"\"); // RGBA\ \ color for all controls when hovered. Default: rgba(255, 255, 255, 1)\n\ \ playerThemeUpdatePayload.setTrackPlayed(\"\"null\"\"); // RGBA color\ \ playback bar: played content. Default: rgba(88, 131, 255, .95)\n \ \ playerThemeUpdatePayload.setTrackUnplayed(\"\"null\"\"); // RGBA color\ \ playback bar: downloaded but unplayed (buffered) content. Default: rgba(255,\ \ 255, 255, .35)\n playerThemeUpdatePayload.setTrackBackground(\"\"\ null\"\"); // RGBA color playback bar: background. Default: rgba(255,\ \ 255, 255, .2)\n playerThemeUpdatePayload.setBackgroundTop(\"\"null\"\ \"); // RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7)\n\ \ playerThemeUpdatePayload.setBackgroundBottom(\"\"null\"\"); // RGBA\ \ color: bottom 50% of background. Default: rgba(0, 0, 0, .7)\n playerThemeUpdatePayload.setBackgroundText(\"\ \"null\"\"); // RGBA color for title text. Default: rgba(255, 255, 255,\ \ 1)\n playerThemeUpdatePayload.setEnableApi(); // enable/disable player\ \ SDK access. Default: true\n playerThemeUpdatePayload.setEnableControls();\ \ // enable/disable player controls. Default: true\n playerThemeUpdatePayload.setForceAutoplay();\ \ // enable/disable player autoplay. Default: false\n playerThemeUpdatePayload.setHideTitle();\ \ // enable/disable title. Default: false\n playerThemeUpdatePayload.setForceLoop();\ \ // enable/disable looping. Default: false\n\n\n try {\n PlayerTheme\ \ result = apiInstance.update(playerId, playerThemeUpdatePayload);\n \ \ System.out.println(result);\n } catch (ApiException e) {\n \ \ System.err.println(\"Exception when calling PlayerThemesApi#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: "//install via Nuget\n//Install-Package ApiVideo\nusing System.Diagnostics;\n\ using 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 playerId = pl45d5vFFGrfdsdsd156dGhh; // string | The\ \ unique identifier for the player.\n var playerThemeUpdatePayload\ \ = new PlayerThemeUpdatePayload(); // PlayerThemeUpdatePayload | \n \ \ var apiPlayerThemesInstance = apiInstance.PlayerThemes();\n\ \ try\n {\n // Update a player\n\ \ PlayerTheme result = apiPlayerThemesInstance.update(playerId,\ \ playerThemeUpdatePayload);\n Debug.WriteLine(result);\n\ \ }\n catch (ApiException e)\n {\n \ \ Debug.Print(\"Exception when calling PlayerThemesApi.update:\ \ \" + e.Message );\n Debug.Print(\"Status Code: \"+ e.ErrorCode);\n\ \ Debug.Print(e.StackTrace);\n }\n }\n\ \ }\n}\n" /players/{playerId}/logo: delete: operationId: DELETE_players-playerId-logo parameters: - description: The unique identifier for the player. example: pl14Db6oMJRH6SRVoOwORacK explode: false in: path name: playerId required: true schema: type: string style: simple responses: "204": description: No Content "404": content: application/json: examples: response: value: type: https://docs.api.video/docs/resourcenot_found title: The requested resource was not found. name: playerId status: 404 schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: Delete logo tags: - Player Themes x-client-action: deleteLogo x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n playerId := \"pl14Db6oMJRH6SRVoOwORacK\" // string\ \ | The unique identifier for the player.\n\n \n err := client.PlayerThemes.DeleteLogo(playerId)\n\ \n if err != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling\ \ `PlayerThemes.DeleteLogo``: %v\\n\", err)\n }\n}\n" - language: node code: | //install the module with npm or yarn //npm install @api.video/nodejs-client --save //yarn add @api.video/nodejs-client (async () => { try { const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); const playerId = 'pl14Db6oMJRH6SRVoOwORacK'; // The unique identifier for the player. // void const result = await client.playerThemes.deleteLogo(playerId); console.log(result); } catch (e) { console.error(e); } })(); - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import player_themes_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 = player_themes_api.PlayerThemesApi(api_client) player_id = "pl14Db6oMJRH6SRVoOwORacK" # str | The unique identifier for the player. # example passing only required values which don't have defaults set try: # Delete logo api_instance.delete_logo(player_id) except apivideo.ApiException as e: print("Exception when calling PlayerThemesApi->delete_logo: %s\n" % e) - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.PlayerThemesApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n PlayerThemesApi apiInstance\ \ = client.playerThemes();\n \n String playerId = \"pl14Db6oMJRH6SRVoOwORacK\"\ ; // The unique identifier for the player.\n\n try {\n apiInstance.deleteLogo(playerId);\n\ \ } catch (ApiException e) {\n System.err.println(\"Exception\ \ when calling PlayerThemesApi#deleteLogo\");\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: | //install via Nuget //Install-Package ApiVideo using System.Diagnostics; using ApiVideo.Client; namespace Example { public class deleteLogoExample { public static void Main() { var basePath = ApiVideoClient.Client.Environment.SANDBOX; var apiKey = "YOUR_API_KEY"; var apiInstance = new ApiVideoClient(apiKey,basePath); var playerId = pl14Db6oMJRH6SRVoOwORacK; // string | The unique identifier for the player. var apiPlayerThemesInstance = apiInstance.PlayerThemes(); try { // Delete logo apiPlayerThemesInstance.deleteLogo(playerId); } catch (ApiException e) { Debug.Print("Exception when calling PlayerThemesApi.deleteLogo: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } } } post: description: The uploaded image maximum size should be 200x100 and its weight should be 100KB. It will be scaled down to 30px height and converted to PNG to be displayed in the player. operationId: POST_players-playerId-logo parameters: - description: The unique identifier for the player. example: pl14Db6oMJRH6SRVoOwORacK explode: false in: path name: playerId required: true schema: type: string style: simple requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/player-theme-upload-logo-payload' required: true responses: "201": content: application/json: schema: $ref: '#/components/schemas/player-theme' description: Created "400": content: application/json: examples: response: value: status: 400 type: https://docs.api.video/docs/fileextension title: Only ['jpg', 'JPG', 'jpeg', 'JPEG', 'png', 'PNG'] extensions are supported. name: file schema: $ref: '#/components/schemas/bad-request' description: Bad Request "404": content: application/json: examples: response: value: type: https://docs.api.video/docs/resourcenot_found title: The requested resource was not found. name: playerId status: 404 schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: Upload a logo tags: - Player Themes x-client-action: uploadLogo x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n playerId := \"pl14Db6oMJRH6SRVoOwORacK\" // string\ \ | The unique identifier for the player.\n file := os.NewFile(1234,\ \ \"some_file\") // *os.File | The name of the file you want to use for\ \ your logo.\n link := \"link_example\" // string | A public link that\ \ you want to advertise in your player. For example, you could add a link\ \ to your company. When a viewer clicks on your logo, they will be taken\ \ to this address.\n\n \n res, err := client.PlayerThemes.UploadLogoFile(playerId,\ \ file)\n\n // you can also use a Reader instead of a File:\n //\ \ client.PlayerThemes.UploadLogo(playerId, fileName, fileReader)\n\n \ \ if err != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling\ \ `PlayerThemes.UploadLogo``: %v\\n\", err)\n }\n // response from\ \ `UploadLogo`: PlayerTheme\n fmt.Fprintf(os.Stdout, \"Response from\ \ `PlayerThemes.UploadLogo`: %v\\n\", res)\n}\n" - language: node code: | //install the module with npm or yarn //npm install @api.video/nodejs-client --save //yarn add @api.video/nodejs-client (async () => { try { const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); const playerId = 'pl14Db6oMJRH6SRVoOwORacK'; // The unique identifier for the player. const file = 'BINARY_DATA_HERE'; // The name of the file you want to use for your logo. const link = 'link_example'; // A public link that you want to advertise in your player. For example, you could add a link to your company. When a viewer clicks on your logo, they will be taken to this address. // PlayerTheme const result = await client.playerThemes.uploadLogo(playerId, file, link); console.log(result); } catch (e) { console.error(e); } })(); - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import player_themes_api from apivideo.model.bad_request import BadRequest from apivideo.model.not_found import NotFound from apivideo.model.player_theme import PlayerTheme 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 = player_themes_api.PlayerThemesApi(api_client) player_id = "pl14Db6oMJRH6SRVoOwORacK" # str | The unique identifier for the player. file = open('/path/to/file', 'rb') # file_type | The name of the file you want to use for your logo. link = "https://my-company.com" # str | A public link that you want to advertise in your player. For example, you could add a link to your company. When a viewer clicks on your logo, they will be taken to this address. (optional) # example passing only required values which don't have defaults set try: # Upload a logo api_response = api_instance.upload_logo(player_id, file) pprint(api_response) except apivideo.ApiException as e: print("Exception when calling PlayerThemesApi->upload_logo: %s\n" % e) # example passing only required values which don't have defaults set # and optional values try: # Upload a logo api_response = api_instance.upload_logo(player_id, file, link=link) pprint(api_response) except apivideo.ApiException as e: print("Exception when calling PlayerThemesApi->upload_logo: %s\n" % e) - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.PlayerThemesApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n PlayerThemesApi apiInstance\ \ = client.playerThemes();\n \n String playerId = \"pl14Db6oMJRH6SRVoOwORacK\"\ ; // The unique identifier for the player.\n File file = new File(\"\ /path/to/file\"); // The name of the file you want to use for your logo.\n\ \ String link = \"link_example\"; // A public link that you want to\ \ advertise in your player. For example, you could add a link to your\ \ company. When a viewer clicks on your logo, they will be taken to this\ \ address.\n\n try {\n PlayerTheme result = apiInstance.uploadLogo(playerId,\ \ file, link);\n System.out.println(result);\n } catch (ApiException\ \ e) {\n System.err.println(\"Exception when calling PlayerThemesApi#uploadLogo\"\ );\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: "//install via Nuget\n//Install-Package ApiVideo\nusing System.Diagnostics;\n\ using ApiVideo.Client;\n\nnamespace Example\n{\n public class uploadLogoExample\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 playerId = pl14Db6oMJRH6SRVoOwORacK; // string | The\ \ unique identifier for the player.\n var file = BINARY_DATA_HERE;\ \ // System.IO.Stream | The name of the file you want to use for your\ \ logo.\n var link = link_example; // string | A public link\ \ that you want to advertise in your player. For example, you could add\ \ a link to your company. When a viewer clicks on your logo, they will\ \ be taken to this address. (optional) \n var apiPlayerThemesInstance\ \ = apiInstance.PlayerThemes();\n try\n {\n \ \ // Upload a logo\n PlayerTheme result = apiPlayerThemesInstance.uploadLogo(playerId,\ \ file, link);\n Debug.WriteLine(result);\n \ \ }\n catch (ApiException e)\n {\n \ \ Debug.Print(\"Exception when calling PlayerThemesApi.uploadLogo:\ \ \" + e.Message );\n Debug.Print(\"Status Code: \"+ e.ErrorCode);\n\ \ Debug.Print(e.StackTrace);\n }\n }\n\ \ }\n}\n" /analytics/videos/{videoId}: get: description: Retrieve all available user sessions for a specific video. Tutorials that use the [analytics endpoint](https://api.video/blog/endpoints/analytics). operationId: GET_analytics-videos-videoId parameters: - description: The unique identifier for the video you want to retrieve session information for. example: vi4k0jvEUuaTdRAEjQ4Prklg explode: false in: path name: videoId required: true schema: type: string style: simple - description: "Period must have one of the following formats: \n- For a day\ \ : 2018-01-01,\n- For a week: 2018-W01, \n- For a month: 2018-01\n- For\ \ a year: 2018\nFor a range period: \n- Date range: 2018-01-01/2018-01-15\n" explode: true in: query name: period required: false schema: format: period type: string style: form - description: Metadata and [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata) filter. Send an array of key value pairs you want to filter sessios with. 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: '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: - session: sessionId: psEmFwGQUAXR2lFHj5nDOpy loadedAt: 2019-06-24T11:45:01.109+00 endedAt: 2019-06-24T11:49:19.243+00 location: country: France city: Paris referrer: url: https://api.video medium: organic source: https://google.com searchTerm: video encoding hosting and delivery device: type: desktop vendor: Dell model: unknown os: name: Microsoft Windows shortname: W10 version: Windows10 client: type: browser name: Firefox version: "67.0" pagination: currentPage: 1 currentPageItems: 1 pageSize: 25 pagesTotal: 1 itemsTotal: 1 links: - rel: self uri: /analytics/sessions/psEmFwGQUAXR2lFHj5nDOpy?currentPage=1&pageSize=25 - rel: first uri: /analytics/sessions/psEmFwGQUAXR2lFHj5nDOpy?currentPage=1&pageSize=25 - rel: last uri: /analytics/sessions/psEmFwGQUAXR2lFHj5nDOpy?currentPage=1&pageSize=25 schema: $ref: '#/components/schemas/raw-statistics-list-sessions-response' description: Success "404": content: application/json: examples: response: value: type: https://docs.api.video/docs/resourcenot_found title: The requested resource was not found. name: videoId status: 404 schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: List video player sessions tags: - Raw statistics x-client-action: listVideoSessions x-group-parameters: true x-client-paginated: true x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n req := apivideosdk.RawStatisticsApiListVideoSessionsRequest{}\n\ \ \n req.VideoId(\"vi4k0jvEUuaTdRAEjQ4Prklg\") // string | The unique\ \ identifier for the video you want to retrieve session information for.\n\ \ req.Period(\"period_example\") // string | Period must have one of\ \ the following formats: - For a day : 2018-01-01, - For a week: 2018-W01,\ \ - For a month: 2018-01 - For a year: 2018 For a range period: - Date\ \ range: 2018-01-01/2018-01-15 \n req.Metadata(map[string]string{\"\ key\": \"Inner_example\"}) // map[string]string | Metadata and Dynamic\ \ Metadata filter. Send an array of key value pairs you want to filter\ \ sessios with.\n req.CurrentPage(int32(2)) // int32 | Choose the number\ \ of search results to return per page. Minimum value: 1 (default to 1)\n\ \ req.PageSize(int32(30)) // int32 | Results per page. Allowed values\ \ 1-100, default is 25. (default to 25)\n\n res, err := client.RawStatistics.ListVideoSessions(videoId\ \ string, req)\n \n\n if err != nil {\n fmt.Fprintf(os.Stderr,\ \ \"Error when calling `RawStatistics.ListVideoSessions``: %v\\n\", err)\n\ \ }\n // response from `ListVideoSessions`: RawStatisticsListSessionsResponse\n\ \ fmt.Fprintf(os.Stdout, \"Response from `RawStatistics.ListVideoSessions`:\ \ %v\\n\", res)\n}\n" - language: node code: "//install the module with npm or yarn\n//npm install @api.video/nodejs-client\ \ --save\n//yarn add @api.video/nodejs-client\n(async () => {\n try\ \ {\n const client = new ApiVideoClient({ apiKey: \"YOUR_API_TOKEN\"\ \ });\n\n const videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg'; // The unique\ \ identifier for the video you want to retrieve session information for.\n\ \ const period = 'period_example'; // Period must have one of the\ \ following formats: - For a day : 2018-01-01, - For a week: 2018-W01,\ \ - For a month: 2018-01 - For a year: 2018 For a range period: - Date\ \ range: 2018-01-01/2018-01-15 \n const metadata = 'metadata[Author]=John\ \ Doe&metadata[Format]=Tutorial'; // Metadata and Dynamic Metadata filter.\ \ Send an array of key value pairs you want to filter sessios with.\n\ \ const currentPage = '2'; // Choose the number of search results\ \ to return per page. Minimum value: 1\n const pageSize = '30';\ \ // Results per page. Allowed values 1-100, default is 25.\n\n \ \ // RawStatisticsListSessionsResponse\n const result = await\ \ client.rawStatistics.listVideoSessions({ videoId, period, metadata,\ \ currentPage, pageSize })\n console.log(result);\n } catch\ \ (e) {\n console.error(e);\n }\n})();\n" - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import raw_statistics_api from apivideo.model.not_found import NotFound from apivideo.model.raw_statistics_list_sessions_response import RawStatisticsListSessionsResponse 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 = raw_statistics_api.RawStatisticsApi(api_client) video_id = "vi4k0jvEUuaTdRAEjQ4Prklg" # str | The unique identifier for the video you want to retrieve session information for. period = "period_example" # str | Period must have one of the following formats: - For a day : 2018-01-01, - For a week: 2018-W01, - For a month: 2018-01 - For a year: 2018 For a range period: - Date range: 2018-01-01/2018-01-15 (optional) metadata = { "key": "key_example", } # {str: (str,)} | Metadata and Dynamic Metadata filter. Send an array of key value pairs you want to filter sessios with. (optional) current_page = 2 # int | Choose the number of search results to return per page. Minimum value: 1 (optional) if omitted the server will use the default value of 1 page_size = 30 # int | Results per page. Allowed values 1-100, default is 25. (optional) if omitted the server will use the default value of 25 # example passing only required values which don't have defaults set try: # List video player sessions api_response = api_instance.list_video_sessions(video_id) pprint(api_response) except apivideo.ApiException as e: print("Exception when calling RawStatisticsApi->list_video_sessions: %s\n" % e) # example passing only required values which don't have defaults set # and optional values try: # List video player sessions api_response = api_instance.list_video_sessions(video_id, period=period, metadata=metadata, current_page=current_page, page_size=page_size) pprint(api_response) except apivideo.ApiException as e: print("Exception when calling RawStatisticsApi->list_video_sessions: %s\n" % e) - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.RawStatisticsApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n RawStatisticsApi apiInstance\ \ = client.rawStatistics();\n \n String videoId = \"vi4k0jvEUuaTdRAEjQ4Prklg\"\ ; // The unique identifier for the video you want to retrieve session\ \ information for.\n String period = \"period_example\"; // Period\ \ must have one of the following formats: - For a day : 2018-01-01, -\ \ For a week: 2018-W01, - For a month: 2018-01 - For a year: 2018 For\ \ a range period: - Date range: 2018-01-01/2018-01-15 \n Map metadata = new HashMap(); // Metadata and Dynamic Metadata filter.\ \ Send an array of key value pairs you want to filter sessios with.\n\ \ Integer currentPage = 1; // Choose the number of search results to\ \ return per page. Minimum value: 1\n Integer pageSize = 25; // Results\ \ per page. Allowed values 1-100, default is 25.\n\n try {\n Page\ \ result = apiInstance.listVideoSessions(videoId)\n .period(period)\n\ \ .metadata(metadata)\n .currentPage(currentPage)\n\ \ .pageSize(pageSize)\n .execute();\n System.out.println(result);\n\ \ } catch (ApiException e) {\n System.err.println(\"Exception\ \ when calling RawStatisticsApi#listVideoSessions\");\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: "//install via Nuget\n//Install-Package ApiVideo\nusing System.Diagnostics;\n\ using ApiVideo.Client;\n\nnamespace Example\n{\n public class listVideoSessionsExample\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 = vi4k0jvEUuaTdRAEjQ4Prklg; // string | The\ \ unique identifier for the video you want to retrieve session information\ \ for.\n var period = period_example; // string | Period must\ \ have one of the following formats: - For a day : 2018-01-01, - For\ \ a week: 2018-W01, - For a month: 2018-01 - For a year: 2018 For a range\ \ period: - Date range: 2018-01-01/2018-01-15 (optional) \n \ \ var metadata = new Dictionary(); // Dictionary | Metadata and Dynamic Metadata filter. Send an array of key\ \ value pairs you want to filter sessios with. (optional) \n \ \ var currentPage = 2; // int? | Choose the number of search results\ \ to return per page. Minimum value: 1 (optional) (default to 1)\n \ \ var pageSize = 30; // int? | Results per page. Allowed values\ \ 1-100, default is 25. (optional) (default to 25)\n var apiRawStatisticsInstance\ \ = apiInstance.RawStatistics();\n try\n {\n \ \ // List video player sessions\n RawStatisticsListSessionsResponse\ \ result = apiRawStatisticsInstance.listVideoSessions(videoId, period,\ \ metadata, currentPage, pageSize);\n Debug.WriteLine(result);\n\ \ }\n catch (ApiException e)\n {\n \ \ Debug.Print(\"Exception when calling RawStatisticsApi.listVideoSessions:\ \ \" + e.Message );\n Debug.Print(\"Status Code: \"+ e.ErrorCode);\n\ \ Debug.Print(e.StackTrace);\n }\n }\n\ \ }\n}\n" /analytics/live-streams/{liveStreamId}: get: operationId: GET_analytics-live-streams-liveStreamId parameters: - description: The unique identifier for the live stream you want to retrieve analytics for. example: vi4k0jvEUuaTdRAEjQ4Jfrgz explode: false in: path name: liveStreamId required: true schema: type: string style: simple - description: "Period must have one of the following formats: \n- For a day\ \ : \"2018-01-01\",\n- For a week: \"2018-W01\", \n- For a month: \"2018-01\"\ \n- For a year: \"2018\"\nFor a range period: \n- Date range: \"2018-01-01/2018-01-15\"\ \n" example: 2019-01-01 explode: true in: query name: period required: false schema: format: period 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: - session: sessionId: ps4zRWVOv2If2vzKJLMr3jQo loadedAt: 2018-09-11T13:04:37.89+00 endedAt: 2018-09-11T14:47:22.186+00 location: country: France city: Paris referrer: url: unknown medium: unknown source: unknown searchTerm: unknown device: type: desktop vendor: unknown model: unknown os: name: unknown shortname: unknown version: unknown client: type: browser name: Firefox version: "61.0" pagination: currentPage: 1 currentPageItems: 1 pageSize: 25 pagesTotal: 1 itemsTotal: 1 links: - rel: self uri: /analytics/sessions/ps4zRWVOv2If2vzKJLMr3jQo?currentPage=1&pageSize=25 - rel: first uri: /analytics/sessions/ps4zRWVOv2If2vzKJLMr3jQo?currentPage=1&pageSize=25 - rel: last uri: /analytics/sessions/ps4zRWVOv2If2vzKJLMr3jQo?currentPage=1&pageSize=25 schema: $ref: '#/components/schemas/raw-statistics-list-live-stream-analytics-response' description: Success "404": content: application/json: examples: response: value: type: https://docs.api.video/docs/resourcenot_found title: The requested resource was not found. name: liveStreamId status: 404 schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: List live stream player sessions tags: - Raw statistics x-client-action: listLiveStreamSessions x-group-parameters: true x-client-paginated: true x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n req := apivideosdk.RawStatisticsApiListLiveStreamSessionsRequest{}\n\ \ \n req.LiveStreamId(\"vi4k0jvEUuaTdRAEjQ4Jfrgz\") // string |\ \ The unique identifier for the live stream you want to retrieve analytics\ \ for.\n req.Period(\"2019-01-01\") // string | Period must have one\ \ of the following formats: - For a day : \\\"2018-01-01\\\", - For a\ \ week: \\\"2018-W01\\\", - For a month: \\\"2018-01\\\" - For a year:\ \ \\\"2018\\\" For a range period: - Date range: \\\"2018-01-01/2018-01-15\\\ \" \n req.CurrentPage(int32(2)) // int32 | Choose the number of search\ \ results to return per page. Minimum value: 1 (default to 1)\n req.PageSize(int32(30))\ \ // int32 | Results per page. Allowed values 1-100, default is 25. (default\ \ to 25)\n\n res, err := client.RawStatistics.ListLiveStreamSessions(liveStreamId\ \ string, req)\n \n\n if err != nil {\n fmt.Fprintf(os.Stderr,\ \ \"Error when calling `RawStatistics.ListLiveStreamSessions``: %v\\n\"\ , err)\n }\n // response from `ListLiveStreamSessions`: RawStatisticsListLiveStreamAnalyticsResponse\n\ \ fmt.Fprintf(os.Stdout, \"Response from `RawStatistics.ListLiveStreamSessions`:\ \ %v\\n\", res)\n}\n" - language: node code: "//install the module with npm or yarn\n//npm install @api.video/nodejs-client\ \ --save\n//yarn add @api.video/nodejs-client\n(async () => {\n try\ \ {\n const client = new ApiVideoClient({ apiKey: \"YOUR_API_TOKEN\"\ \ });\n\n const liveStreamId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The\ \ unique identifier for the live stream you want to retrieve analytics\ \ for.\n const period = '2019-01-01'; // Period must have one of\ \ the following formats: - For a day : \\\"2018-01-01\\\", - For a week:\ \ \\\"2018-W01\\\", - For a month: \\\"2018-01\\\" - For a year: \\\"\ 2018\\\" For a range period: - Date range: \\\"2018-01-01/2018-01-15\\\ \" \n const currentPage = '2'; // Choose the number of search results\ \ to return per page. Minimum value: 1\n const pageSize = '30';\ \ // Results per page. Allowed values 1-100, default is 25.\n\n \ \ // RawStatisticsListLiveStreamAnalyticsResponse\n const result\ \ = await client.rawStatistics.listLiveStreamSessions({ liveStreamId,\ \ period, currentPage, pageSize })\n console.log(result);\n \ \ } catch (e) {\n console.error(e);\n }\n})();\n" - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import raw_statistics_api from apivideo.model.raw_statistics_list_live_stream_analytics_response import RawStatisticsListLiveStreamAnalyticsResponse 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 = raw_statistics_api.RawStatisticsApi(api_client) live_stream_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | The unique identifier for the live stream you want to retrieve analytics for. period = "2019-01-01" # str | Period must have one of the following formats: - For a day : \"2018-01-01\", - For a week: \"2018-W01\", - For a month: \"2018-01\" - For a year: \"2018\" For a range period: - Date range: \"2018-01-01/2018-01-15\" (optional) current_page = 2 # int | Choose the number of search results to return per page. Minimum value: 1 (optional) if omitted the server will use the default value of 1 page_size = 30 # int | Results per page. Allowed values 1-100, default is 25. (optional) if omitted the server will use the default value of 25 # example passing only required values which don't have defaults set try: # List live stream player sessions api_response = api_instance.list_live_stream_sessions(live_stream_id) pprint(api_response) except apivideo.ApiException as e: print("Exception when calling RawStatisticsApi->list_live_stream_sessions: %s\n" % e) # example passing only required values which don't have defaults set # and optional values try: # List live stream player sessions api_response = api_instance.list_live_stream_sessions(live_stream_id, period=period, current_page=current_page, page_size=page_size) pprint(api_response) except apivideo.ApiException as e: print("Exception when calling RawStatisticsApi->list_live_stream_sessions: %s\n" % e) - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.RawStatisticsApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n RawStatisticsApi apiInstance\ \ = client.rawStatistics();\n \n String liveStreamId = \"vi4k0jvEUuaTdRAEjQ4Jfrgz\"\ ; // The unique identifier for the live stream you want to retrieve analytics\ \ for.\n String period = \"2019-01-01\"; // Period must have one of\ \ the following formats: - For a day : \\\"2018-01-01\\\", - For a week:\ \ \\\"2018-W01\\\", - For a month: \\\"2018-01\\\" - For a year: \\\"\ 2018\\\" For a range period: - Date range: \\\"2018-01-01/2018-01-15\\\ \" \n Integer currentPage = 1; // Choose the number of search results\ \ to return per page. Minimum value: 1\n Integer pageSize = 25; //\ \ Results per page. Allowed values 1-100, default is 25.\n\n try {\n\ \ Page result = apiInstance.listLiveStreamSessions(liveStreamId)\n\ \ .period(period)\n .currentPage(currentPage)\n\ \ .pageSize(pageSize)\n .execute();\n System.out.println(result);\n\ \ } catch (ApiException e) {\n System.err.println(\"Exception\ \ when calling RawStatisticsApi#listLiveStreamSessions\");\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: "//install via Nuget\n//Install-Package ApiVideo\nusing System.Diagnostics;\n\ using ApiVideo.Client;\n\nnamespace Example\n{\n public class listLiveStreamSessionsExample\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 liveStreamId = vi4k0jvEUuaTdRAEjQ4Jfrgz; // string\ \ | The unique identifier for the live stream you want to retrieve analytics\ \ for.\n var period = 2019-01-01; // string | Period must\ \ have one of the following formats: - For a day : \\\"2018-01-01\\\"\ , - For a week: \\\"2018-W01\\\", - For a month: \\\"2018-01\\\" - For\ \ a year: \\\"2018\\\" For a range period: - Date range: \\\"2018-01-01/2018-01-15\\\ \" (optional) \n var currentPage = 2; // int? | Choose the\ \ number of search results to return per page. Minimum value: 1 (optional)\ \ (default to 1)\n var pageSize = 30; // int? | Results per\ \ page. Allowed values 1-100, default is 25. (optional) (default to 25)\n\ \ var apiRawStatisticsInstance = apiInstance.RawStatistics();\n\ \ try\n {\n // List live stream player\ \ sessions\n RawStatisticsListLiveStreamAnalyticsResponse\ \ result = apiRawStatisticsInstance.listLiveStreamSessions(liveStreamId,\ \ period, currentPage, pageSize);\n Debug.WriteLine(result);\n\ \ }\n catch (ApiException e)\n {\n \ \ Debug.Print(\"Exception when calling RawStatisticsApi.listLiveStreamSessions:\ \ \" + e.Message );\n Debug.Print(\"Status Code: \"+ e.ErrorCode);\n\ \ Debug.Print(e.StackTrace);\n }\n }\n\ \ }\n}\n" /analytics/sessions/{sessionId}/events: get: description: Useful to track and measure video's engagement. operationId: GET_analytics-sessions-sessionId-events parameters: - description: A unique identifier you can use to reference and track a session with. example: psEmFwGQUAXR2lFHj5nDOpy explode: false in: path name: sessionId required: true schema: type: string style: simple - 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: - type: ready emittedAt: 2020-09-15T09:47:42+00:00 at: 0 - type: play emittedAt: 2020-09-15T21:35:57+00:00 at: 0 - type: pause emittedAt: 2020-09-15T21:36:05+00:00 at: 7 - type: resume emittedAt: 2020-09-15T21:36:19+00:00 at: 21 - type: seek.forward emittedAt: 2020-09-15T21:36:19+00:00 from: 7 to: 21 - type: end emittedAt: 2020-09-15T21:36:28+00:00 at: 30 - type: play emittedAt: 2020-09-15T21:36:29+00:00 at: 0 - type: seek.backward emittedAt: 2020-09-15T21:36:29+00:00 from: 30 to: 0 - type: pause emittedAt: 2020-09-15T21:36:29+00:00 at: 21 - type: resume emittedAt: 2020-09-15T21:36:30+00:00 at: 21 - type: seek.forward emittedAt: 2020-09-15T21:36:30+00:00 from: 0 to: 21 - type: pause emittedAt: 2020-09-15T21:36:33+00:00 at: 20 - type: resume emittedAt: 2020-09-15T21:36:33+00:00 at: 20 - type: seek.backward emittedAt: 2020-09-15T21:36:33+00:00 from: 24 to: 20 - type: pause emittedAt: 2020-09-15T21:36:39+00:00 at: 17 - type: resume emittedAt: 2020-09-15T21:36:39+00:00 at: 17 - type: seek.forward emittedAt: 2020-09-15T21:36:39+00:00 from: 17 to: 17 - type: pause emittedAt: 2020-09-15T21:36:41+00:00 at: 19 - type: ready emittedAt: 2020-09-17T09:20:47+00:00 at: 0 - type: ready emittedAt: 2020-09-17T09:41:01+00:00 at: 0 - type: ready emittedAt: 2020-09-17T09:41:08+00:00 at: 0 - type: play emittedAt: 2020-09-17T09:41:10+00:00 at: 0 - type: pause emittedAt: 2020-09-17T09:41:12+00:00 at: 1 - type: resume emittedAt: 2020-09-17T09:41:13+00:00 at: 1 - type: pause emittedAt: 2020-09-17T09:41:15+00:00 at: 3 pagination: currentPage: 1 currentPageItems: 25 pageSize: 25 pagesTotal: 2 itemsTotal: 30 links: - rel: self uri: /analytics/sessions/ps5ltuhfsTOeh6bP03Tq5OWc/events?currentPage=1&pageSize=25 - rel: first uri: /analytics/sessions/ps5ltuhfsTOeh6bP03Tq5OWc/events?currentPage=1&pageSize=25 - rel: next uri: /analytics/sessions/ps5ltuhfsTOeh6bP03Tq5OWc/events?currentPage=2&pageSize=25 - rel: last uri: /analytics/sessions/ps5ltuhfsTOeh6bP03Tq5OWc/events?currentPage=2&pageSize=25 schema: $ref: '#/components/schemas/raw-statistics-list-player-session-events-response' description: Success "404": content: application/json: examples: response: value: type: https://docs.api.video/docs/resourcenot_found title: The requested resource was not found. name: videoId status: 404 schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: List player session events tags: - Raw statistics x-client-action: listSessionEvents x-group-parameters: true x-client-paginated: true x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n req := apivideosdk.RawStatisticsApiListSessionEventsRequest{}\n\ \ \n req.SessionId(\"psEmFwGQUAXR2lFHj5nDOpy\") // string | A unique\ \ identifier you can use to reference and track a session with.\n req.CurrentPage(int32(2))\ \ // int32 | Choose the number of search results to return per page. Minimum\ \ value: 1 (default to 1)\n req.PageSize(int32(30)) // int32 | Results\ \ per page. Allowed values 1-100, default is 25. (default to 25)\n\n \ \ res, err := client.RawStatistics.ListSessionEvents(sessionId string,\ \ req)\n \n\n if err != nil {\n fmt.Fprintf(os.Stderr, \"\ Error when calling `RawStatistics.ListSessionEvents``: %v\\n\", err)\n\ \ }\n // response from `ListSessionEvents`: RawStatisticsListPlayerSessionEventsResponse\n\ \ fmt.Fprintf(os.Stdout, \"Response from `RawStatistics.ListSessionEvents`:\ \ %v\\n\", res)\n}\n" - language: node code: | //install the module with npm or yarn //npm install @api.video/nodejs-client --save //yarn add @api.video/nodejs-client (async () => { try { const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); const sessionId = 'psEmFwGQUAXR2lFHj5nDOpy'; // A unique identifier you can use to reference and track a session with. const currentPage = '2'; // Choose the number of search results to return per page. Minimum value: 1 const pageSize = '30'; // Results per page. Allowed values 1-100, default is 25. // RawStatisticsListPlayerSessionEventsResponse const result = await client.rawStatistics.listSessionEvents({ sessionId, currentPage, pageSize }) console.log(result); } catch (e) { console.error(e); } })(); - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import raw_statistics_api from apivideo.model.not_found import NotFound from apivideo.model.raw_statistics_list_player_session_events_response import RawStatisticsListPlayerSessionEventsResponse 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 = raw_statistics_api.RawStatisticsApi(api_client) session_id = "psEmFwGQUAXR2lFHj5nDOpy" # str | A unique identifier you can use to reference and track a session with. current_page = 2 # int | Choose the number of search results to return per page. Minimum value: 1 (optional) if omitted the server will use the default value of 1 page_size = 30 # int | Results per page. Allowed values 1-100, default is 25. (optional) if omitted the server will use the default value of 25 # example passing only required values which don't have defaults set try: # List player session events api_response = api_instance.list_session_events(session_id) pprint(api_response) except apivideo.ApiException as e: print("Exception when calling RawStatisticsApi->list_session_events: %s\n" % e) # example passing only required values which don't have defaults set # and optional values try: # List player session events api_response = api_instance.list_session_events(session_id, current_page=current_page, page_size=page_size) pprint(api_response) except apivideo.ApiException as e: print("Exception when calling RawStatisticsApi->list_session_events: %s\n" % e) - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.RawStatisticsApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n RawStatisticsApi apiInstance\ \ = client.rawStatistics();\n \n String sessionId = \"psEmFwGQUAXR2lFHj5nDOpy\"\ ; // A unique identifier you can use to reference and track a session\ \ with.\n Integer currentPage = 1; // Choose the number of search results\ \ to return per page. Minimum value: 1\n Integer pageSize = 25; //\ \ Results per page. Allowed values 1-100, default is 25.\n\n try {\n\ \ Page result = apiInstance.listSessionEvents(sessionId)\n\ \ .currentPage(currentPage)\n .pageSize(pageSize)\n\ \ .execute();\n System.out.println(result);\n } catch\ \ (ApiException e) {\n System.err.println(\"Exception when calling\ \ RawStatisticsApi#listSessionEvents\");\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: | //install via Nuget //Install-Package ApiVideo using System.Diagnostics; using ApiVideo.Client; namespace Example { public class listSessionEventsExample { public static void Main() { var basePath = ApiVideoClient.Client.Environment.SANDBOX; var apiKey = "YOUR_API_KEY"; var apiInstance = new ApiVideoClient(apiKey,basePath); var sessionId = psEmFwGQUAXR2lFHj5nDOpy; // string | A unique identifier you can use to reference and track a session with. var currentPage = 2; // int? | Choose the number of search results to return per page. Minimum value: 1 (optional) (default to 1) var pageSize = 30; // int? | Results per page. Allowed values 1-100, default is 25. (optional) (default to 25) var apiRawStatisticsInstance = apiInstance.RawStatistics(); try { // List player session events RawStatisticsListPlayerSessionEventsResponse result = apiRawStatisticsInstance.listSessionEvents(sessionId, currentPage, pageSize); Debug.WriteLine(result); } catch (ApiException e) { Debug.Print("Exception when calling RawStatisticsApi.listSessionEvents: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } } } /webhooks: get: description: Requests to this endpoint return a list of your webhooks (with all their details). You can filter what the webhook list that the API returns using the parameters described below. operationId: LIST-webhooks parameters: - description: The webhook event that you wish to filter on. example: video.encoding.quality.completed explode: true in: query name: events required: false schema: 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: - webhookId: webhook_XXXXXXXXXXXXXXX createdAt: 2021-01-08T14:12:18.000+00:00 events: - video.encoding.quality.completed url: http://clientnotificationserver.com/notif?myquery=query - webhookId: webhook_XXXXXXXXXYYYYYY createdAt: 2021-01-12T12:12:12.000+00:00 events: - video.encoding.quality.completed url: http://clientnotificationserver.com/notif?myquery=query2 pagination: currentPage: 1 pageSize: 25 pagesTotal: 1 itemsTotal: 11 currentPageItems: 11 links: - rel: self uri: https://ws.api.video/webhooks?currentPage=1 - rel: first uri: https://ws.api.video/webhooks?currentPage=1 - rel: last uri: https://ws.api.video/webhooks?currentPage=1 schema: $ref: '#/components/schemas/webhooks-list-response' description: Success security: - bearerAuth: [] summary: List all webhooks tags: - Webhooks x-group-parameters: true x-client-paginated: true x-optional-object: true x-client-action: list x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n req := apivideosdk.WebhooksApiListRequest{}\n \n \ \ req.Events(\"video.encoding.quality.completed\") // string | The webhook\ \ event that you wish to filter on.\n req.CurrentPage(int32(2)) //\ \ int32 | Choose the number of search results to return per page. Minimum\ \ value: 1 (default to 1)\n req.PageSize(int32(30)) // int32 | Results\ \ per page. Allowed values 1-100, default is 25. (default to 25)\n\n \ \ res, err := client.Webhooks.List(req)\n \n\n if err != nil {\n\ \ fmt.Fprintf(os.Stderr, \"Error when calling `Webhooks.List``:\ \ %v\\n\", err)\n }\n // response from `List`: WebhooksListResponse\n\ \ fmt.Fprintf(os.Stdout, \"Response from `Webhooks.List`: %v\\n\",\ \ res)\n}\n" - language: node code: | //install the module with npm or yarn //npm install @api.video/nodejs-client --save //yarn add @api.video/nodejs-client (async () => { try { const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); const events = 'video.encoding.quality.completed'; // The webhook event that you wish to filter on. const currentPage = '2'; // Choose the number of search results to return per page. Minimum value: 1 const pageSize = '30'; // Results per page. Allowed values 1-100, default is 25. // WebhooksListResponse const result = await client.webhooks.list({ events, currentPage, pageSize }) console.log(result); } catch (e) { console.error(e); } })(); - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import webhooks_api from apivideo.model.webhooks_list_response import WebhooksListResponse 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 = webhooks_api.WebhooksApi(api_client) events = "video.encoding.quality.completed" # str | The webhook event that you wish to filter on. (optional) current_page = 2 # int | Choose the number of search results to return per page. Minimum value: 1 (optional) if omitted the server will use the default value of 1 page_size = 30 # int | Results per page. Allowed values 1-100, default is 25. (optional) if omitted the server will use the default value of 25 # example passing only required values which don't have defaults set # and optional values try: # List all webhooks api_response = api_instance.list(events=events, current_page=current_page, page_size=page_size) pprint(api_response) except apivideo.ApiException as e: print("Exception when calling WebhooksApi->list: %s\n" % e) - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.WebhooksApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n WebhooksApi apiInstance\ \ = client.webhooks();\n \n String events = \"video.encoding.quality.completed\"\ ; // The webhook event that you wish to filter on.\n Integer currentPage\ \ = 1; // Choose the number of search results to return per page. Minimum\ \ value: 1\n Integer pageSize = 25; // Results per page. Allowed values\ \ 1-100, default is 25.\n\n try {\n Page result = apiInstance.list()\n\ \ .events(events)\n .currentPage(currentPage)\n\ \ .pageSize(pageSize)\n .execute();\n System.out.println(result);\n\ \ } catch (ApiException e) {\n System.err.println(\"Exception\ \ when calling WebhooksApi#list\");\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: "//install via Nuget\n//Install-Package ApiVideo\nusing System.Diagnostics;\n\ using ApiVideo.Client;\n\nnamespace Example\n{\n public class listExample\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 events = video.encoding.quality.completed; // string\ \ | The webhook event that you wish to filter on. (optional) \n \ \ var currentPage = 2; // int? | Choose the number of search results\ \ to return per page. Minimum value: 1 (optional) (default to 1)\n \ \ var pageSize = 30; // int? | Results per page. Allowed values\ \ 1-100, default is 25. (optional) (default to 25)\n var apiWebhooksInstance\ \ = apiInstance.Webhooks();\n try\n {\n \ \ // List all webhooks\n WebhooksListResponse result\ \ = apiWebhooksInstance.list(events, currentPage, pageSize);\n \ \ Debug.WriteLine(result);\n }\n catch (ApiException\ \ e)\n {\n Debug.Print(\"Exception when calling\ \ WebhooksApi.list: \" + e.Message );\n Debug.Print(\"\ Status Code: \"+ e.ErrorCode);\n Debug.Print(e.StackTrace);\n\ \ }\n }\n }\n}\n" post: description: "Webhooks can push notifications to your server, rather than polling\ \ api.video for changes. We currently offer four events: \n* ```video.encoding.quality.completed```\ \ When a new video is uploaded into your account, it will be encoded into\ \ several different HLS sizes/bitrates. When each version is encoded, your\ \ webhook will get a notification. It will look like ```{ \\\"type\\\": \\\ \"video.encoding.quality.completed\\\", \\\"emittedAt\\\": \\\"2021-01-29T16:46:25.217+01:00\\\ \", \\\"videoId\\\": \\\"viXXXXXXXX\\\", \\\"encoding\\\": \\\"hls\\\", \\\ \"quality\\\": \\\"720p\\\"} ```. This request says that the 720p HLS encoding\ \ was completed.\n* ```live-stream.broadcast.started``` When a livestream\ \ begins broadcasting, the broadcasting parameter changes from false to true,\ \ and this webhook fires.\n* ```live-stream.broadcast.ended``` This event\ \ fores when the livestream has finished broadcasting, and the broadcasting\ \ parameter flips from false to true.\n* ```video.source.recorded``` This\ \ event is similar to ```video.encoding.quality.completed```, but tells you\ \ if a livestream has been recorded as a VOD." operationId: POST-webhooks requestBody: content: application/json: schema: $ref: '#/components/schemas/webhooks-creation-payload' required: true responses: "201": content: application/json: examples: response: value: webhookId: webhook_XXXXXXXXXXXXXXX createdAt: 2021-01-08T14:12:18.000+00:00 events: - video.encoding.quality.completed url: http://clientnotificationserver.com/notif?myquery=query schema: $ref: '#/components/schemas/webhook' description: Created "400": content: application/json: examples: response: value: type: https://docs.api.video/docs/attributerequired events: This attribute is required. name: events status: 400 problems: - type: https://docs.api.video/docs/attributerequired title: This attribute is required. name: events - type: https://docs.api.video/docs/attributerequired title: This attribute is required. name: url - type: https://docs.api.video/docs/attributeinvalid title: This attribute must be an array. name: events schema: $ref: '#/components/schemas/bad-request' description: Bad Request security: - bearerAuth: [] summary: Create Webhook tags: - Webhooks x-client-action: create x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n webhooksCreationPayload := *apivideosdk.NewWebhooksCreationPayload([]string{\"\ Events_example\"}, \"https://example.com/webhooks\") // WebhooksCreationPayload\ \ | \n\n \n res, err := client.Webhooks.Create(webhooksCreationPayload)\n\ \n if err != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling\ \ `Webhooks.Create``: %v\\n\", err)\n }\n // response from `Create`:\ \ Webhook\n fmt.Fprintf(os.Stdout, \"Response from `Webhooks.Create`:\ \ %v\\n\", res)\n}\n" - language: node code: "//install the module with npm or yarn\n//npm install @api.video/nodejs-client\ \ --save\n//yarn add @api.video/nodejs-client\n(async () => {\n try\ \ {\n const client = new ApiVideoClient({ apiKey: \"YOUR_API_TOKEN\"\ \ });\n\n const webhooksCreationPayload = {\n events: [\"\ video.encoding.quality.completed\"], // A list of the webhooks that you\ \ are subscribing to. There are Currently four webhook options: * ```video.encoding.quality.completed```\ \ When a new video is uploaded into your account, it will be encoded\ \ into several different HLS sizes/bitrates. When each version is encoded,\ \ your webhook will get a notification. It will look like ```{ \\\\\\\ \"type\\\\\\\": \\\\\\\"video.encoding.quality.completed\\\\\\\", \\\\\ \\\"emittedAt\\\\\\\": \\\\\\\"2021-01-29T16:46:25.217+01:00\\\\\\\",\ \ \\\\\\\"videoId\\\\\\\": \\\\\\\"viXXXXXXXX\\\\\\\", \\\\\\\"encoding\\\ \\\\\": \\\\\\\"hls\\\\\\\", \\\\\\\"quality\\\\\\\": \\\\\\\"720p\\\\\ \\\"} ```. This request says that the 720p HLS encoding was completed.\ \ * ```live-stream.broadcast.started``` When a livestream begins broadcasting,\ \ the broadcasting parameter changes from false to true, and this webhook\ \ fires. * ```live-stream.broadcast.ended``` This event fores when the\ \ livestream has finished broadcasting, and the broadcasting parameter\ \ flips from false to true. * ```video.source.recorded``` This event\ \ is similar to ```video.encoding.quality.completed```, but tells you\ \ if a livestream has been recorded as a VOD.\n url: \"https://example.com/webhooks\"\ , // The the url to which HTTP notifications are sent. It could be any\ \ http or https URL.\n }; \n\n // Webhook\n const result\ \ = await client.webhooks.create(webhooksCreationPayload);\n console.log(result);\n\ \ } catch (e) {\n console.error(e);\n }\n})();\n" - language: python code: "#install the api.video API client library\n#pip install api.video\n\ import apivideo\nfrom apivideo.api import webhooks_api\nfrom apivideo.model.bad_request\ \ import BadRequest\nfrom apivideo.model.webhook import Webhook\nfrom\ \ apivideo.model.webhooks_creation_payload import WebhooksCreationPayload\n\ from 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 = webhooks_api.WebhooksApi(api_client)\n\ \ webhooks_creation_payload = WebhooksCreationPayload(\n events=[\"\ video.encoding.quality.completed\"],\n url=\"https://example.com/webhooks\"\ ,\n ) # WebhooksCreationPayload | \n\n # example passing only required\ \ values which don't have defaults set\n try:\n # Create Webhook\n\ \ api_response = api_instance.create(webhooks_creation_payload)\n\ \ pprint(api_response)\n except apivideo.ApiException as e:\n\ \ print(\"Exception when calling WebhooksApi->create: %s\\n\" %\ \ e)\n" - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.WebhooksApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n WebhooksApi apiInstance\ \ = client.webhooks();\n \n WebhooksCreationPayload webhooksCreationPayload\ \ = new WebhooksCreationPayload(); // \n webhooksCreationPayload.setEvents(Arrays.asList(\"\ video.encoding.quality.completed\")); \n webhooksCreationPayload.setUrl(\"\ https://example.com/webhooks\"); // The the url to which HTTP notifications\ \ are sent. It could be any http or https URL.\n\n\n try {\n Webhook\ \ result = apiInstance.create(webhooksCreationPayload);\n System.out.println(result);\n\ \ } catch (ApiException e) {\n System.err.println(\"Exception\ \ when calling WebhooksApi#create\");\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: "//install via Nuget\n//Install-Package ApiVideo\nusing System.Diagnostics;\n\ using ApiVideo.Client;\n\nnamespace Example\n{\n public class createExample\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 webhooksCreationPayload = new WebhooksCreationPayload();\ \ // WebhooksCreationPayload | \n var apiWebhooksInstance =\ \ apiInstance.Webhooks();\n try\n {\n \ \ // Create Webhook\n Webhook result = apiWebhooksInstance.create(webhooksCreationPayload);\n\ \ Debug.WriteLine(result);\n }\n \ \ catch (ApiException e)\n {\n Debug.Print(\"\ Exception when calling WebhooksApi.create: \" + e.Message );\n \ \ Debug.Print(\"Status Code: \"+ e.ErrorCode);\n \ \ Debug.Print(e.StackTrace);\n }\n }\n }\n}\n" /webhooks/{webhookId}: delete: description: This endpoint will delete the indicated webhook. operationId: DELETE-webhook parameters: - description: The webhook you wish to delete. explode: false in: path name: webhookId required: true schema: type: string style: simple responses: "204": description: No Content "404": content: application/json: examples: response: value: type: https://docs.api.video/docs/resourcenot_found title: The requested resource was not found. name: webhookId status: 404 schema: $ref: '#/components/schemas/not-found' description: Not Found security: - bearerAuth: [] summary: Delete a Webhook tags: - Webhooks x-client-action: delete x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n webhookId := \"webhookId_example\" // string\ \ | The webhook you wish to delete.\n\n \n err := client.Webhooks.Delete(webhookId)\n\ \n if err != nil {\n fmt.Fprintf(os.Stderr, \"Error when calling\ \ `Webhooks.Delete``: %v\\n\", err)\n }\n}\n" - language: node code: | //install the module with npm or yarn //npm install @api.video/nodejs-client --save //yarn add @api.video/nodejs-client (async () => { try { const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); const webhookId = 'webhookId_example'; // The webhook you wish to delete. // void const result = await client.webhooks.delete(webhookId); console.log(result); } catch (e) { console.error(e); } })(); - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import webhooks_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 = webhooks_api.WebhooksApi(api_client) webhook_id = "webhookId_example" # str | The webhook you wish to delete. # example passing only required values which don't have defaults set try: # Delete a Webhook api_instance.delete(webhook_id) except apivideo.ApiException as e: print("Exception when calling WebhooksApi->delete: %s\n" % e) - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.WebhooksApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n WebhooksApi apiInstance\ \ = client.webhooks();\n \n String webhookId = \"webhookId_example\"\ ; // The webhook you wish to delete.\n\n try {\n apiInstance.delete(webhookId);\n\ \ } catch (ApiException e) {\n System.err.println(\"Exception\ \ when calling WebhooksApi#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: | //install via Nuget //Install-Package ApiVideo 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 webhookId = webhookId_example; // string | The webhook you wish to delete. var apiWebhooksInstance = apiInstance.Webhooks(); try { // Delete a Webhook apiWebhooksInstance.delete(webhookId); } catch (ApiException e) { Debug.Print("Exception when calling WebhooksApi.delete: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } } } get: description: This call provides the same JSON information provided on Webjhook creation. operationId: GET-Webhook parameters: - description: The unique webhook you wish to retreive details on. explode: false in: path name: webhookId required: true schema: type: string style: simple responses: "200": content: application/json: examples: response: value: webhookId: webhook_XXXXXXXXXXXXXXX createdAt: 2021-01-08T14:12:18.000+00:00 events: - video.encoding.quality.completed url: http://clientnotificationserver.com/notif?myquery=query schema: $ref: '#/components/schemas/webhook' description: Success security: - bearerAuth: [] summary: Show Webhook details tags: - Webhooks x-client-action: get x-readme: code-samples: - language: go code: "//install the Go API client\n//go get github.com/apivideo/api.video-go-client\n\ package 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_TOKEN\"\ ).Build()\n // if you rather like to use the sandbox environment:\n\ \ // client := apivideosdk.SandboxClientBuilder(\"YOU_SANDBOX_API_TOKEN\"\ ).Build()\n \n webhookId := \"webhookId_example\" // string\ \ | The unique webhook you wish to retreive details on.\n\n \n res,\ \ err := client.Webhooks.Get(webhookId)\n\n if err != nil {\n \ \ fmt.Fprintf(os.Stderr, \"Error when calling `Webhooks.Get``: %v\\\ n\", err)\n }\n // response from `Get`: Webhook\n fmt.Fprintf(os.Stdout,\ \ \"Response from `Webhooks.Get`: %v\\n\", res)\n}\n" - language: node code: | //install the module with npm or yarn //npm install @api.video/nodejs-client --save //yarn add @api.video/nodejs-client (async () => { try { const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); const webhookId = 'webhookId_example'; // The unique webhook you wish to retreive details on. // Webhook const result = await client.webhooks.get(webhookId); console.log(result); } catch (e) { console.error(e); } })(); - language: python code: | #install the api.video API client library #pip install api.video import apivideo from apivideo.api import webhooks_api from apivideo.model.webhook import Webhook 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 = webhooks_api.WebhooksApi(api_client) webhook_id = "webhookId_example" # str | The unique webhook you wish to retreive details on. # example passing only required values which don't have defaults set try: # Show Webhook details api_response = api_instance.get(webhook_id) pprint(api_response) except apivideo.ApiException as e: print("Exception when calling WebhooksApi->get: %s\n" % e) - language: java code: "//dependency addition instructions\n//https://github.com/apivideo/api.video-java-client\n\ // Import classes:\nimport video.api.client.ApiVideoClient;\nimport video.api.client.api.ApiException;\n\ import video.api.client.api.models.*;\nimport video.api.client.api.clients.WebhooksApi;\n\ import java.util.*;\n\npublic class Example {\n public static void main(String[]\ \ args) {\n ApiVideoClient client = new ApiVideoClient(\"YOUR_API_TOKEN\"\ );\n // if you rather like to use the sandbox environment:\n //\ \ ApiVideoClient client = new ApiVideoClient(\"YOU_SANDBOX_API_TOKEN\"\ , ApiVideoClient.Environment.SANDBOX);\n\n WebhooksApi apiInstance\ \ = client.webhooks();\n \n String webhookId = \"webhookId_example\"\ ; // The unique webhook you wish to retreive details on.\n\n try {\n\ \ Webhook result = apiInstance.get(webhookId);\n System.out.println(result);\n\ \ } catch (ApiException e) {\n System.err.println(\"Exception\ \ when calling WebhooksApi#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: | //install via Nuget //Install-Package ApiVideo using System.Diagnostics; using ApiVideo.Client; namespace Example { public class getExample { public static void Main() { var basePath = ApiVideoClient.Client.Environment.SANDBOX; var apiKey = "YOUR_API_KEY"; var apiInstance = new ApiVideoClient(apiKey,basePath); var webhookId = webhookId_example; // string | The unique webhook you wish to retreive details on. var apiWebhooksInstance = apiInstance.Webhooks(); try { // Show Webhook details Webhook result = apiWebhooksInstance.get(webhookId); Debug.WriteLine(result); } catch (ApiException e) { Debug.Print("Exception when calling WebhooksApi.get: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } } } } components: parameters: current-page: 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 page-size: 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 schemas: link: properties: rel: type: string uri: type: string type: object access-token: example: access_token: est token_type: qui nulla l refresh_token: cillum expires_in: 3600 properties: access_token: description: The access token containing security credentials allowing you to acccess the API. The token lasts for one hour. example: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjUyZWM4NWUyMjFkODZjOWI0NDQ5NzBhMjQwMzUyOWQ4MDQyNGQ3ZmJjYjFlYWM2MjVlM2VkMjI2YWRlNTcxMDY2NDUyZDc0NjdhN2E4NjI0In0.eyJhdWQiOiJsaWJjYXN0IiwianRpIjoiNTJlYzg1ZTIyMWQ4NmM5YjQ0NDk3MGEyNDAzNTI5ZDgwNDI0ZDdmYmNiMWVhYzYyNWUzZWQyMjZhZGU1NzEwNjY0NTJkNzQ2N2E3YTg2MjQiLCJpYXQiOjE1MjUyNzYxNDcsIm5iZiI6MTUyNTI3NjE0NywiZXhwIjoxNTI1Mjc5NzQ3LCJzdWIiOiJ1c01vbml0b3IiLCJzY29wZXMiOlsibW9uaXRvci5saWJjYXN0LmNvbSJdLCJjb250ZXh0Ijp7InVzZXIiOiJ1c01vbml0b3IiLCJwcm9qZWN0IjoicHJNb25pdG9yIiwibWVtYmVyIjoibWVNb25pdG9yIn19.rUvishDNyJLNlI4W5VmguNecm5KD2uZgPkKJQbaqw-cJbSrVxkSbiKYtk_E3cz3WT7-IS2yFTsYN3uIo5Rbit8_HftweyEp2bdBRI8yjR6oZZ1sNJJXswISN1i2kk4r-aaxu7Xxf_LtsjOMUj_YZsvcc2nqBXPKjHbJCJryx3DDJaIcymOqao7nhQaCCQyrQooAXNTYs4E9fWN1dC_x2O-zok5TuG-xhEW-umwxfSUMWNgSTkz38ACceQ0PCJSgB3jqjDH4MwC7B3ppEPZuK5E6JhKeyRlalswRyYq3UQPnVeMTam7YQHsuTgbehF6WySW8i44o7V_MCe9hjPdp-WA type: string token_type: default: bearer description: The type of token you have. type: string refresh_token: description: A token you can use to get the next access token when your current access token expires. example: def50200a28d88fb9aaa921be78eeb5604b071101a334899a7d5fc7492cf8ea752962ddc8961fe5c126101d4ecacd980396eb2fd494995b812dffcb98256c4277f790d1f658fc2d2e34f350740544e5232d69d68d34c648271d706c5e7049adac0b1832d0fdf71809715cc7e97fa63f65966deadb501a55ff469b0fd23a637cb6acbe9d9b8594a17f09efc2efeed82984764a0065d5e29c950c7b081a61ba2aaa192be3085c400ee37eac50fa9320ce2cfe8916c8165418d23e9f91b6a5c8515e1d74ee193a5a1ca01954fbff27361c20184240be2359e0afbed0bf1c762cf872450b5e8b5d4704f4fd9583e4470adc98409dd42965709712806bd9019378a72eea0b4912ce684ffd833db5806ab84174f905db2a75380071d004615c944bb8f8c4045cce7234c2be9a2330522cf7f067b8e58f57cffb6edb4b7ef91313e12bcde47e5e76ceee7fa52990132288f345d33ed917ae4fd54b7284f8964d898e97e1ee3bc4157f75d7fee63976e4be66ac1ec32ef74afa533f0eb593523f226cbec57d196ac8962 type: string expires_in: description: Lists the time in seconds when your access token expires. It lasts for one hour. type: integer title: AccessToken type: object pagination: example: itemsTotal: 123 pagesTotal: 7 pageSize: 20 currentPage: 3 currentPageItems: 20 links: first: rel: first uri: /videos/search?currentPage=1&pageSize=20 previous: rel: previous uri: /videos/search?currentPage=2&pageSize=20 next: rel: next uri: /videos/search?currentPage=4&pageSize=20 last: rel: last uri: /videos/search?currentPage=6&pageSize=20 properties: itemsTotal: description: Total number of items that exist. readOnly: true type: integer pagesTotal: description: Number of items listed in the current page. readOnly: true type: integer pageSize: description: Maximum number of item per page. readOnly: true type: integer currentPage: description: The current page index. readOnly: true type: integer currentPageItems: description: The number of items on the current page. readOnly: true type: integer links: items: $ref: '#/components/schemas/pagination-link' type: array required: - links title: Pagination type: object bad-request: properties: type: type: string title: type: string name: type: string status: type: integer problems: items: $ref: '#/components/schemas/bad-request' type: array uniqueItems: true title: BadRequest type: object not-found: properties: type: type: string title: type: string name: type: string status: type: integer title: NotFound type: object video: example: videoId: vi4k0jvEUuaTdRAEjQ4Jfrgz title: Maths video description: An amazing video explaining the string theory tags: - maths - string theory - video metadata: - key: Author value: John Doe - key: Format value: Tutorial createdAt: 4251-03-03T12:52:03.085Z publishedAt: 4665-07-14T23:36:18.598Z actions: - video_delete - video_download - video_update properties: videoId: description: The unique identifier of the video object. example: vi4k0jvEUuaTdRAEjQ4Prklg type: string createdAt: description: When a video was created, presented in ISO-8601 format. format: date-time type: string title: description: | The title of the video content. example: Maths video type: string description: description: | A description for the video content. example: An amazing video explaining string theory. type: string publishedAt: description: The date and time the API created the video. Date and time are provided using ISO-8601 UTC format. example: 2019-12-16T08:25:51+00:00 type: string updatedAt: description: The date and time the video was updated. Date and time are provided using ISO-8601 UTC format. example: 2019-12-16T08:25:51+00:10 format: date-time type: string tags: description: "One array of tags (each tag is a string) in order to categorize\ \ a video. Tags may include spaces. \n" example: '"tags": ["maths", "string theory", "video"]' items: type: string type: array metadata: description: | Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata) allows you to define a key that allows any value pair. example: '[{"key":"Author", "value":"John Doe"}, {"key":"Format", "value":"Tutorial"}]' items: $ref: '#/components/schemas/metadata' type: array source: $ref: '#/components/schemas/video-source' assets: $ref: '#/components/schemas/video-assets' playerId: description: | The id of the player that will be applied on the video. example: pl45KFKdlddgk654dspkze type: string public: description: | Defines if the content is publicly reachable or if a unique token is needed for each play session. Default is true. Tutorials on [private videos](https://api.video/blog/endpoints/private-videos). example: false type: boolean panoramic: description: | Defines if video is panoramic. example: false type: boolean mp4Support: description: | This lets you know whether mp4 is supported. If enabled, an mp4 URL will be provided in the response for the video. example: true type: boolean required: - videoId title: Video type: object watermark: example: watermarkId: watermark_1BWr2L5MTQwxGkuxKjzh6i createdAt: 2000-01-23T04:56:07.000+00:00 properties: watermarkId: description: The unique identifier of the watermark. example: watermark_1BWr2L5MTQwxGkuxKjzh6i type: string createdAt: description: When the watermark was created, presented in ISO-8601 format. format: date-time type: string title: Watermark type: object watermarks-list-response: example: pagination: itemsTotal: 123 pagesTotal: 7 pageSize: 20 currentPage: 3 currentPageItems: 20 links: first: rel: first uri: /videos/search?currentPage=1&pageSize=20 previous: rel: previous uri: /videos/search?currentPage=2&pageSize=20 next: rel: next uri: /videos/search?currentPage=4&pageSize=20 last: rel: last uri: /videos/search?currentPage=6&pageSize=20 data: - watermarkId: watermark_1BWr2L5MTQwxGkuxKjzh6i createdAt: 2000-01-23T04:56:07.000+00:00 - watermarkId: watermark_1BWr2L5MTQwxGkuxKjzh6i createdAt: 2000-01-23T04:56:07.000+00:00 properties: data: items: $ref: '#/components/schemas/watermark' type: array pagination: $ref: '#/components/schemas/pagination' required: - data - pagination title: Watermarks type: object watermark-upload-payload: properties: file: description: The .jpg or .png image to be added as a watermark. format: binary type: string required: - file title: WatermarkUploadPayload type: object player-theme: example: trackUnplayed: trackUnplayed backgroundTop: backgroundTop link: link trackPlayed: trackPlayed linkHover: linkHover backgroundBottom: backgroundBottom enableControls: true backgroundText: backgroundText enableApi: true forceAutoplay: true trackBackground: trackBackground createdAt: 2020-01-31T10:17:47Z assets: link: path/to/my/logo/mylogo.jpg logo: mylogo.jpg hideTitle: true name: name text: text linkActive: linkActive forceLoop: true playerId: pl45KFKdlddgk654dspkze updatedAt: 2020-01-31T10:18:47Z properties: name: description: The name of the player theme type: string text: description: 'RGBA color for timer text. Default: rgba(255, 255, 255, 1)' type: string link: description: 'RGBA color for all controls. Default: rgba(255, 255, 255, 1)' type: string linkHover: description: 'RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1)' type: string linkActive: description: RGBA color for the play button when hovered. type: string trackPlayed: description: 'RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95)' type: string trackUnplayed: description: 'RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35)' type: string trackBackground: description: 'RGBA color playback bar: background. Default: rgba(255, 255, 255, .2)' type: string backgroundTop: description: 'RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7)' type: string backgroundBottom: description: 'RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7)' type: string backgroundText: description: 'RGBA color for title text. Default: rgba(255, 255, 255, 1)' type: string enableApi: description: 'enable/disable player SDK access. Default: true' type: boolean enableControls: description: 'enable/disable player controls. Default: true' type: boolean forceAutoplay: description: 'enable/disable player autoplay. Default: false' type: boolean hideTitle: description: 'enable/disable title. Default: false' type: boolean forceLoop: description: 'enable/disable looping. Default: false' type: boolean playerId: example: pl45KFKdlddgk654dspkze type: string createdAt: description: When the player was created, presented in ISO-8601 format. example: 2020-01-31T10:17:47Z format: date-time type: string updatedAt: description: When the player was last updated, presented in ISO-8601 format. example: 2020-01-31T10:18:47Z format: date-time type: string assets: $ref: '#/components/schemas/player_theme_assets' required: - playerId title: PlayerTheme type: object player-theme-creation-payload: example: name: My nice theme assets: logo: https://cdn.api.video/player/pl14Db6oMJRH6SRVoOwORacK/logo.png link: https://api.video shapeMargin: 10 shapeRadius: 3 shapeAspect: flat shapeBackgroundTop: rgba(50, 50, 50, .7) shapeBackgroundBottom: rgba(50, 50, 50, .8) text: rgba(255, 255, 255, .95) link: rgba(255, 0, 0, .95) linkHover: rgba(255, 255, 255, .75) linkActive: rgba(255, 0, 0, .75) trackPlayed: rgba(255, 255, 255, .95) trackUnplayed: rgba(255, 255, 255, .1) trackBackground: rgba(0, 0, 0, 0) backgroundTop: rgba(72, 4, 45, 1) backgroundBottom: rgba(94, 95, 89, 1) backgroundText: rgba(255, 255, 255, .95) language: en enableApi: true enableControls: true forceAutoplay: false hideTitle: false forceLoop: false properties: name: description: Add a name for your player theme here. maxLength: 100 type: string text: description: 'RGBA color for timer text. Default: rgba(255, 255, 255, 1)' type: string link: description: 'RGBA color for all controls. Default: rgba(255, 255, 255, 1)' type: string linkHover: description: 'RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1)' type: string linkActive: description: RGBA color for the play button when hovered. type: string trackPlayed: description: 'RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95)' type: string trackUnplayed: description: 'RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35)' type: string trackBackground: description: 'RGBA color playback bar: background. Default: rgba(255, 255, 255, .2)' type: string backgroundTop: description: 'RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7)' type: string backgroundBottom: description: 'RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7)' type: string backgroundText: description: 'RGBA color for title text. Default: rgba(255, 255, 255, 1)' type: string enableApi: default: true description: 'enable/disable player SDK access. Default: true' type: boolean enableControls: default: true description: 'enable/disable player controls. Default: true' type: boolean forceAutoplay: default: false description: 'enable/disable player autoplay. Default: false' type: boolean hideTitle: default: false description: 'enable/disable title. Default: false' type: boolean forceLoop: default: false description: 'enable/disable looping. Default: false' type: boolean title: PlayerThemeCreationPayload type: object player-theme-update-payload: properties: name: description: Add a name for your player theme here. maxLength: 100 type: string text: description: 'RGBA color for timer text. Default: rgba(255, 255, 255, 1)' type: string link: description: 'RGBA color for all controls. Default: rgba(255, 255, 255, 1)' type: string linkHover: description: 'RGBA color for all controls when hovered. Default: rgba(255, 255, 255, 1)' type: string linkActive: description: RGBA color for the play button when hovered. type: string trackPlayed: description: 'RGBA color playback bar: played content. Default: rgba(88, 131, 255, .95)' type: string trackUnplayed: description: 'RGBA color playback bar: downloaded but unplayed (buffered) content. Default: rgba(255, 255, 255, .35)' type: string trackBackground: description: 'RGBA color playback bar: background. Default: rgba(255, 255, 255, .2)' type: string backgroundTop: description: 'RGBA color: top 50% of background. Default: rgba(0, 0, 0, .7)' type: string backgroundBottom: description: 'RGBA color: bottom 50% of background. Default: rgba(0, 0, 0, .7)' type: string backgroundText: description: 'RGBA color for title text. Default: rgba(255, 255, 255, 1)' type: string enableApi: description: 'enable/disable player SDK access. Default: true' type: boolean enableControls: description: 'enable/disable player controls. Default: true' type: boolean forceAutoplay: description: 'enable/disable player autoplay. Default: false' type: boolean hideTitle: description: 'enable/disable title. Default: false' type: boolean forceLoop: description: 'enable/disable looping. Default: false' type: boolean title: PlayerThemeUpdatePayload type: object caption: example: default: false src: src srclang: srclang uri: uri properties: uri: type: string src: type: string srclang: type: string default: default: false description: Whether you will have subtitles or not. True for yes you will have subtitles, false for no you will not have subtitles. example: false type: boolean title: Caption type: object video-session: example: session: sessionId: psEmFwGQUAXR2lFHj5nDOpy loadedAt: 2019-06-24T11:45:01.109+00 endedAt: 2019-06-24T11:49:19.243+00 location: country: France city: Paris referrer: url: https://api.video medium: organic source: https://google.com searchTerm: video encoding hosting and delivery device: type: desktop vendor: Dell model: unknown os: name: Microsoft Windows shortname: W10 version: Windows10 client: type: browser name: Firefox version: "67.0" properties: session: $ref: '#/components/schemas/video-session-session' location: $ref: '#/components/schemas/video-session-location' referrer: $ref: '#/components/schemas/video-session-referrer' device: $ref: '#/components/schemas/video-session-device' os: $ref: '#/components/schemas/video-session-os' client: $ref: '#/components/schemas/video-session-client' title: VideoSession type: object live-stream: example: streamKey: cc1b4df0-d1c5-4064-a8f9-9f0368385135 createdAt: 2020-01-31T10:17:47Z assets: thumbnail: https://cdn.api.video/live/li400mYKSgQ6xs7taUeSaEKr/thumbnail.jpg iframe: hls: https://live.api.video/li4pqNqGUkhKfWcBGpZVLRY5.m3u8 player: https://embed.api.video/live/li400mYKSgQ6xs7taUeSaEKr public: true liveStreamId: li400mYKSgQ6xs7taUeSaEKr record: true name: My Live Stream playerId: pl45d5vFFGrfdsdsd156dGhh broadcasting: true updatedAt: 2020-01-31T10:18:47Z properties: liveStreamId: description: The unique identifier for the live stream. Live stream IDs begin with "li." example: li400mYKSgQ6xs7taUeSaEKr type: string name: description: The name of your live stream. example: My Live Stream type: string streamKey: description: The unique, private stream key that you use to begin streaming. example: cc1b4df0-d1c5-4064-a8f9-9f0368385135 type: string record: description: Whether you are recording or not. example: true type: boolean public: description: BETA FEATURE Please limit all public = false ("private") livestreams to 3,000 users. Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. example: true type: boolean assets: $ref: '#/components/schemas/live-stream-assets' playerId: description: The unique identifier for the player. example: pl45d5vFFGrfdsdsd156dGhh type: string broadcasting: description: Whether or not you are broadcasting the live video you recorded for others to see. True means you are broadcasting to viewers, false means you are not. example: true type: boolean createdAt: description: When the player was created, presented in ISO-8601 format. example: 2020-01-31T10:17:47Z format: date-time type: string updatedAt: description: When the player was last updated, presented in ISO-8601 format. example: 2020-01-31T10:18:47Z format: date-time type: string required: - liveStreamId title: LiveStream type: object live-stream-session: example: referrer: searchTerm: video stream medium: organic source: https://google.com url: https://api.video os: name: Microsoft Windows shortname: W10 version: Windows 10 session: loadedAt: 2000-01-23T04:56:07.000+00:00 endedAt: 2000-01-23T04:56:07.000+00:00 sessionId: sessionId client: name: Firefox type: browser version: "67.0" location: country: France city: Paris device: vendor: Dell model: unknown type: desktop properties: session: $ref: '#/components/schemas/live-stream-session-session' location: $ref: '#/components/schemas/live-stream-session-location' referrer: $ref: '#/components/schemas/live-stream-session-referrer' device: $ref: '#/components/schemas/live-stream-session-device' os: $ref: '#/components/schemas/video-session-os' client: $ref: '#/components/schemas/live-stream-session-client' title: LiveStreamSession type: object player-session-event: example: emittedAt: 2000-01-23T04:56:07.000+00:00 at: 0 from: 6 to: 1 type: play properties: type: description: 'Possible values are: ready, play, pause, resume, seek.backward, seek.forward, end' example: play type: string emittedAt: description: When an event occurred, presented in ISO-8601 format. format: date-time type: string at: type: integer from: type: integer to: type: integer title: PlayerSessionEvent type: object webhook: example: createdAt: 2000-01-23T04:56:07.000+00:00 webhookId: webhook_XXXXXXXXXXXXXXX events: '["video.encoding.quality.completed"]' url: http://clientnotificationserver.com/notif?myquery=query properties: webhookId: description: Unique identifier of the webhook example: webhook_XXXXXXXXXXXXXXX type: string createdAt: description: When an webhook was created, presented in ISO-8601 format. format: date-time type: string events: description: A list of events that will trigger the webhook. example: '["video.encoding.quality.completed"]' items: type: string type: array url: description: URL of the webhook example: http://clientnotificationserver.com/notif?myquery=query type: string title: Webhook type: object video-status: example: ingest: status: uploaded filesize: 273579401 receivedBytes: - to: 134217727 from: 0 total: 273579401 - to: 268435455 from: 134217728 total: 273579401 - to: 273579400 from: 268435456 total: 273579401 encoding: playable: true qualities: - quality: 240p status: encoded - quality: 360p status: encoded - quality: 480p status: encoded - quality: 720p status: encoded - quality: 1080p status: encoding - quality: 2160p status: waiting metadata: width: 424 height: 240 bitrate: 411.218 duration: 4176 framerate: 24 samplerate: 48000 videoCodec: h264 audioCodec: aac aspectRatio: 16/9 properties: ingest: $ref: '#/components/schemas/video-status-ingest' encoding: $ref: '#/components/schemas/video-status-encoding' title: VideoStatus type: object quality: properties: type: description: The type of video (hls or mp4). enum: - hls - mp4 example: hls type: string quality: description: The quality of the video you have, in pixels. Choices include 360p, 480p, 720p, 1080p, and 2160p. enum: - 240p - 360p - 480p - 720p - 1080p - 2160p example: 720p type: string status: description: The status of your video. Statuses include waiting - the video is waiting to be encoded. encoding - the video is in the process of being encoded. encoded - the video was successfully encoded. failed - the video failed to be encoded. enum: - waiting - encoding - encoded - failed type: string title: Quality type: object bytes-range: properties: from: description: The starting point for the range of bytes for a chunk of a video. example: 0 type: integer to: description: The ending point for the range of bytes for a chunk of a video. example: 9999 type: integer total: description: The total number of bytes in the provided range. example: 10000 type: integer title: BytesRange type: object chapter: example: src: https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/chapters/fr.vtt language: language uri: uri properties: uri: type: string src: description: The link to your VTT file, which contains your chapters information for the video. example: https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/chapters/fr.vtt type: string language: type: string title: Chapter type: object upload-token: example: createdAt: 2019-12-16T08:25:51Z ttl: 171976544 expiresAt: 2019-12-16T09:25:51Z token: to1tcmSFHeYY5KzyhOqVKMKb properties: token: description: The unique identifier for the token you will use to authenticate an upload. example: to1tcmSFHeYY5KzyhOqVKMKb type: string ttl: description: Time-to-live - how long the upload token is valid for. maximum: 2147483647 minimum: 0 type: integer createdAt: description: When the token was created, displayed in ISO-8601 format. example: 2019-12-16T08:25:51Z format: date-time type: string expiresAt: description: When the token expires, displayed in ISO-8601 format. example: 2019-12-16T09:25:51Z format: date-time nullable: true type: string title: UploadToken type: object authenticate-payload: example: apiKey: 9VxMaPgsaFg7EBqmuspSzF7 properties: apiKey: description: Your account API key. You can use your sandbox API key, or you can use your production API key. type: string required: - apiKey title: ApiKey type: object refresh-token-payload: example: refreshToken: def502005346d9cc2bd79a7793ab5bdabfefcaabfbb8c253f14733f1262077e1a3f38c4751d6d20f590c3784e531a82adc11f05fc1949aa46d5575aaa99cb84b9334ba66ac773576b5d7a418937ae337de62811d086dd42ad1164b12f87d67be6ffea18f2d50be9b95697b21c4d3c4372849bdb2287259cb80541570e913691a08b2fa33c85885930de15cebea627fc09f0255562ab3d39d87d4ff8fc02b00e252afcd480421dec7de9d1411176bcf669c527762e22294b453bc9ea06e9fa8ba5b873feb2ee14ce0a6a6ddd4b78c580631e210e9b9387265dc2bec9478a66a09dcdce1c40d2f856689e9d81742c9628a0b87b359e0b218ea1f07427eef89f999e47af89792f598e05847bd008fddc32ee63f4a601ffb4cd2ad08977f1c854ec358238322c918f05aa5a41f8a171dee497218408abc8283473f6112aeed7310815416a0fa36c63667e0ed014fa40b8992891bf58bae400d901c01450101c88f4978938ad138adc19cfe5698d60fd82cb27c586f6a8f70f4393c7c9e579df8739d46d249fb76d7 properties: refreshToken: description: | The refresh token is either the first refresh token you received when you authenticated with the auth/api-key endpoint, or it's the refresh token from the last time you used the auth/refresh endpoint. Place this in the body of your request to obtain a new access token (which is valid for an hour) and a new refresh token. type: string required: - refreshToken title: RefreshToken type: object videos-list-response: example: pagination: itemsTotal: 123 pagesTotal: 7 pageSize: 20 currentPage: 3 currentPageItems: 20 links: first: rel: first uri: /videos/search?currentPage=1&pageSize=20 previous: rel: previous uri: /videos/search?currentPage=2&pageSize=20 next: rel: next uri: /videos/search?currentPage=4&pageSize=20 last: rel: last uri: /videos/search?currentPage=6&pageSize=20 data: - videoId: vi4k0jvEUuaTdRAEjQ4Jfrgz title: Maths video description: An amazing video explaining the string theory tags: - maths - string theory - video metadata: - key: Author value: John Doe - key: Format value: Tutorial createdAt: 4251-03-03T12:52:03.085Z publishedAt: 4665-07-14T23:36:18.598Z actions: - video_delete - video_download - video_update - videoId: vi4k0jvEUuaTdRAEjQ4Jfrgz title: Maths video description: An amazing video explaining the string theory tags: - maths - string theory - video metadata: - key: Author value: John Doe - key: Format value: Tutorial createdAt: 4251-03-03T12:52:03.085Z publishedAt: 4665-07-14T23:36:18.598Z actions: - video_delete - video_download - video_update properties: data: items: $ref: '#/components/schemas/video' type: array pagination: $ref: '#/components/schemas/pagination' required: - data - pagination title: Videos type: object metadata: properties: key: description: The constant that defines the data set. example: Color type: string value: description: A variable which belongs to the data set. example: Green type: string title: Metadata type: object x-client-all-args-constructor: true video-creation-payload: example: title: Maths video description: An amazing video explaining string theory. public: false panoramic: false mp4Support: true playerId: pl45KFKdlddgk654dspkze tags: - maths - string theory - video metadata: - key: Author value: John Doe - key: Format value: Tutorial watermark: id: watermark_1BWr2L5MTQwxGkuxKjzh6i bottom: 10px right: 10px width: 50% opacity: 70% properties: title: description: The title of your new video. example: Maths video type: string description: description: A brief description of your video. example: A video about string theory. type: string source: description: If you add a video already on the web, this is where you enter the url for the video. example: https://www.myvideo.url.com/video.mp4 type: string public: default: true description: Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Default is true. Tutorials on [private videos](https://api.video/blog/endpoints/private-videos). example: true type: boolean panoramic: default: false description: Indicates if your video is a 360/immersive video. example: false type: boolean mp4Support: default: true description: Enables mp4 version in addition to streamed version. example: true type: boolean playerId: description: The unique identification number for your video player. example: pl45KFKdlddgk654dspkze type: string tags: description: A list of tags you want to use to describe your video. example: '["maths", "string theory", "video"]' items: type: string type: array metadata: description: A list of key value pairs that you use to provide metadata for your video. These pairs can be made dynamic, allowing you to segment your audience. Read more on [dynamic metadata](https://api.video/blog/endpoints/dynamic-metadata). example: '[{"key": "Author", "value": "John Doe"}]' items: $ref: '#/components/schemas/metadata' type: array clip: $ref: '#/components/schemas/video-clip' watermark: $ref: '#/components/schemas/video-watermark' required: - title title: VideoCreationPayload type: object video-upload-payload: properties: file: description: The path to the video you would like to upload. The path must be local. If you want to use a video from an online source, you must use the "/videos" endpoint and add the "source" parameter when you create a new video. format: binary type: string x-client-chunk-upload: "true" required: - file type: object video-thumbnail-pick-payload: example: timecode: 00:00:00.000 properties: timecode: description: "Frame in video to be used as a placeholder before the video\ \ plays. \nExample: '\"00:01:00.000\" for 1 minute into the video.'\n\ Valid Patterns: \n\"hh:mm:ss.ms\"\n\"hh:mm:ss:frameNumber\"\n\"124\" (integer\ \ value is reported as seconds) \nIf selection is out of range, \"00:00:00.00\"\ \ will be chosen." pattern: \d{2}:\d{2}:\d{2}(\.\d{2})? type: string required: - timecode title: ThumbnailPickPayload type: object video-thumbnail-upload-payload: properties: file: description: The .jpg image to be added as a thumbnail. format: binary type: string required: - file title: VideoThumbnailUploadPayload type: object video-update-payload: example: playerId: pl45KFKdlddgk654dspkze title: String theory 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 properties: playerId: description: The unique ID for the player you want to associate with your video. example: pl4k0jvEUuaTdRAEjQ4Jfrgz type: string x-optional-nullable: true title: description: The title you want to use for your video. type: string description: description: A brief description of the video. example: A film about good books. type: string public: description: Whether the video is publicly available or not. False means it is set to private. Default is true. Tutorials on [private videos](https://api.video/blog/endpoints/private-videos). example: true type: boolean panoramic: description: Whether the video is a 360 degree or immersive video. example: false type: boolean mp4Support: description: Whether the player supports the mp4 format. example: true type: boolean tags: description: 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. example: '["maths", "string theory", "video"]' items: type: string type: array metadata: description: 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. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata) allows you to define a key that allows any value pair. items: $ref: '#/components/schemas/metadata' type: array title: VideoUpdatePayload type: object token-list-response: example: pagination: itemsTotal: 123 pagesTotal: 7 pageSize: 20 currentPage: 3 currentPageItems: 20 links: first: rel: first uri: /videos/search?currentPage=1&pageSize=20 previous: rel: previous uri: /videos/search?currentPage=2&pageSize=20 next: rel: next uri: /videos/search?currentPage=4&pageSize=20 last: rel: last uri: /videos/search?currentPage=6&pageSize=20 data: - createdAt: 2019-12-16T08:25:51Z ttl: 171976544 expiresAt: 2019-12-16T09:25:51Z token: to1tcmSFHeYY5KzyhOqVKMKb - createdAt: 2019-12-16T08:25:51Z ttl: 171976544 expiresAt: 2019-12-16T09:25:51Z token: to1tcmSFHeYY5KzyhOqVKMKb properties: data: items: $ref: '#/components/schemas/upload-token' title: uploadToken type: array pagination: $ref: '#/components/schemas/pagination' required: - data - pagination title: UploadTokens type: object token-creation-payload: example: ttl: 3600 properties: ttl: default: 0 description: Time in seconds that the token will be active. A value of 0 means that the token has no exipration date. The default is to have no expiration. maximum: 2147483647 minimum: 0 type: integer title: TokenCreationPayload type: object token-upload-payload: properties: file: description: The path to the video you want to upload. format: binary type: string x-client-chunk-upload: "true" videoId: description: The video id returned by the first call to this endpoint in a large video upload scenario. type: string x-client-ignore: true x-client-copy-from-response: true required: - file title: tokenUploadPayload type: object live-stream-list-response: example: pagination: itemsTotal: 123 pagesTotal: 7 pageSize: 20 currentPage: 3 currentPageItems: 20 links: first: rel: first uri: /videos/search?currentPage=1&pageSize=20 previous: rel: previous uri: /videos/search?currentPage=2&pageSize=20 next: rel: next uri: /videos/search?currentPage=4&pageSize=20 last: rel: last uri: /videos/search?currentPage=6&pageSize=20 data: - streamKey: cc1b4df0-d1c5-4064-a8f9-9f0368385135 createdAt: 2020-01-31T10:17:47Z assets: thumbnail: https://cdn.api.video/live/li400mYKSgQ6xs7taUeSaEKr/thumbnail.jpg iframe: hls: https://live.api.video/li4pqNqGUkhKfWcBGpZVLRY5.m3u8 player: https://embed.api.video/live/li400mYKSgQ6xs7taUeSaEKr public: true liveStreamId: li400mYKSgQ6xs7taUeSaEKr record: true name: My Live Stream playerId: pl45d5vFFGrfdsdsd156dGhh broadcasting: true updatedAt: 2020-01-31T10:18:47Z - streamKey: cc1b4df0-d1c5-4064-a8f9-9f0368385135 createdAt: 2020-01-31T10:17:47Z assets: thumbnail: https://cdn.api.video/live/li400mYKSgQ6xs7taUeSaEKr/thumbnail.jpg iframe: hls: https://live.api.video/li4pqNqGUkhKfWcBGpZVLRY5.m3u8 player: https://embed.api.video/live/li400mYKSgQ6xs7taUeSaEKr public: true liveStreamId: li400mYKSgQ6xs7taUeSaEKr record: true name: My Live Stream playerId: pl45d5vFFGrfdsdsd156dGhh broadcasting: true updatedAt: 2020-01-31T10:18:47Z properties: data: items: $ref: '#/components/schemas/live-stream' type: array pagination: $ref: '#/components/schemas/pagination' required: - data - pagination title: LiveStreams type: object live-stream-creation-payload: example: name: Test live record: true playerId: pl4f4ferf5erfr5zed4fsdd properties: name: description: Add a name for your live stream here. example: My Live Stream Video type: string record: default: false description: Whether you are recording or not. True for record, false for not record. example: true type: boolean public: description: BETA FEATURE Please limit all public = false ("private") livestreams to 3,000 users. Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. type: boolean playerId: description: The unique identifier for the player. example: pl4f4ferf5erfr5zed4fsdd type: string required: - name title: LiveStreamCreationPayload type: object live-stream-update-payload: properties: name: description: The name you want to use for your live stream. example: My Live Stream Video type: string public: description: BETA FEATURE Please limit all public = false ("private") livestreams to 3,000 users. Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. type: boolean record: description: Use this to indicate whether you want the recording on or off. On is true, off is false. example: true type: boolean playerId: description: The unique ID for the player associated with a live stream that you want to update. example: pl45KFKdlddgk654dspkze type: string title: LiveStreamUpdatePayload type: object captions-upload-payload: properties: file: description: The video text track (VTT) you want to upload. format: binary type: string required: - file title: CaptionsUploadPayload type: object live-stream-thumbnail-upload-payload: properties: file: description: The .jpg image to be added as a thumbnail. format: binary type: string required: - file title: LiveStreamThumbnailUploadPayload type: object captions-update-payload: properties: default: type: boolean title: CaptionsUpdatePayload type: object captions-list-response: example: pagination: itemsTotal: 123 pagesTotal: 7 pageSize: 20 currentPage: 3 currentPageItems: 20 links: first: rel: first uri: /videos/search?currentPage=1&pageSize=20 previous: rel: previous uri: /videos/search?currentPage=2&pageSize=20 next: rel: next uri: /videos/search?currentPage=4&pageSize=20 last: rel: last uri: /videos/search?currentPage=6&pageSize=20 data: - default: false src: src srclang: srclang uri: uri - default: false src: src srclang: srclang uri: uri properties: data: items: $ref: '#/components/schemas/caption' type: array pagination: $ref: '#/components/schemas/pagination' required: - data - pagination title: VideoCaptions type: object chapters-update-payload: properties: file: description: The VTT file describing the chapters you want to upload. format: binary type: string required: - file title: ChaptersUpdatePayload type: object chapters-list-response: example: pagination: itemsTotal: 123 pagesTotal: 7 pageSize: 20 currentPage: 3 currentPageItems: 20 links: first: rel: first uri: /videos/search?currentPage=1&pageSize=20 previous: rel: previous uri: /videos/search?currentPage=2&pageSize=20 next: rel: next uri: /videos/search?currentPage=4&pageSize=20 last: rel: last uri: /videos/search?currentPage=6&pageSize=20 data: - src: https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/chapters/fr.vtt language: language uri: uri - src: https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/chapters/fr.vtt language: language uri: uri properties: data: items: $ref: '#/components/schemas/chapter' type: array pagination: $ref: '#/components/schemas/pagination' required: - data - pagination title: VideoChapters type: object player-themes-list-response: example: pagination: itemsTotal: 123 pagesTotal: 7 pageSize: 20 currentPage: 3 currentPageItems: 20 links: first: rel: first uri: /videos/search?currentPage=1&pageSize=20 previous: rel: previous uri: /videos/search?currentPage=2&pageSize=20 next: rel: next uri: /videos/search?currentPage=4&pageSize=20 last: rel: last uri: /videos/search?currentPage=6&pageSize=20 data: - trackUnplayed: trackUnplayed backgroundTop: backgroundTop link: link trackPlayed: trackPlayed linkHover: linkHover backgroundBottom: backgroundBottom enableControls: true backgroundText: backgroundText enableApi: true forceAutoplay: true trackBackground: trackBackground createdAt: 2020-01-31T10:17:47Z assets: link: path/to/my/logo/mylogo.jpg logo: mylogo.jpg hideTitle: true name: name text: text linkActive: linkActive forceLoop: true playerId: pl45KFKdlddgk654dspkze updatedAt: 2020-01-31T10:18:47Z - trackUnplayed: trackUnplayed backgroundTop: backgroundTop link: link trackPlayed: trackPlayed linkHover: linkHover backgroundBottom: backgroundBottom enableControls: true backgroundText: backgroundText enableApi: true forceAutoplay: true trackBackground: trackBackground createdAt: 2020-01-31T10:17:47Z assets: link: path/to/my/logo/mylogo.jpg logo: mylogo.jpg hideTitle: true name: name text: text linkActive: linkActive forceLoop: true playerId: pl45KFKdlddgk654dspkze updatedAt: 2020-01-31T10:18:47Z properties: data: items: $ref: '#/components/schemas/player-theme' type: array pagination: $ref: '#/components/schemas/pagination' required: - data - pagination title: PlayerThemes type: object player-theme-upload-logo-payload: properties: file: description: The name of the file you want to use for your logo. format: binary type: string link: description: A public link that you want to advertise in your player. For example, you could add a link to your company. When a viewer clicks on your logo, they will be taken to this address. example: https://my-company.com format: string type: string required: - file title: PlayerThemeUploadLogoPayload type: object raw-statistics-list-sessions-response: example: pagination: itemsTotal: 123 pagesTotal: 7 pageSize: 20 currentPage: 3 currentPageItems: 20 links: first: rel: first uri: /videos/search?currentPage=1&pageSize=20 previous: rel: previous uri: /videos/search?currentPage=2&pageSize=20 next: rel: next uri: /videos/search?currentPage=4&pageSize=20 last: rel: last uri: /videos/search?currentPage=6&pageSize=20 data: - session: sessionId: psEmFwGQUAXR2lFHj5nDOpy loadedAt: 2019-06-24T11:45:01.109+00 endedAt: 2019-06-24T11:49:19.243+00 location: country: France city: Paris referrer: url: https://api.video medium: organic source: https://google.com searchTerm: video encoding hosting and delivery device: type: desktop vendor: Dell model: unknown os: name: Microsoft Windows shortname: W10 version: Windows10 client: type: browser name: Firefox version: "67.0" - session: sessionId: psEmFwGQUAXR2lFHj5nDOpy loadedAt: 2019-06-24T11:45:01.109+00 endedAt: 2019-06-24T11:49:19.243+00 location: country: France city: Paris referrer: url: https://api.video medium: organic source: https://google.com searchTerm: video encoding hosting and delivery device: type: desktop vendor: Dell model: unknown os: name: Microsoft Windows shortname: W10 version: Windows10 client: type: browser name: Firefox version: "67.0" properties: data: items: $ref: '#/components/schemas/video-session' type: array pagination: $ref: '#/components/schemas/pagination' required: - data - pagination title: VideoSessions type: object raw-statistics-list-live-stream-analytics-response: example: pagination: itemsTotal: 123 pagesTotal: 7 pageSize: 20 currentPage: 3 currentPageItems: 20 links: first: rel: first uri: /videos/search?currentPage=1&pageSize=20 previous: rel: previous uri: /videos/search?currentPage=2&pageSize=20 next: rel: next uri: /videos/search?currentPage=4&pageSize=20 last: rel: last uri: /videos/search?currentPage=6&pageSize=20 data: - referrer: searchTerm: video stream medium: organic source: https://google.com url: https://api.video os: name: Microsoft Windows shortname: W10 version: Windows 10 session: loadedAt: 2000-01-23T04:56:07.000+00:00 endedAt: 2000-01-23T04:56:07.000+00:00 sessionId: sessionId client: name: Firefox type: browser version: "67.0" location: country: France city: Paris device: vendor: Dell model: unknown type: desktop - referrer: searchTerm: video stream medium: organic source: https://google.com url: https://api.video os: name: Microsoft Windows shortname: W10 version: Windows 10 session: loadedAt: 2000-01-23T04:56:07.000+00:00 endedAt: 2000-01-23T04:56:07.000+00:00 sessionId: sessionId client: name: Firefox type: browser version: "67.0" location: country: France city: Paris device: vendor: Dell model: unknown type: desktop properties: data: items: $ref: '#/components/schemas/live-stream-session' type: array pagination: $ref: '#/components/schemas/pagination' required: - data - pagination title: LiveStreamSessions type: object raw-statistics-list-player-session-events-response: example: pagination: itemsTotal: 123 pagesTotal: 7 pageSize: 20 currentPage: 3 currentPageItems: 20 links: first: rel: first uri: /videos/search?currentPage=1&pageSize=20 previous: rel: previous uri: /videos/search?currentPage=2&pageSize=20 next: rel: next uri: /videos/search?currentPage=4&pageSize=20 last: rel: last uri: /videos/search?currentPage=6&pageSize=20 data: - emittedAt: 2000-01-23T04:56:07.000+00:00 at: 0 from: 6 to: 1 type: play - emittedAt: 2000-01-23T04:56:07.000+00:00 at: 0 from: 6 to: 1 type: play properties: data: items: $ref: '#/components/schemas/player-session-event' type: array pagination: $ref: '#/components/schemas/pagination' required: - data - pagination title: PlayerSessionEvents type: object webhooks-list-response: example: pagination: itemsTotal: 123 pagesTotal: 7 pageSize: 20 currentPage: 3 currentPageItems: 20 links: first: rel: first uri: /videos/search?currentPage=1&pageSize=20 previous: rel: previous uri: /videos/search?currentPage=2&pageSize=20 next: rel: next uri: /videos/search?currentPage=4&pageSize=20 last: rel: last uri: /videos/search?currentPage=6&pageSize=20 data: - createdAt: 2000-01-23T04:56:07.000+00:00 webhookId: webhook_XXXXXXXXXXXXXXX events: '["video.encoding.quality.completed"]' url: http://clientnotificationserver.com/notif?myquery=query - createdAt: 2000-01-23T04:56:07.000+00:00 webhookId: webhook_XXXXXXXXXXXXXXX events: '["video.encoding.quality.completed"]' url: http://clientnotificationserver.com/notif?myquery=query properties: data: items: $ref: '#/components/schemas/webhook' type: array pagination: $ref: '#/components/schemas/pagination' required: - data - pagination title: Webhooks type: object webhooks-creation-payload: example: events: - video.encoding.quality.completed url: http://clientnotificationserver.com/notif?myquery=query properties: events: description: |- A list of the webhooks that you are subscribing to. There are Currently four webhook options: * ```video.encoding.quality.completed``` When a new video is uploaded into your account, it will be encoded into several different HLS sizes/bitrates. When each version is encoded, your webhook will get a notification. It will look like ```{ \"type\": \"video.encoding.quality.completed\", \"emittedAt\": \"2021-01-29T16:46:25.217+01:00\", \"videoId\": \"viXXXXXXXX\", \"encoding\": \"hls\", \"quality\": \"720p\"} ```. This request says that the 720p HLS encoding was completed. * ```live-stream.broadcast.started``` When a livestream begins broadcasting, the broadcasting parameter changes from false to true, and this webhook fires. * ```live-stream.broadcast.ended``` This event fores when the livestream has finished broadcasting, and the broadcasting parameter flips from false to true. * ```video.source.recorded``` This event is similar to ```video.encoding.quality.completed```, but tells you if a livestream has been recorded as a VOD. example: - video.encoding.quality.completed items: type: string type: array url: description: The the url to which HTTP notifications are sent. It could be any http or https URL. example: https://example.com/webhooks type: string required: - events - url title: WebhooksCreationPayload type: object pagination-link: properties: rel: type: string uri: format: uri type: string title: PaginationLink type: object video-watermark: properties: id: description: id of the watermark example: watermark_1BWr2L5MTQwxGkuxKjzh6i type: string top: description: Distance expressed in px or % between the top-border of the video and the watermark-image. example: 10px type: string left: description: Distance expressed in px or % between the left-border of the video and the watermark-image. example: 10px type: string bottom: description: Distance expressed in px or % between the bottom-border of the video and the watermark-image. example: 10px type: string right: description: Distance expressed in px or % between the right-border of the video and the watermark-image. example: 10px type: string width: description: 'Width of the watermark-image relative to the video if expressed in %. Otherwise a fixed width. NOTE: To keep intrinsic watermark-image width use initial' example: 50% type: string height: description: 'Width of the watermark-image relative to the video if expressed in %. Otherwise a fixed height. NOTE: To keep intrinsic watermark-image height use initial' example: 50% type: string opacity: description: Opacity expressed in % only to specify the degree of the watermark-image transparency with the video. example: 70% type: string type: object video-clip: properties: startTimecode: pattern: ^(?:\d{2,3}:[0-5]\d:[0-5]\d(?:\.\d{1,3}|\:\d{1,2})?|\d{1,7})$ type: string endTimecode: pattern: ^(?:\d{2,3}:[0-5]\d:[0-5]\d(?:\.\d{1,3}|\:\d{1,2})?|\d{1,7})$ type: string type: object video-source-live-stream-link: properties: rel: type: string uri: type: string type: object video-source-live-stream: description: This appears if the video is from a Live Record. properties: liveStreamId: description: The unique identifier for the live stream. example: li400mYKSgQ6xs7taUeSaEKr type: string links: items: $ref: '#/components/schemas/video-source-live-stream-link' type: array type: object video-source: description: Source information about the video. properties: uri: description: The URL where the video is stored. example: /videos/vi4k0jvEUuaTdRAEjQ4Prklg/source type: string type: type: string liveStream: $ref: '#/components/schemas/video-source-live-stream' title: VideoSource type: object video-assets: description: Collection of details about the video object that you can use to work with the video object. properties: hls: description: This is the manifest URL. For HTTP Live Streaming (HLS), when a HLS video stream is initiated, the first file to download is the manifest. This file has the extension M3U8, and provides the video player with information about the various bitrates available for streaming. format: uri type: string iframe: description: Code to use video from a third party website example: type: string player: description: Raw url of the player. example: https://embed.api.video/1b9d6ae8-8f57-4b6d-8552-d636926b4f5f?token=831a9bd9-9f50-464c-a369-8e9d914371ae format: uri type: string thumbnail: description: Poster of the video. example: https://cdn.api.video/stream/831a9bd9-9f50-464c-a369-8e9d914371ae/thumbnail.jpg format: uri type: string mp4: description: Available only if mp4Support is enabled. Raw mp4 url. example: https://cdn.api.video/vod/vi4k0jvEUuaTdRAEjQ4Jfrgz/token/8fd70443-d9f0-45d2-b01c-12c8cfc707c9/mp4/720/source.mp4 format: uri type: string title: VideoAssets type: object video-session-session: properties: sessionId: description: The unique identifier for the session that you can use to track what happens during it. example: psEmFwGQUAXR2lFHj5nDOpy type: string loadedAt: description: When the video session started, presented in ISO-8601 format. format: date-time type: string endedAt: description: When the video session ended, presented in ISO-8601 format. format: date-time type: string metadata: description: A list of key value pairs that you use to provide metadata for your video. These pairs can be made dynamic, allowing you to segment your audience. You can also just use the pairs as another way to tag and categorize your videos. example: '[{"key": "Author", "value": "John Doe"}]' items: $ref: '#/components/schemas/metadata' type: array title: VideoSessionSession type: object video-session-location: description: The location of the viewer. properties: country: description: The country of the viewer. example: France type: string city: description: The city of the viewer. example: Paris nullable: true type: string title: VideoSessionLocation type: object video-session-referrer: properties: url: description: The link the viewer used to reach the video session. example: https://api.video nullable: true type: string medium: description: How they arrived at the site, for example organic or paid. Organic meaning they found it themselves and paid meaning they followed a link from an advertisement. example: organic type: string source: description: The source the referrer came from to the video session. For example if they searched through google to find the stream. example: https://google.com type: string searchTerm: description: The search term they typed to arrive at the video session. type: string title: VideoSessionReferrer type: object video-session-device: description: What type of device the user is on when in the video session. properties: type: description: What the type is like desktop, laptop, mobile. example: desktop type: string vendor: description: If known, what the brand of the device is, like Apple, Dell, etc. example: Dell type: string model: description: The specific model of the device, if known. example: unknown type: string title: VideoSessionDevice type: object video-session-os: description: The operating system the viewer is on. example: name: Microsoft Windows shortname: W10 version: Windows 10 properties: name: description: The name of the operating system. example: Microsoft Windows type: string shortname: description: The nickname for the operating system, often representing the version. example: W10 type: string version: description: The version of the operating system. example: Windows 10 type: string title: VideoSessionOs type: object video-session-client: description: What kind of browser the viewer is using for the video session. properties: name: description: The name of the browser used to view the video session. example: Firefox type: string version: description: The version of the browser used to view the video session. example: "67.0" type: string type: description: The type of client used to view the video session. example: browser type: string title: VideoSessionClient type: object live-stream-assets: example: thumbnail: https://cdn.api.video/live/li400mYKSgQ6xs7taUeSaEKr/thumbnail.jpg iframe: hls: https://live.api.video/li4pqNqGUkhKfWcBGpZVLRY5.m3u8 player: https://embed.api.video/live/li400mYKSgQ6xs7taUeSaEKr properties: hls: description: The http live streaming (HLS) link for your live video stream. example: https://live.api.video/li4pqNqGUkhKfWcBGpZVLRY5.m3u8 format: uri type: string iframe: description: The embed code for the iframe containing your live video stream. example: type: string player: description: A link to the video player that is playing your live stream. example: https://embed.api.video/live/li400mYKSgQ6xs7taUeSaEKr format: uri type: string thumbnail: description: A link to the thumbnail for your video. example: https://cdn.api.video/live/li400mYKSgQ6xs7taUeSaEKr/thumbnail.jpg format: uri type: string title: LiveStreamAssets type: object live-stream-session-session: example: loadedAt: 2000-01-23T04:56:07.000+00:00 endedAt: 2000-01-23T04:56:07.000+00:00 sessionId: sessionId properties: sessionId: description: A unique identifier for your session. You can use this to track what happens during a specific session. type: string loadedAt: description: When the session started, with the date and time presented in ISO-8601 format. format: date-time type: string endedAt: description: When the session ended, with the date and time presented in ISO-8601 format. format: date-time type: string title: LiveStreamSessionSession type: object live-stream-session-location: description: The location of the viewer of the live stream. example: country: France city: Paris properties: country: description: The country of the viewer of the live stream. example: France type: string city: description: The city of the viewer of the live stream. example: Paris type: string title: LiveStreamSessionLocation type: object live-stream-session-referrer: example: searchTerm: video stream medium: organic source: https://google.com url: https://api.video properties: url: description: The website the viewer of the live stream was referred to in order to view the live stream. example: https://api.video type: string medium: description: The type of search that brought the viewer to the live stream. Organic would be they found it on their own, paid would be they found it via an advertisement. example: organic type: string source: description: Where the viewer came from to see the live stream (usually where they searched from). example: https://google.com type: string searchTerm: description: What term they searched for that led them to the live stream. example: video stream type: string title: LiveStreamSessionReferrer type: object live-stream-session-device: description: What type of device the user is on when in the live stream session. example: vendor: Dell model: unknown type: desktop properties: type: description: What the type is like desktop, laptop, mobile. example: desktop type: string vendor: description: If known, what the brand of the device is, like Apple, Dell, etc. example: Dell type: string model: description: The specific model of the device, if known. example: unknown type: string title: LiveStreamSessionDevice type: object live-stream-session-client: description: What kind of browser the viewer is using for the live stream session. example: name: Firefox type: browser version: "67.0" properties: name: description: The name of the browser used to view the live stream session. example: Firefox type: string version: description: The version of the browser used to view the live stream session. example: "67.0" type: string type: description: The type of client used to view the live stream session. example: browser type: string title: LiveStreamSessionClient type: object video-status-ingest: description: Details about the capturing, transferring, and storing of your video for use immediately or in the future. properties: status: description: There are three possible ingest statuses. missing - you are missing information required to ingest the video. uploading - the video is in the process of being uploaded. uploaded - the video is ready for use. enum: - missing - uploading - uploaded example: uploaded type: string filesize: description: The size of your file in bytes. example: 200000 type: integer receivedBytes: description: The total number of bytes received, listed for each chunk of the upload. items: $ref: '#/components/schemas/bytes-range' type: array title: VideoStatusIngest type: object video-status-encoding-metadata: properties: width: description: The width of the video in pixels. type: integer height: description: The height of the video in pixels. type: integer bitrate: description: The number of bits processed per second. type: number duration: description: The length of the video. type: integer framerate: description: The frequency with which consecutive images or frames appear on a display. Shown in this API as frames per second (fps). example: 60 type: integer samplerate: description: How many samples per second a digital audio system uses to record an audio signal. The higher the rate, the higher the frequencies that can be recorded. They are presented in this API using hertz. example: 48000 type: integer videoCodec: description: 'The method used to compress and decompress digital video. API Video supports all codecs in the libavcodec library. ' type: string audioCodec: description: The method used to compress and decompress digital audio for your video. type: string aspectRatio: type: string title: VideoStatusEncodingMetadata type: object video-status-encoding: properties: playable: description: Whether the video is playable or not. example: true type: boolean qualities: description: Available qualities the video can be viewed in. items: $ref: '#/components/schemas/quality' type: array metadata: $ref: '#/components/schemas/video-status-encoding-metadata' title: VideoStatusEncoding type: object player_theme_assets: example: link: path/to/my/logo/mylogo.jpg logo: mylogo.jpg properties: logo: description: The name of the file containing the logo you want to use. example: mylogo.jpg type: string link: description: The path to the file containing your logo. example: path/to/my/logo/mylogo.jpg type: string type: object securitySchemes: bearerAuth: scheme: bearer type: http x-client-base-paths: production: https://ws.api.video sandbox: https://sandbox.api.video x-readme: explorer-enabled: true proxy-enabled: true samples-enabled: true samples-languages: - curl - go - node - php - python