Aller au contenu principal

Référence API

Videas Public API · v1.0.0

Télécharger OpenAPI

Introduction

The Videas API for third-party integrators.

It reads your organization's library and writes to it, it publishes what the library holds on the organization's channels, and it reads what their audience watched:

  • the library — GET /v1/assets lists its assets and GET /v1/workspaces the workspaces they are in, each counted under the same filters by its …/count, and GET /v1/assets/{asset_id} reads one asset with what a listing leaves out, such as its tags and its custom fields. Every asset is in exactly one workspace, the one its workspace_id names, and a workspace files its assets in folders (« Finding an asset »);
  • its collections — GET /v1/collections, the lists of assets it plays one after the other, such as playlists, and what each one plays (« Collections »);
  • adding to it — POST /v1/uploads, a file you send or one we fetch from a link (« Adding a file »), and POST /v1/assets, a video hosted on YouTube, Vimeo or Dailymotion (« Adding a video hosted elsewhere »), each in a folder if you name one, and POST /v1/folders, a folder (« Filing in folders »);
  • editing an asset — its words, the folder it is in, its tags, its values of the organization's own fields, which GET /v1/custom-fields lists, and its picture (« Editing an asset », « An asset's picture »);
  • the channels — GET /v1/channels, the categories each one files its videos in, GET /v1/categories, and what they publish, GET /v1/publications, which you create and change (« Publishing on a channel »);
  • embedding — POST /v1/assets/{asset_id}/embed and POST /v1/collections/{collection_id}/embed, the code that plays an asset or a collection in a web page (« Embedding »);
  • what was watched — GET /v1/analytics/sessions, who watched which asset, when, how much and which stretches of it (« Analytics »);
  • connecting an integration — POST /v1/connect/exchange, where your server collects the key a person of the organization approved for it, and DELETE /v1/api-keys/current, where a key gives itself back (« Connecting an integration »).

More resources land under /v1 without changing what is already there.

Cette référence est générée depuis le contrat OpenAPI que publie le backend de l'API ; son contenu est donc en anglais.

Authentification

Chaque requête porte une clé API de votre organisation (ak_…) dans l’en-tête Authorization. Une clé s’utilise depuis un serveur : /v1 n’envoie aucun en-tête CORS, aucune page web ne peut donc l’appeler.

Authorization: Bearer <key>

An API key belonging to your organization, ak_…. An owner or an administrator creates one in the Videas console; the raw value is shown once.

Créer une clé et faire un premier appel

URL de base & versions

URL de base
https://api.videas.com
Version
/v1 · 1.0.0

La version est dans le chemin : /v1. Un nouvel endpoint, un paramètre facultatif, un champ ou une valeur de plus arrivent sans nouvelle version — lisez ce que votre code ne connaît pas encore comme tel, jamais comme une erreur. Retirer, renommer, changer un type ou refuser ce qui était accepté ferait une /v2.

Le contrat servi par l’API fait foi : sa référence interactive est sur https://api.videas.com/v1/docs, son fichier OpenAPI sur https://api.videas.com/v1/openapi.json. Le fichier que télécharge cette page en est une copie, au même contenu.

Erreurs

Toutes les erreurs ont la même forme, quel que soit le statut : code, message et, quand le serveur en a un, request_id, à citer si vous nous écrivez. Branchez votre code sur code, jamais sur message : il est rédigé pour une personne et peut changer.

{
  "code": "not_found",
  "message": "…",
  "reason": "string",
  "request_id": "…"
}
StatutSignification
400Requête invalide — le message dit quel paramètre ou quel champ
401Clé absente, inconnue, expirée ou révoquée
402
403La clé ne porte pas la permission que l'endpoint demande
404Rien de tel dans votre organisation
409Contraire à l'état de la ressource — un envoi déjà terminé, par exemple
413Fichier trop gros : au-delà de 10 Gio
415Corps qui n'est pas envoyé en application/json
422Corps qui n'est pas la requête attendue : champ manquant, mal typé ou inconnu
429Trop de requêtes : attendez les secondes que donne Retry-After, puis renvoyez
500Erreur de notre côté — citez le request_id en nous écrivant
502
503Service momentanément indisponible — réessayez avec un délai croissant
504Le serveur a cessé d'attendre — un GET se renvoie sans risque

Authentication

Send an API key belonging to your organization as Authorization: Bearer <key>. An owner or an administrator creates one in the Videas console, choosing what it may do, and the raw value is shown once — or approves an integration that asks for one, which then collects it itself (« Connecting an integration »). A key may carry any of these, and each opens what it says and nothing else:

  • assets.library.read — read the library: its assets, its collections, its workspaces and their folders, and its custom fields;
  • assets.library.upload — add files to it with POST /v1/uploads, follow or give up the uploads it opened, and make folders with POST /v1/folders;
  • assets.library.edit — change an asset already there: its words, the folder it is in, its tags, its custom fields and its picture;
  • assets.third_party_video.import — with assets.library.upload beside it, add a video hosted elsewhere with POST /v1/assets;
  • websites.catalogue.read — read the channels, their categories and what they publish;
  • websites.catalogue.publish — publish assets on the channels, and change what they publish;
  • analytics.sessions.read — read the playback sessions: who watched which asset, when and how much;
  • assets.library.embed — get the embed that plays an asset or a collection in a web page, publishing it when it has none yet.

None implies another: a key made to publish cannot edit an asset, and one made to edit cannot read the library. A write answers what it wrote whether or not the key may also read it.

Three of them depend on what the organization uses. The channels' two open nothing for an organization that does not publish channels: every channel endpoint answers it 403, as it would a key without them. And assets.third_party_video.import opens nothing until Videas turns on videos hosted elsewhere for the organization: until then POST /v1/assets answers 404. A key may carry either beforehand, and works with no change once the organization has the feature.

A key authenticates the organization, not a person: it keeps working when the person who created it leaves, and everything it can reach is scoped to that one organization. A key belongs on a server: /v1 sends no CORS headers, so no web page can call it — a page sends a file with the token of one upload instead, as « Adding a file » says.

Lists and parameters

Lists are paged with limit, after and order: send the page's next back as after until it is null. A page carries no total and there is no offset; a list that can be counted has a …/count beside it, which takes the list's filters and nothing else.

A parameter that takes several values takes them as one key, separated by commas — ?type=video,audio, which is OpenAPI's style: form with explode: false. A key given twice is refused with a 400, and so is a key the endpoint does not list: a misspelt filter is an error, never a filter ignored. A list of words is the exception, since a word may itself hold a comma: tag is given once per word — ?tag=shared&tag=platform:heliaq, which is style: form with explode: true — and an endpoint lists such a key so.

What may change

Without a new version: a new endpoint, a new optional query parameter, a new field in a response, and a new value in a list of values such as an asset's type or status, or an error's code. Read an unknown field or value as something your code does not know yet, not as an error. Only with one: removing or renaming anything, changing a type or a unit, or refusing a request that used to be accepted — that is a new version, /v2.

Errors

Errors always have the same shape, whatever the status, so one handler on your side can read all of them: code, message, and a request_id to quote when you ask us about one. Branch on code, never on message, which is written for a human and may change at any time. A code keeps its meaning for good and the list may grow: read a code you do not know by the HTTP status it came with.

Every body is JSON but a picture's, which is the picture itself (« Editing an asset »), and a JSON body not sent as application/json is a 415. A body naming a field the request does not list, or a field of the wrong type, is a 422; a value the request's rules refuse is a 400, whose message names the field. An identifier in a body naming nothing your key can reach — a workspace, a channel, an asset, a custom field — is a 404, whether it names nothing at all or something of another organization's.

Any request may be refused with a 429 (rate_limited) when a key, or its organization, sends more than this API accepts: wait the number of seconds Retry-After gives, then send it again. A 500, 503 or 504 is a failure on our side: retry after a growing delay — « Retrying », below, says which requests are safe to send again as they are, and what to look for before sending the others.

Finding an asset

GET /v1/assets narrows by any of these, and GET /v1/assets/count counts under the same ones:

  • type and status, one value or several: ?status=ready lists only the assets that play;
  • workspace_id, the assets of one workspace;
  • parent, where they are filed: a folder's id, the assets directly in that folder, or root, the ones in no folder. A folder is in one workspace: GET /v1/workspaces/{workspace_id}/folders lists them flat, each with the parent_id of the folder it sits in — null at the root —, so the tree is rebuilt from one walk, and every asset says in its own parent_id which folder it is directly in;
  • search, words looked for in the asset's name, its description and the other words it holds, as the library's search box in Videas finds them: every word must be found, case and accents do not count, a word also finds the longer ones it begins, a "quoted phrase" is found as written and a -word leaves out the assets holding it. The assets come in the list's usual order, not by how well they match;
  • external_ref, your own reference, as « Retrying » uses it.

Filing in folders

A workspace files its assets in folders: GET /v1/workspaces/{workspace_id}/folders lists them flat, each with the parent_id of the folder it sits in — null at the root —, and GET /v1/folders/{folder_id} reads one. A folder is in one workspace, and an asset is filed only in a folder of its own workspace:

  • POST /v1/folders makes one in workspace_id's tree, directly under the folder parent_id names or at the root without one, with assets.library.upload. Two folders may have the same name, so a request sent twice makes two (« Retrying »).
  • parent_id on POST /v1/uploads and POST /v1/assets files what they create directly in that folder; without it, the asset lands at the workspace's root.
  • parent_id on PATCH /v1/assets/{asset_id} moves an asset to another folder of its workspace, or to its root with null, with assets.library.edit. Sending the parent_id the asset already reads with, null included, moves nothing. An asset never changes workspace here.

A parent_id naming anything that workspace's folder listing does not answer — a folder of another workspace, one deleted, an asset — is a 404, and nothing is created or moved. A folder hidden in Videas is in no listing either: what it holds reads parent_id null, as at the root.

A folder shared by a link shares what is filed in it, at the moment the link is opened: an asset moved or added into such a folder is visible to whoever holds the link, and one moved out of it no longer is.

Collections

A collection is a list of the library's assets played one after the other — a playlist. GET /v1/assets does not list collections; GET /v1/collections does, with what describes each one: its name, its description as the organization wrote it — Markdown, not rendered —, its workspace_id, how many entries it holds and how long they last, and its picture's thumbnail_url, which follows the collection as an asset's follows the asset. GET /v1/collections/{collection_id} adds its tags.

tag narrows the list to the collections filed under any of the words given, one tag per word: ?tag=shared&tag=platform:heliaq lists those filed under either. A word is matched as PUT /v1/assets/{asset_id}/tags matches one — case, accents and punctuation do not count — and only a tag the collection's read answers counts. GET /v1/collections/count counts under the same words.

GET /v1/collections/{collection_id}/items is what the collection plays: each item is an asset as GET /v1/assets answers it, with its position, where it comes when the collection is played, from 0. The items come in the order of their assets' created_at, like every list here, so that a walk never skips or repeats one: sort them by position to play them. An entry whose asset the library does not show — one hidden from it, say — is not an item, and the positions count only the items listed, so item_count may be larger than what the items answer. A collection set to play in a random order is answered in the order the organization arranged it in, the same on every read, so a copy of its positions holds from one read to the next; its player still shuffles it each time it plays. A collection Videas fills by rules answers what its rules select when it is read, in a new order on every read if it is set to a random one, and its item_count is 0.

Analytics

What is under /v1/analytics/ is measured rather than stored: it is read from our analytics store, it changes while somebody watches, and it is the same population whichever endpoint answers. That population is your organization's playback sessions that played: a page that opened a player nobody pressed play on is not one, a session stays whatever became of its asset — deleted, hidden, moved —, and bots are left out. Every endpoint of the namespace takes the same filters, asset_id and viewer_id, and nothing else narrows what it counts, so two of them never disagree about what they are over.

GET /v1/analytics/sessions lists the sessions, one sitting of one viewer on one asset each: when it started, how long it was played in watch_time_ms, how far it got in completion_percentage, the asset's duration as it was then, and watched, the stretches of the asset that were watched, in milliseconds — each on one of a hundred equal steps of the duration, so a stretch covers a little more than was watched. Add up the stretches of a viewer's sessions on an asset to know how much of it they have seen. A list is a snapshot: a session still playing has more watch time on the next read, so read again a session you need final, and one whose viewer presses play reaches the list about a minute later. GET /v1/analytics/sessions/count counts under the same filters.

viewer_id is what your embed code says it is: send viewer_id=<uuid> in the player's address and it is that viewer's sessions you read back — derive a uuid from an identifier of yours that is not one, a UUIDv5 of it for example. Without one, it identifies one browser on one device, and nobody in particular. Nothing checks the identifier a page sends, so treat it as what the page claimed. asset_id may name an asset GET /v1/assets/{asset_id} no longer answers.

Adding a file

POST /v1/uploads creates the asset at once — uploading, in the workspace you named, in the folder parent_id names or else at its root, its id in asset_id — and its file comes from one of two sources. Send exactly one of size_bytes or source_url:

  • size_bytes: you send the file. The answer carries upload_url and upload_token. Send the file to upload_url with the token in X-Upload-Token: whole with one PUT when it is at most max_put_bytes — Content-Length its exact size, any Content-Type — or with tus 1.0 core, in chunks of at most max_put_bytes and, but for the last, of at least 5 MiB. upload_url is opaque: use it exactly as given, and never build one. The request that completes the file answers X-Checksum-Sha256, the SHA-256 of what was stored. A PUT that breaks off records nothing and is sent again whole; tus resumes from the offset a HEAD answers. A file not complete by the upload's expires_at is given up on.
  • source_url: we fetch the file from that link, in the background. The answer carries no address and no token: there is nothing to send.

From a browser. Your server opens the upload with its key, then hands upload_url and upload_token — never the key — to the page, which sends the file from any origin: one PUT with fetch, or a tus client. The token is answered once, by the request that opened the upload, and admits its holder to that one upload and to nothing else.

What a link must be. http or https on the scheme's own port, 80 or 443, with no user name or password in it, leading to the file itself: a YouTube, Vimeo or Dailymotion page is refused at once — « Adding a video hosted elsewhere » says how to add one —, and a web page where the file should be fails not_a_file. At most 10 GiB. We follow up to five redirects, never from https to http, and resume a broken download with a Range request where the server honours one. Give sha256 and the file must match it. A presigned link to your bucket is the usual case, so a link is treated as a credential: sealed while the download needs it, and never answered back whole — the upload's source_url is the link without its query. Sign it for longer than the download may take, retries included. An organization may have only so many links waiting or downloading at once; past that, the request is a 429 with Retry-After.

Links are fetched from these addresses and from no others — allow them in your firewall or your bucket's policy:

  • IPv4: 193.104.118.42 and 193.104.118.43;
  • IPv6: 2a12:3440:102::3:42 and 2a12:3440:102::3:43.

They fetch every customer's links, so allow them beside the link's signature and never instead of it: an object these addresses may read unsigned is one any of our customers may have us fetch into their library.

Following an upload. Nothing notifies you yet: poll GET /v1/uploads/{upload_id} — its status, its received_bytes, and for a link that failed its failure — or GET /v1/assets/{asset_id} with a key that reads the library. An upload is pending, then receiving, then completed; or it ends cancelled — DELETE /v1/uploads/{upload_id} gives it up —, expired, or for a link failed. UploadStatus says which source reaches which, and UploadFailureCode what each failure means and what to do about it. Once the upload is completed, the asset goes on to processing, then ready; an upload that ends any other way leaves its asset error.

Adding a video hosted elsewhere

POST /v1/assets creates an asset that plays a video from its provider's site — YouTube, Vimeo or Dailymotion —, named in third_party_url by the address of its page or the one its share button gives. Nothing else is taken there: not an embed code, not another site, and not a link to a file, which POST /v1/uploads adds. The key needs assets.third_party_video.import beside assets.library.upload, and the organization must have videos hosted elsewhere turned on (« Authentication »).

The provider is asked about the video while your request waits. Its answer names the asset unless you send name, describes it unless you send description, and says whether the video may be played outside its site: a private, deleted or non-embeddable video is refused with a 400. A provider that does not answer in time, or answers with a failure of its own, is a 502 (upstream_error): send the request again in a moment. Either way nothing is created. The provider's poster becomes the asset's picture when it arrives in time; otherwise the asset is created without one, and PUT /v1/assets/{asset_id}/thumbnail gives it one.

The asset is ready at once — there is no file to receive or process —, in workspace_id, in the folder parent_id names or else at its root. The answer is a 201 with its Location and the asset as GET /v1/assets/{asset_id} answers it, its third_party saying which video it plays; third_party.video_id, on every page of GET /v1/assets, is what to match your own records on.

Editing an asset

Four requests change an asset already in the library, each with assets.library.edit:

  • PATCH /v1/assets/{asset_id}, its words and its folder — name, description, excerpt, copyright, language, external_ref, seo_title, seo_description, and parent_id, the folder of its workspace it moves to (« Filing in folders »). A field you leave out stays as it is, a value replaces it, and null empties it — but for name, which is never empty, and parent_id, whose null is the workspace's root.
  • PUT /v1/assets/{asset_id}/tags, the words it is filed under, sent as words rather than ids: {"tags": ["Carbon fibre", "Recycling"]}. Case, accents and punctuation do not count, so carbon-fibre names the same tag. A word is looked for among the tags of the asset's workspace, then among the organization's; one that matches neither becomes a new tag of the organization, as you wrote it. The list replaces the asset's tags, except those Videas attaches itself, which stay whatever you send; an empty list takes yours off. A workspace may file its assets only under the tags it already has: there, a word that matches none is refused with a 400.
  • PATCH /v1/assets/{asset_id}/custom-fields, its values of the organization's own fields. GET /v1/custom-fields lists the fields, each with its type and where it applies. A value is written by its field's id, in the shape the field's type gives it — CustomFieldValue — and null empties it, but for a required field. A choice field's values are its options' ids, and GET /v1/custom-fields/{field_id}/choices lists them apart, since a field may offer thousands. The fields you name take the values you send and the others keep theirs; a request any of whose values is refused writes nothing.
  • PUT /v1/assets/{asset_id}/thumbnail, its picture. The body is the picture itself, not JSON — a JPEG, a PNG or a WebP of at most 10 MiB, with a Content-Type naming which.

Each answers the whole asset, as GET /v1/assets/{asset_id} answers it, so one shape is read whatever was written. A request that changes nothing writes nothing: sending what the asset already holds — its words, its folder, its tags, its values, its picture — leaves it as it was, updated_at included. An asset's updated_at moves with its words and its picture, never with its folder, its tags or its custom fields. The last request to arrive wins: nothing checks what the asset held when you last read it.

A change a key makes to an asset's name, description, excerpt, copyright or language, to its tags or to its custom fields is recorded in the asset's history in Videas under the key's name, so the people who look after the library see which integration made it.

An asset the organization has validated in its shared pool is read-only here: each of these requests is refused with a 403, whatever the key carries, since only that pool's moderators can change it, and they do so from Videas.

An asset's picture

thumbnail_url, on every asset a listing or a read answers, is the address of the picture the asset is shown with — the one the organization chose, else the one Videas picked —, and null while there is none. It is stable and anonymous: it needs no key, goes as it is in a web page's <img>, and goes on answering the asset's picture when another one is chosen, so store the address rather than the bytes. It is on the domain your organization's Videas application is served on, not on this API's.

It answers a JPEG at the picture's own size, at most 3840 pixels a side; with its last segment changed it answers other formats and sizes — thumbnail.webp, thumbnail.png, or {fit}-{width}x{height}.{ext} for the picture fitted to a box, which thumbnail_url itself describes. Its answers may be held for a few minutes, and carry an ETag. It answers 404 once the asset is deleted or hidden, or no longer has a picture: read the asset again then.

Publishing on a channel

A channel is a public site where the organization publishes videos for an audience. GET /v1/channels lists the organization's channels, online or not: name is the one its audience reads, url its home page — null while no domain of the channel is switched on. Reading them takes websites.catalogue.read, and so does every read below; the two writes take websites.catalogue.publish.

Categories are each channel's tree, read here and arranged from Videas. GET /v1/categories?channel_id= lists them flat, in the order they were created: rebuild the tree from parent_id — null at the root — and sort the categories sharing a parent by position, then by name. A category switched off is listed, and may be filed in; its page answers 404 until it is switched on.

A publication is one asset on one channel, at its own address, filed in that channel's categories. GET /v1/publications lists them, narrowed by channel_id, asset_id and status: ?asset_id= says where an asset is published, and with channel_id beside it whether it is published there.

  • status is draft, published or archived. A publication scheduled for later is published with a published_at still to come: the channel shows it from that instant.
  • access says who it is for, read in five words — public, authenticated, restricted, paid and on_request — and written in two: public, anybody the channel lets in, and authenticated, anybody who signed in to the channel or gave its password. The other three stand for a right or an offer set from Videas: a request may neither set one (400) nor move a publication off one (409). Left out of a creation, the channel decides — on a channel whose visitors open an account themselves and whose site is otherwise open, a new publication asks for that account; on any other, it is open to everyone the channel lets in. Created authenticated, sent so or given so by the channel, a publication is shown locked: the visitors it is not for still see it in the channel's listings when it is listed, and at its page, and playing it asks them to sign in. A PATCH moving a publication's level leaves that as it was. It is the publication's own level: on a channel that asks every visitor to sign in, a public publication is still behind that sign-in.
  • slug is the handle its url is built on. Left out of a creation, it is made from the asset's own handle, else its name, followed by -2, -3 and on where the address is taken; sent, it is taken as it is — a 400 when the channel's own site answers that address, a 409 when another publication or a page of the channel holds it. A new slug leaves the old address answering, sending visitors to the new one.
  • category_ids are the categories it is filed in, and primary_category_id its main one, which must be among them. It is a set: read, its order says only that the main category comes first, the others following in the order GET /v1/categories lists them; sent, the order is ignored. Sent, the list replaces the set: a category it stays in keeps the place and the featuring given to it there in Videas, and one it enters puts it last.

POST /v1/publications publishes an asset on a channel. The asset must be ready — a 409 until it is — and is published at most once on a channel, so a second request for the same pair is a 409 too. It is created a draft unless status says published. PATCH /v1/publications/{publication_id} changes one: what you send is written and what you leave out stays, and its channel and its asset never change. Both answer the whole publication; a PATCH that changes nothing writes nothing, updated_at included, and the last request to arrive wins. Nothing deletes a publication: archived takes it off the channel and keeps it, and a new slug frees its address.

While the organization's channels are still being moved to Videas, every write on them is refused with a 409: they are changed from the platform they are moving from until the move is complete. Reading them answers as usual.

Embedding

A web page plays an asset or a collection through its embed — its default one, which the organization manages in Videas. POST /v1/assets/{asset_id}/embed — or POST /v1/collections/{collection_id}/embed — answers it, and creates it when there is none yet: a 201 when it was just created, public and active, a 200 when it already existed. Its id is what the loader script takes:

<script src="{script_url}" data-embed="{id}" async></script>

or put embed_url in an iframe. The id is stable: store it with your page rather than asking for every view. The organization keeps control of its embed from Videas — it may restrict it to some domains, put it behind a credential or switch it off —, and the answer says so in access and active without making a second one. A list of sites the organization set for all its embeds applies as well, and access does not report it. The answer names what the embed plays in asset_id, or in collection_id for a collection, the other being null. The key needs assets.library.embed.

Connecting an integration

An integration installed on a customer's site — a WordPress plugin, say — gets its key without anybody copying one: it sends a person of the organization to Videas, who approves it, and its server collects the key.

  1. Open the connection by sending that person's browser to https://app.videas.com/api/app/connect, with client_name, the name the approval page shows; redirect_uri, where the browser comes back — https, or http on localhost or 127.0.0.1 only, with no user name, password or fragment; scope, the permissions asked for, separated by spaces; state, a value of yours given back unchanged; and code_challenge, the unpadded base64url SHA-256 of a random verifier your server keeps to itself (PKCE's S256, the only method there is). A request outside these rules is refused there and never sent back to you.
  2. The person decides. They sign in if they need to, read which site asks for what — the site's address first — and approve, confirming who they are with their password and second factor, or refuse. The browser comes back to redirect_uri with code and state, or with error=access_denied and state. The request waits ten minutes for a decision.
  3. Collect the key, from your server, within sixty seconds of the approval: POST /v1/connect/exchange with {"code": …, "code_verifier": …} and no key. The answer carries the key in api_key, shown this once, what it may do in permissions — what the person approved, which may be less than you asked for —, and the organization it belongs to, organization_id and organization_name. A code is collected once, and an answer that reads it ends it, whatever that answer says: the 200; a 400 refusing the code, the verifier, or the permissions it was approved for — an unknown code, one already collected, lapsed or refused, or a verifier that is not the one, without saying which —; and a 404, connecting integrations having been switched off for the organization the code was approved for. After either refusal, start again from the first step. An answer given before the code is read leaves it as it was: a 429, too many connections from your server's address, and a 400, 413, 415 or 422 refusing the request itself — a query parameter, or a body that is not that JSON object —, whose message says what is wrong. A 500, 503 or 504 leaves it as it was too, unless the key was made and only its answer was lost (« Retrying »).
  4. Disconnect with DELETE /v1/api-keys/current, the key as the request's only credential: a 204, and the key is refused from its next request. Any key may give itself back, whether a connection or a person made it. Forget your copy whatever the answer.

The key a connection collects is an ordinary key: it lasts until it is revoked, and the organization sees it in the Videas console under the integration's name and the site's address, and may revoke it there like any other.

Retrying

A GET is always safe to send again, and so are PATCH and PUT: each says what the resource should hold, so sent twice the second finds it holding that already and writes nothing. DELETE /v1/uploads/{upload_id} is safe too: an upload already given up on is answered 204 again. So is DELETE /v1/api-keys/current, whose second answer is a 401: the key no longer works, which is what was asked. A POST creates something, so after a timeout or a 5xx, look for what the first one may have created before sending it again:

  • POST /v1/uploads and POST /v1/assets are not idempotent: sent twice, either creates two assets. Set external_ref on every one, and look it up with GET /v1/assets?external_ref= — which takes assets.library.read — before sending it again. An asset POST /v1/assets created is complete when it is found, ready from the moment it exists. A link given to POST /v1/uploads is already being fetched when its asset is found: do not send it again. A file you were sending cannot be resumed — its token was in the answer you lost — so open a new upload: the first asset ends error when its upload expires, and an error asset with no file is such an abandoned attempt.
  • POST /v1/folders is not idempotent: sent twice, it makes two folders, and two may have the same name. Look for the folder in GET /v1/workspaces/{workspace_id}/folders before sending it again.
  • POST /v1/publications publishes an asset once on a channel: sent again, it is refused with a 409, and GET /v1/publications?channel_id=…&asset_id=… finds the publication the first one made.
  • POST /v1/assets/{asset_id}/embed and its collection's twin are idempotent: sent again, either answers the embed the first one created.
  • POST /v1/connect/exchange may be sent again after a 429 or a 5xx, with the same code and verifier, while the sixty seconds after the approval last: a 429 never reads the code, and a 5xx leaves it to collect unless the first attempt made the key and only its answer was lost — the second is then a 400, and that key goes to nobody: the organization may revoke it in the console. After any other answer, open a new connection.

Schémas

Les objets que l'API reçoit et renvoie, avec leurs champs et les valeurs qu'ils peuvent prendre.

AssetCount

How many assets the listing would answer under the same filter.

ChampTypeObligatoireDescription
countintegerObligatoire

Counted when asked: a listing begun afterwards may meet assets created or deleted since.

AssetStatus

Where an asset is in its processing.

uploading — its bytes are arriving; processing — they have arrived and are being worked on; awaiting_credit — a video whose first month of storage the organization's credit could not pay, so nothing of it is encoded yet: it resumes once the credit covers it, and is deleted after seven days still waiting; ready — it can be played, although work may still go on behind it; error — the work ended with nothing playable. The list may grow, like AssetType's.

Valeurs : uploading, processing, awaiting_credit, ready, error

AssetSummary

One asset of the organization's library.

ChampTypeObligatoireDescription
idstring (uuid)Obligatoire

The asset's identifier — stable for its whole life, and the one to store.

namestringObligatoire

Its title, as the organization wrote it. Never empty.

typeAssetTypeObligatoire

What kind of thing it is.

Valeurs : video, audio, image, document, archive, file, subtitles, third_party, other

statusAssetStatusObligatoire

Where it is in its processing: only a ready asset can be played.

Valeurs : uploading, processing, awaiting_credit, ready, error

workspace_idstring (uuid)Obligatoire

The workspace it is in — the id of one of GET /v1/workspaces. An asset is in exactly one here, whatever else the organization files it under.

parent_idstring (uuid)peut valoir nullObligatoire

The folder of that workspace it sits directly in — the id of one of GET /v1/workspaces/{workspace_id}/folders, what GET /v1/assets?parent= takes — or null at the workspace's root.

descriptionstringpeut valoir nullObligatoire

Its description, as the organization wrote it; null when it has none.

external_refstringpeut valoir nullObligatoire

Your identifier for this asset, when the organization recorded one — the field that maps an asset of ours to a record of yours. Not unique; null when unset.

languagestringpeut valoir nullObligatoire

The language of its content, as a BCP 47 tag (fr, en-GB); null when unknown.

duration_msintegerpeut valoir nullObligatoire

Its running time in milliseconds, for a video or a sound; null when it has none or it is not known yet.

created_atstring (date-time)Obligatoire

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

updated_atstring (date-time)Obligatoire

When anything about it last changed (RFC 3339) — but for its folder, its tags and its custom fields: moving it or setting them does not move it.

third_partyThirdPartyVideopeut valoir nullObligatoire

For an asset of type third_party, the video it plays from another provider's site; null for every other type.

third_party.providerThirdPartyProviderObligatoire

Who hosts it.

Valeurs : youtube, vimeo, dailymotion, other

third_party.video_idstringpeut valoir nullObligatoire

The provider's own identifier of the video — what the address of its page names, such as the v of a YouTube address — and what to match your own records on. null for other, and when it is not known.

third_party.player_urlstring (uri)peut valoir nullObligatoire

The address of its player, https://, to put in an <iframe>; null when none is known, and the video then plays nowhere.

thumbnail_urlstring (uri)peut valoir nullObligatoire

The address of its picture — the one the organization chose to show it with, else the one Videas picked for it — as a JPEG at its own size, at most 3840 pixels a side; null while it has none.

Stable and anonymous: it needs no key, can be put as it is in a web page's <img>, and goes on answering the asset's picture when another one is chosen, so store the address rather than the bytes. Its answers may be held for a few minutes and carry an ETag.

The same address gives other sizes and formats with its last segment changed: thumbnail.webp or thumbnail.png for the picture at its own size, and {fit}-{width}x{height}.{ext} for one fitted to a box — fit cover (filling the box, cropped to it) or contain (inside it, never cropped), ext jpg, webp or png — such as cover-320x180.jpg or contain-1280x720.webp. A box it does not keep is redirected (308) to the smallest one it keeps that covers it. A picture is never enlarged.

It answers 404 once the asset is deleted or hidden, or no longer has a picture.

AssetType

What kind of thing an asset is.

The list may grow: a client should read a value it does not know as a kind this client does not handle, not as an error.

Valeurs : video, audio, image, document, archive, file, subtitles, third_party, other

AssetView

One asset of the organization's library, read by its id: every field a listing answers about it, under the same names, and the ones a listing leaves out.

ChampTypeObligatoireDescription
idstring (uuid)Obligatoire

The asset's identifier — stable for its whole life, and the one to store.

namestringObligatoire

Its title, as the organization wrote it. Never empty.

typeAssetTypeObligatoire

What kind of thing it is.

Valeurs : video, audio, image, document, archive, file, subtitles, third_party, other

statusAssetStatusObligatoire

Where it is in its processing: only a ready asset can be played.

Valeurs : uploading, processing, awaiting_credit, ready, error

workspace_idstring (uuid)Obligatoire

The workspace it is in — the id of one of GET /v1/workspaces. An asset is in exactly one here, whatever else the organization files it under.

parent_idstring (uuid)peut valoir nullObligatoire

The folder of that workspace it sits directly in — the id of one of GET /v1/workspaces/{workspace_id}/folders, what GET /v1/assets?parent= takes — or null at the workspace's root.

descriptionstringpeut valoir nullObligatoire

Its description, as the organization wrote it; null when it has none.

external_refstringpeut valoir nullObligatoire

Your identifier for this asset, when the organization recorded one — the field that maps an asset of ours to a record of yours. Not unique; null when unset.

languagestringpeut valoir nullObligatoire

The language of its content, as a BCP 47 tag (fr, en-GB); null when unknown.

duration_msintegerpeut valoir nullObligatoire

Its running time in milliseconds, for a video or a sound; null when it has none or it is not known yet.

created_atstring (date-time)Obligatoire

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

updated_atstring (date-time)Obligatoire

When anything about it last changed (RFC 3339) — but for its folder, its tags and its custom fields: moving it or setting them does not move it.

third_partyThirdPartyVideopeut valoir nullObligatoire

For an asset of type third_party, the video it plays from another provider's site; null for every other type.

third_party.providerThirdPartyProviderObligatoire

Who hosts it.

Valeurs : youtube, vimeo, dailymotion, other

third_party.video_idstringpeut valoir nullObligatoire

The provider's own identifier of the video — what the address of its page names, such as the v of a YouTube address — and what to match your own records on. null for other, and when it is not known.

third_party.player_urlstring (uri)peut valoir nullObligatoire

The address of its player, https://, to put in an <iframe>; null when none is known, and the video then plays nowhere.

thumbnail_urlstring (uri)peut valoir nullObligatoire

The address of its picture — the one the organization chose to show it with, else the one Videas picked for it — as a JPEG at its own size, at most 3840 pixels a side; null while it has none.

Stable and anonymous: it needs no key, can be put as it is in a web page's <img>, and goes on answering the asset's picture when another one is chosen, so store the address rather than the bytes. Its answers may be held for a few minutes and carry an ETag.

The same address gives other sizes and formats with its last segment changed: thumbnail.webp or thumbnail.png for the picture at its own size, and {fit}-{width}x{height}.{ext} for one fitted to a box — fit cover (filling the box, cropped to it) or contain (inside it, never cropped), ext jpg, webp or png — such as cover-320x180.jpg or contain-1280x720.webp. A box it does not keep is redirected (308) to the smallest one it keeps that covers it. A picture is never enlarged.

It answers 404 once the asset is deleted or hidden, or no longer has a picture.

excerptstringpeut valoir nullObligatoire

A short summary of it, as the organization wrote it — what a listing shows under its name where the description would not fit; null when it has none.

copyrightstringpeut valoir nullObligatoire

The notice a reuser of it has to carry — who holds its rights, under what terms — as the organization wrote it; null when it has none.

seo_titlestringpeut valoir nullObligatoire

The title a web page publishing it gives itself — in a browser's tab and a search engine's results — where the organization wrote one; null when it has none, and such a page is then titled with its name.

seo_descriptionstringpeut valoir nullObligatoire

The description a web page publishing it gives search engines and link previews, where the organization wrote one; null when it has none, and such a page then describes it with its excerpt, else its description.

tagsarray<TagSummary>Obligatoire

The tags the organization files it under, ordered by name; empty when it has none. A tag a machine suggested and nobody confirmed is not one of them.

tags[].idstring (uuid)Obligatoire

The tag's identifier — the same on every asset that carries it, and kept when the tag is renamed.

tags[].namestringObligatoire

The word itself, as the organization wrote it.

custom_fieldsarray<CustomFieldValueEntry>Obligatoire

Its values of the organization's custom fields — of those that apply to it, by its workspace and its type (GET /v1/custom-fields says where each applies) — in the order a form lays them out; empty when it has none. A field it holds no value of is not in the list. A field of type record, json or file is not read here yet.

custom_fields[].field_idstring (uuid)Obligatoire

The field — the id of one of GET /v1/custom-fields.

custom_fields[].slugstringObligatoire

The field's handle, as that listing answers it.

custom_fields[].labelstringObligatoire

The field's label, as that listing answers it.

custom_fields[].typeCustomFieldTypeObligatoire

The field's type, which decides the shape of value.

Valeurs : text, long_text, number, date, boolean, choice, link, record, json, file

custom_fields[].valueCustomFieldValueObligatoire

The value, in the shape its type gives it.

CategoryCount

How many categories the listing would answer.

ChampTypeObligatoireDescription
countintegerObligatoire

Counted when asked: a listing begun afterwards may meet categories created or deleted since.

CategorySummary

One category of one of the organization's channels: a node of the tree the channel files its videos in.

ChampTypeObligatoireDescription
idstring (uuid)Obligatoire

The category's identifier.

channel_idstring (uuid)Obligatoire

The channel it belongs to, a GET /v1/channels id.

parent_idstring (uuid)peut valoir nullObligatoire

The category it sits under, of the same channel; null at the root of the channel's tree. It names a category this listing answers too.

namestringObligatoire

Its name, as the channel's audience reads it.

slugstringObligatoire

The handle its address is built on — lowercase letters and digits joined by hyphens, unique within its channel.

positionintegerObligatoire

Its place among the categories sharing its parent, lowest first. Not unique: siblings at one position are shown in the order of their names.

is_activebooleanObligatoire

Whether the channel's audience sees it. A category switched off is hidden from the channel with everything below it; it keeps what is filed in it, and shows it again once it is switched back on.

urlstringpeut valoir nullObligatoire

The address of its page on the channel: the channel's url followed by /categories/{slug}/. null when the channel's url is. The page answers 404 while the category, or one above it, is switched off.

created_atstring (date-time)Obligatoire

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

updated_atstring (date-time)Obligatoire

When anything about it last changed (RFC 3339) — moving it under another parent included.

ChannelCount

How many channels the listing would answer.

ChampTypeObligatoireDescription
countintegerObligatoire

Counted when asked: a listing begun afterwards may meet channels created or deleted since.

ChannelSummary

One channel of the organization: a public site where it publishes videos for an audience.

ChampTypeObligatoireDescription
idstring (uuid)Obligatoire

The channel's identifier — what a category's channel_id names.

namestringObligatoire

Its name, as its audience reads it.

urlstringpeut valoir nullObligatoire

The address of its home page: its main domain, followed by a language segment such as /fr when that domain serves several channels, one per language. Every address on the channel starts with it. null while no domain of the channel is switched on. It is where the channel answers once it is online — a channel is listed whether it is online or not, and this read does not say which.

languagestringObligatoire

The language it is written in, a BCP 47 tag such as fr or en.

created_atstring (date-time)Obligatoire

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

updated_atstring (date-time)Obligatoire

When the channel itself last changed (RFC 3339). A change of its domains alone, which moves its url, does not move it.

ChannelView

One channel of the organization, read by its id: every field a listing answers about it, under the same names. A field a listing cannot afford on every row may be added here.

ChampTypeObligatoireDescription
idstring (uuid)Obligatoire

The channel's identifier — what a category's channel_id names.

namestringObligatoire

Its name, as its audience reads it.

urlstringpeut valoir nullObligatoire

The address of its home page: its main domain, followed by a language segment such as /fr when that domain serves several channels, one per language. Every address on the channel starts with it. null while no domain of the channel is switched on. It is where the channel answers once it is online — a channel is listed whether it is online or not, and this read does not say which.

languagestringObligatoire

The language it is written in, a BCP 47 tag such as fr or en.

created_atstring (date-time)Obligatoire

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

updated_atstring (date-time)Obligatoire

When the channel itself last changed (RFC 3339). A change of its domains alone, which moves its url, does not move it.

CollectionCount

How many collections the listing would answer under the same filter.

ChampTypeObligatoireDescription
countintegerObligatoire

Counted when asked: a listing begun afterwards may meet collections created or deleted since.

CollectionItem

One item of a collection: an asset, and where it comes when the collection is played.

ChampTypeObligatoireDescription
positionintegerObligatoire

Where it comes when the collection is played, from 0 for the first: its rank among the items this endpoint lists, as they stood when this page was read. Sort by it to play them. A collection set to play in a random order is answered in the order the organization arranged it in, the same on every read, while its player plays it shuffled, in an order drawn again each day; one whose items Videas selects by rules answers a new order on every read.

assetAssetSummaryObligatoire

The asset, as GET /v1/assets answers it.

asset.idstring (uuid)Obligatoire

The asset's identifier — stable for its whole life, and the one to store.

asset.namestringObligatoire

Its title, as the organization wrote it. Never empty.

asset.typeAssetTypeObligatoire

What kind of thing it is.

Valeurs : video, audio, image, document, archive, file, subtitles, third_party, other

asset.statusAssetStatusObligatoire

Where it is in its processing: only a ready asset can be played.

Valeurs : uploading, processing, awaiting_credit, ready, error

asset.workspace_idstring (uuid)Obligatoire

The workspace it is in — the id of one of GET /v1/workspaces. An asset is in exactly one here, whatever else the organization files it under.

asset.parent_idstring (uuid)peut valoir nullObligatoire

The folder of that workspace it sits directly in — the id of one of GET /v1/workspaces/{workspace_id}/folders, what GET /v1/assets?parent= takes — or null at the workspace's root.

asset.descriptionstringpeut valoir nullObligatoire

Its description, as the organization wrote it; null when it has none.

asset.external_refstringpeut valoir nullObligatoire

Your identifier for this asset, when the organization recorded one — the field that maps an asset of ours to a record of yours. Not unique; null when unset.

asset.languagestringpeut valoir nullObligatoire

The language of its content, as a BCP 47 tag (fr, en-GB); null when unknown.

asset.duration_msintegerpeut valoir nullObligatoire

Its running time in milliseconds, for a video or a sound; null when it has none or it is not known yet.

asset.created_atstring (date-time)Obligatoire

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

asset.updated_atstring (date-time)Obligatoire

When anything about it last changed (RFC 3339) — but for its folder, its tags and its custom fields: moving it or setting them does not move it.

asset.third_partyThirdPartyVideopeut valoir nullObligatoire

For an asset of type third_party, the video it plays from another provider's site; null for every other type.

asset.thumbnail_urlstring (uri)peut valoir nullObligatoire

The address of its picture — the one the organization chose to show it with, else the one Videas picked for it — as a JPEG at its own size, at most 3840 pixels a side; null while it has none.

Stable and anonymous: it needs no key, can be put as it is in a web page's <img>, and goes on answering the asset's picture when another one is chosen, so store the address rather than the bytes. Its answers may be held for a few minutes and carry an ETag.

The same address gives other sizes and formats with its last segment changed: thumbnail.webp or thumbnail.png for the picture at its own size, and {fit}-{width}x{height}.{ext} for one fitted to a box — fit cover (filling the box, cropped to it) or contain (inside it, never cropped), ext jpg, webp or png — such as cover-320x180.jpg or contain-1280x720.webp. A box it does not keep is redirected (308) to the smallest one it keeps that covers it. A picture is never enlarged.

It answers 404 once the asset is deleted or hidden, or no longer has a picture.

CollectionSubtype

What a collection collects.

The list may grow: a client should read a value it does not know as a kind this client does not handle, not as an error.

Valeurs : videos, audios, images, documents, mixed

CollectionSummary

One collection of the organization's library: a list of its assets, played one after the other.

ChampTypeObligatoireDescription
idstring (uuid)Obligatoire

The collection's identifier — stable for its whole life, and the one to store.

namestringObligatoire

Its title, as the organization wrote it. Never empty.

descriptionstringpeut valoir nullObligatoire

Its description, as the organization wrote it — Markdown, as written and not rendered; null when it has none.

workspace_idstring (uuid)Obligatoire

The workspace it is in — the id of one of GET /v1/workspaces.

subtypeCollectionSubtypeObligatoire

What it collects: the kind of asset its items are meant to be, or mixed for any kind. It says what the organization made the collection for, not what it holds — a curated collection may hold an asset of another kind.

Valeurs : videos, audios, images, documents, mixed

item_countintegerObligatoire

How many entries it holds, counted whatever each entry's asset is: it may count entries GET /v1/collections/{collection_id}/items leaves out, such as an asset hidden from the library. 0 for a collection whose items Videas selects by rules rather than holds: its items are what that endpoint answers.

duration_msintegerObligatoire

The running times of those same entries added up, in milliseconds; 0 when none has one.

created_atstring (date-time)Obligatoire

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

updated_atstring (date-time)Obligatoire

When its name, its description or the picture chosen for it last changed (RFC 3339). Its tags and its entries — which assets it holds, and in what order — do not move it: read its items to see theirs.

thumbnail_urlstring (uri)peut valoir nullObligatoire

The address of its picture — the one the organization chose for the collection, else its cover entry's, else that of the first item it plays, the one its items rank 0 (for a collection set to shuffle, the first in its arrangement) — as a JPEG at its own size, at most 3840 pixels a side; null while it has none. A collection whose items Videas selects by rules is shown only by a picture chosen for it.

Stable and anonymous, like an asset's thumbnail_url, and with the same other names — thumbnail.webp, cover-320x180.jpg and the like. It follows the collection: when another picture is chosen, another entry becomes its cover, or another item plays first, the address answers that one, so store the address rather than the bytes. It answers 404 once the collection is deleted or hidden, or no longer has a picture.

CollectionView

One collection of the organization, read by its id: every field a listing answers about it, under the same names, and its tags.

ChampTypeObligatoireDescription
idstring (uuid)Obligatoire

The collection's identifier — stable for its whole life, and the one to store.

namestringObligatoire

Its title, as the organization wrote it. Never empty.

descriptionstringpeut valoir nullObligatoire

Its description, as the organization wrote it — Markdown, as written and not rendered; null when it has none.

workspace_idstring (uuid)Obligatoire

The workspace it is in — the id of one of GET /v1/workspaces.

subtypeCollectionSubtypeObligatoire

What it collects: the kind of asset its items are meant to be, or mixed for any kind. It says what the organization made the collection for, not what it holds — a curated collection may hold an asset of another kind.

Valeurs : videos, audios, images, documents, mixed

item_countintegerObligatoire

How many entries it holds, counted whatever each entry's asset is: it may count entries GET /v1/collections/{collection_id}/items leaves out, such as an asset hidden from the library. 0 for a collection whose items Videas selects by rules rather than holds: its items are what that endpoint answers.

duration_msintegerObligatoire

The running times of those same entries added up, in milliseconds; 0 when none has one.

created_atstring (date-time)Obligatoire

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

updated_atstring (date-time)Obligatoire

When its name, its description or the picture chosen for it last changed (RFC 3339). Its tags and its entries — which assets it holds, and in what order — do not move it: read its items to see theirs.

thumbnail_urlstring (uri)peut valoir nullObligatoire

The address of its picture — the one the organization chose for the collection, else its cover entry's, else that of the first item it plays, the one its items rank 0 (for a collection set to shuffle, the first in its arrangement) — as a JPEG at its own size, at most 3840 pixels a side; null while it has none. A collection whose items Videas selects by rules is shown only by a picture chosen for it.

Stable and anonymous, like an asset's thumbnail_url, and with the same other names — thumbnail.webp, cover-320x180.jpg and the like. It follows the collection: when another picture is chosen, another entry becomes its cover, or another item plays first, the address answers that one, so store the address rather than the bytes. It answers 404 once the collection is deleted or hidden, or no longer has a picture.

tagsarray<TagSummary>Obligatoire

The tags the organization files it under, ordered by name; empty when it has none. A tag a machine suggested and nobody confirmed is not one of them.

tags[].idstring (uuid)Obligatoire

The tag's identifier — the same on every asset that carries it, and kept when the tag is renamed.

tags[].namestringObligatoire

The word itself, as the organization wrote it.

CreateAssetRequest

An asset to create in the library, from a video hosted on YouTube, Vimeo or Dailymotion.

This is the one kind of asset created here today: a file — a video, a sound, a picture, a document — is added with POST /v1/uploads, which receives or fetches its bytes. A field this body does not list is refused.

ChampTypeObligatoireDescription
workspace_idstring (uuid)Obligatoire

The workspace the new asset lands in — the id of one of GET /v1/workspaces, private ones included.

third_party_urlstring (uri)Obligatoire

The address of the video on YouTube, Vimeo or Dailymotion, as its page or its share button gives it: https://www.youtube.com/watch?v=…, https://youtu.be/…, https://vimeo.com/…, https://www.dailymotion.com/video/…. Its provider is asked about it before the asset is created, so a private, deleted or non-embeddable video is refused. An embed code, an address on any other site and a link to a file are refused with a 400: a file is added with POST /v1/uploads.

copyrightstringpeut valoir nullFacultatif

The notice a reuser has to carry — who holds its rights, under what terms. At most 1000 characters.

descriptionstringpeut valoir nullFacultatif

The asset's description. Absent, the provider's description where it gives one, else none. At most 50000 characters.

excerptstringpeut valoir nullFacultatif

A short summary, shown under the title where the description would not fit. At most 1000 characters.

external_refstringpeut valoir nullFacultatif

Your identifier for this asset, returned as its external_ref without the spaces around it. Not unique, never blank, and at most 500 characters. Set it on every request: after a timeout or a 5xx, look it up with GET /v1/assets?external_ref= before sending the request again, since the first one may have created the asset.

languagestringpeut valoir nullFacultatif

The language of its content, as a BCP 47 tag: fr, en-GB, zh-Hans-CN.

namestringpeut valoir nullFacultatif

The asset's title. Absent, the provider's title. Never blank, and at most 500 characters once the spaces around it are trimmed.

parent_idstring (uuid)peut valoir nullFacultatif

The folder of that workspace the new asset lands directly in — the id of one of GET /v1/workspaces/{workspace_id}/folders. Absent or null, it lands at the workspace's root.

CreateFolderRequest

A folder to make in a workspace's tree. A field this body does not list is refused.

ChampTypeObligatoireDescription
workspace_idstring (uuid)Obligatoire

The workspace whose tree it joins — the id of one of GET /v1/workspaces, private ones included.

namestringObligatoire

Its name. Never blank, and at most 500 characters once the spaces around it are trimmed. Two folders may have the same name.

descriptionstringpeut valoir nullFacultatif

What it says it is for. At most 50000 characters; absent, null, empty or nothing but spaces, it says nothing.

parent_idstring (uuid)peut valoir nullFacultatif

The folder it sits directly under — the id of one of GET /v1/workspaces/{workspace_id}/folders. Absent or null, it sits at the workspace's root.

CreatePublicationRequest

An asset to publish on one of the organization's channels. A field this body does not list is refused.

ChampTypeObligatoireDescription
channel_idstring (uuid)Obligatoire

The channel to publish on, a GET /v1/channels id.

asset_idstring (uuid)Obligatoire

The asset to publish, a GET /v1/assets id. It must be ready, and a channel publishes a video, a sound, a picture or a video hosted elsewhere — not a document. An asset is published at most once on a channel.

accessWritablePublicationAccesspeut valoir nullFacultatif

Who it is for: public or authenticated. Absent, the channel's own rule decides — authenticated on a channel whose visitors open an account themselves and whose site is otherwise open, public on any other. Created authenticated — sent so, or given so by the channel's rule — it is shown locked: it still shows itself to the visitors it is not for, in the channel's listings when it is listed and at its page, and playing it asks them to sign in.

Valeurs : public, authenticated

category_idsarray<string (uuid)>peut valoir nullFacultatif

The categories to file it in, GET /v1/categories ids of the same channel, switched-off ones included. At most 100; an id sent twice counts once. Absent, it is filed nowhere.

is_listedbooleanpeut valoir nullFacultatif

Whether the channel shows it in its listings — true unless sent false.

primary_category_idstring (uuid)peut valoir nullFacultatif

Its main category, one of category_ids. Absent, it has none.

published_atstring (date-time)peut valoir nullFacultatif

With status: published, when it goes on the channel (RFC 3339) — a date in the future schedules it. Absent, now. Refused on a draft.

slugstringpeut valoir nullFacultatif

The handle its address is built on: lowercase letters and digits in words joined by single hyphens, at most 255 characters, taken as sent. Absent, the asset's own handle where it has one, else its name made into one — followed by -2, -3 and on where the channel already answers at that address.

statusPublicationStatuspeut valoir nullFacultatif

draft, the default, or published. A publication is never created archived.

Valeurs : draft, published, archived

CreateUploadRequest

What to add to the library: the workspace it lands in, what it is called, and where its bytes come from.

Send exactly one of size_bytes or source_url. size_bytes means you send the file yourself, to the address the answer gives; source_url means we download it from that link in the background. A request carrying both, or neither, is refused with a 400 naming the two. A field this body does not list is refused too.

ChampTypeObligatoireDescription
workspace_idstring (uuid)Obligatoire

The workspace the new asset lands in — the id of one of GET /v1/workspaces, private ones included.

content_typestringpeut valoir nullFacultatif

The type you declare for the file you send. Recorded, never trusted: what the file is gets measured once it has arrived. Only with size_bytes.

descriptionstringpeut valoir nullFacultatif

The asset's description. Absent, it has none. At most 50000 characters.

external_refstringpeut valoir nullFacultatif

Your identifier for this asset, returned as its external_ref without the spaces around it. Not unique, never blank, and at most 500 characters. Set it on every request: after a timeout or a 5xx, look it up with GET /v1/assets?external_ref= before sending the request again, since the first one may have created the asset.

filenamestringpeut valoir nullFacultatif

The file's name on your side, extension included — what the asset's kind is first read from. Required with size_bytes; optional with source_url, whose file is then named from what the link answers. Never blank.

languagestringpeut valoir nullFacultatif

The language of its content, as a BCP 47 tag: fr, en-GB, zh-Hans-CN.

namestringpeut valoir nullFacultatif

The asset's title. Absent, the file's name — its first 500 characters. Never blank, and at most 500 characters once the spaces around it are trimmed.

parent_idstring (uuid)peut valoir nullFacultatif

The folder of that workspace the new asset lands directly in — the id of one of GET /v1/workspaces/{workspace_id}/folders. Absent or null, it lands at the workspace's root.

sha256stringpeut valoir nullFacultatif

The SHA-256 digest of the file at source_url, as 64 hexadecimal characters: when given, the file we download must match it — a copy that does not is downloaded once more, and a second mismatch fails the upload checksum_mismatch. Only with source_url — a file you send is answered with the digest of what was stored.

size_bytesintegerpeut valoir nullFacultatif

You send the file, and this is its exact size in bytes. At most 10737418240 (10 GiB); a larger file is refused with a 413. Exclusive with source_url.

source_urlstring (uri)peut valoir nullFacultatif

We fetch the file from this http or https link, in the background, from the fixed addresses this API's description lists under « Adding a file » — a presigned link to your bucket works, and the upload's status says how far the download got. Exclusive with size_bytes. Refused with a 400 naming the reason: a scheme other than http or https, a user name or a password in the link, localhost, a literal address that is not a public one, a port other than 80 for http and 443 for https, or a YouTube, Vimeo or Dailymotion page, which is a player and not a file — POST /v1/assets creates an asset that plays one. The file is at most 10 GiB, and a larger one fails the upload too_large. The link is kept sealed while it is needed and never answered back whole: source_url on the upload is it without its query.

CustomFieldChoiceCount

How many options the listing would answer.

ChampTypeObligatoireDescription
countintegerObligatoire

Counted when asked: a listing begun afterwards may meet options added or withdrawn since.

CustomFieldChoiceSummary

One option a choice field offers.

ChampTypeObligatoireDescription
idstring (uuid)Obligatoire

The option's identifier — what a value of the field holds, and what a write sends.

labelstringObligatoire

What a person reads for it.

CustomFieldCount

How many custom fields the listing would answer.

ChampTypeObligatoireDescription
countintegerObligatoire

Counted when asked: a listing begun afterwards may meet fields created or deleted since.

CustomFieldSummary

One of the organization's own fields: something an asset of its library may carry beside its name and its description.

ChampTypeObligatoireDescription
idstring (uuid)Obligatoire

The field's identifier — what a write of an asset's values names it by, and the one to store.

labelstringObligatoire

What a person reads beside its value.

slugstringObligatoire

A short handle the organization gave it: lowercase letters and digits joined by hyphens. Not unique: two groups of fields may each hold one under the same handle — address a field by its id.

typeCustomFieldTypeObligatoire

What it holds, which decides the shape of its value.

Valeurs : text, long_text, number, date, boolean, choice, link, record, json, file

multiplebooleanObligatoire

For a choice field, whether it takes several options rather than one; false for every other type.

requiredbooleanObligatoire

Whether it may be emptied: a value of a required field can be changed and never cleared. An asset may still have none, until somebody gives it one.

publicbooleanObligatoire

Whether it is shown to the public wherever an asset carrying it is published — on a channel's page and in the player's details.

workspace_idstring (uuid)peut valoir nullObligatoire

The one workspace whose assets it applies to; null for every workspace of the organization.

asset_typesarray<AssetType>peut valoir nullObligatoire

The types of asset it applies to; null for every type.

Valeurs : video, audio, image, document, archive, file, subtitles, third_party, other

created_atstring (date-time)Obligatoire

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

updated_atstring (date-time)Obligatoire

When anything about it last changed (RFC 3339).

CustomFieldType

What a custom field holds, and so the shape of its value:

  • text — one line, a string;
  • long_text — several lines, a string;
  • number — a number;
  • date — a day, YYYY-MM-DD;
  • boolean — true or false;
  • choice — one of the field's options, by its id, or a list of them on a multiple field;
  • link — an address with an optional label, {"url", "label"};
  • record — an entry of a reference list this product keeps for the organization;
  • json — structured data;
  • file — a file.

The last three are listed and not yet read or written here. The list may grow: read a value you do not know as a field your client neither reads nor writes.

Valeurs : text, long_text, number, date, boolean, choice, link, record, json, file

CustomFieldValue

A value of a custom field, in the shape its type gives it — the same shape read and written:

  • text, long_text — a string;
  • number — a number;
  • date — YYYY-MM-DD; a value written outside this API may also carry a time of day, YYYY-MM-DDTHH:MM:SS with an optional offset;
  • boolean — true or false;
  • choice — an option's id, as GET /v1/custom-fields/{field_id}/choices lists them; on a multiple field, a list of them;
  • link — {"url", "label"}.

CustomFieldValueEntry

One value an asset holds of one of the organization's custom fields.

ChampTypeObligatoireDescription
field_idstring (uuid)Obligatoire

The field — the id of one of GET /v1/custom-fields.

slugstringObligatoire

The field's handle, as that listing answers it.

labelstringObligatoire

The field's label, as that listing answers it.

typeCustomFieldTypeObligatoire

The field's type, which decides the shape of value.

Valeurs : text, long_text, number, date, boolean, choice, link, record, json, file

valueCustomFieldValueObligatoire

The value, in the shape its type gives it.

CustomFieldValueUpdate

One field's new value.

ChampTypeObligatoireDescription
field_idstring (uuid)Obligatoire

The field — the id of one of GET /v1/custom-fields that applies to this asset: one of every workspace or of the asset's own, of every type or of the asset's.

valueCustomFieldValuepeut valoir nullObligatoire

The value, in the shape the field's type gives it — the shape custom_fields reads it back in: a string for text and long_text, a number, YYYY-MM-DD for a date, true or false, an option's id for a choice — a list of them on a multiple one —, and {"url", "label"} for a link, whose url is an absolute http or https address and whose label may be left out. Nothing is converted: 42 is not a text and "true" is not a boolean.

Required, and null empties the field — so does an empty string on a text or a long_text field, and an empty list on a multiple one; a required field cannot be emptied. A record, json or file field is not written here yet.

EmbedAccess

Who the embed itself opens to. Open: a value not listed here may be added, and a reader treats one it does not know as closed to its visitors.

The organization may also limit every embed of a workspace, or all of its own, to a list of sites, a setting this value does not report: a page on a site outside that list is refused whatever the embed's own level.

Valeurs : public, domain_restricted, token_required

EmbedView

The embed a page uses to play an asset or a collection — its default one.

ChampTypeObligatoireDescription
idstring (uuid)Obligatoire

The embed's identifier — what the loader takes as data-embed. Stable for as long as the organization keeps this embed: store it rather than asking again for every page.

asset_idstring (uuid)peut valoir nullObligatoire

The asset it plays — the id of one of GET /v1/assets — or null when it plays a collection. Exactly one of asset_id and collection_id is set.

collection_idstring (uuid)peut valoir nullObligatoire

The collection it plays — the id of one of GET /v1/collections — or null when it plays an asset.

accessEmbedAccessObligatoire

Who it opens to.

Valeurs : public, domain_restricted, token_required

activebooleanObligatoire

Whether it plays today: false when the organization switched it off or its expiry has passed. The id stays the same either way.

embed_urlstringpeut valoir nullObligatoire

The address of the page that plays it, on the organization's platform — what an iframe takes as src. null when the platform has no host of its own yet.

script_urlstringpeut valoir nullObligatoire

The address of the loader script on the same platform, which reads data-embed and draws the player in its place. null when embed_url is.

created_atstring (date-time)Obligatoire

When the embed was created (RFC 3339).

ErrorBody

The body of every error response, whatever the status: a code to branch on, a message for a person to read, a request_id to quote when you report the failure, and — on a refusal the service names — a reason, saying which of its own rules refused.

ChampTypeObligatoireDescription
codeErrorCodeObligatoire

Valeurs : validation, unauthorized, not_signed_in, forbidden, no_organization, second_factor_required, not_found, method_not_allowed, conflict, credits_exhausted, budget_exceeded, payload_too_large, unsupported_media_type, rate_limited, quota_exceeded, not_implemented, service_unavailable, upstream_error, timed_out, internal

messagestringObligatoire

What went wrong, in English, for a person to read. It may change at any time: branch on code, never on this.

reasonstringFacultatif

Which of this service's own rules refused the request, as a lowercase snake_case name from the service's vocabulary of refusals, which the service documents where it names any. Branch on it to tell apart refusals that share a code: a name is always answered under the same code, so a client that does not know it handles the refusal by its code. It names a rule and never carries a value — what the refusal is about is in message. Only a refusal of the request (a 4xx status) carries one; absent, never null, when the service names none.

request_idstringFacultatif

The request's identifier, to quote when you report this failure. Absent, never null, when the server has none to give.

ErrorCode

Why a request failed: a stable code, carried in every error body, that says what to do about it. Branch on this, never on message.

  • validation (400, 422) — the request is malformed or invalid: fix it;
  • unauthorized (401) — no usable credential: authenticate;
  • not_signed_in (401) — the client's own credential was accepted, and the person acting through it is not signed in, or no longer is: sign the person in again, and keep the client's credential. Answered only where a person signs in on top of a client's credential; any other missing or expired credential is unauthorized;
  • forbidden (403) — the credential is valid and may not do this;
  • no_organization (403) — the account belongs to no organization: create or join one, since signing in again does not help;
  • second_factor_required (403) — the session is good and this endpoint asks more of it: prove a second factor on it, enrolling one first where the account has none, since signing in again is not what is asked;
  • not_found (404) — nothing answers to what the request names;
  • method_not_allowed (405) — the address does not take this method;
  • conflict (409) — something changed first: read the current state again rather than sending the same request again;
  • credits_exhausted (402) — the prepaid balance is spent: top it up;
  • budget_exceeded (402) — a spending limit is reached: raise it, or wait for its period to end;
  • payload_too_large (413) — the body is larger than accepted: send less;
  • unsupported_media_type (415) — the body's Content-Type is not one accepted here;
  • rate_limited (429) — too many requests: wait the seconds Retry-After gives;
  • quota_exceeded (429) — an allowance counted over a period is spent: message says who can lift it, and sending the request again soon changes nothing;
  • not_implemented (501) — the operation is not available yet;
  • service_unavailable (503) — the service cannot answer right now: retry later;
  • upstream_error (502) — a service called on your behalf failed: retry later;
  • timed_out (504) — the server stopped waiting, and the request may have taken effect in part: check before sending a write again, or send it with the same idempotency key;
  • internal (500) — a failure on the server's side: retry later, and quote the body's request_id when you report it.

A code keeps its meaning. New codes may be added: read one you do not know by the HTTP status it came with.

Valeurs : validation, unauthorized, not_signed_in, forbidden, no_organization, second_factor_required, not_found, method_not_allowed, conflict, credits_exhausted, budget_exceeded, payload_too_large, unsupported_media_type, rate_limited, quota_exceeded, not_implemented, service_unavailable, upstream_error, timed_out, internal

ExchangeRequest

The back-channel exchange: the one-time code from the redirect, and the verifier the install that opened the handshake has kept since before it.

No client secret and no session, which is the whole shape of this leg: the integration is a public client — every customer's site is a different install of one plugin — so what binds the code to that install is PKCE and nothing else.

ChampTypeObligatoireDescription
codestringObligatoire

The code the approval redirect carried.

code_verifierstringObligatoire

The RFC 7636 verifier whose S256 challenge opened the handshake.

ExchangeResponse

The credential, handed over exactly once.

api_key is the raw key and this response is the only place it ever exists outside the integration's own store: nothing here can hand it over a second time, and an integration that loses it opens a new handshake.

ChampTypeObligatoireDescription
api_keystringObligatoire

The full raw key, ak_…. Present it as Authorization: Bearer on every request your integration makes with it.

prefixstringObligatoire

The display prefix the organization's dashboard lists the key under, so an integration can tell its customer which row is theirs.

permissionsarray<string>Obligatoire

What the key carries, canonical — sorted, each key once. A plain list of permission keys and never a closed vocabulary: a product adds a permission in a release of its own.

organization_idOrgIdObligatoire

The organization the key authenticates. A key never authenticates a person.

organization_namestringObligatoire

That organization's name as it stood when the key was handed over, for your integration to say which organization it is connected to. It may change afterwards; organization_id does not.

FolderCount

How many folders the listing would answer.

ChampTypeObligatoireDescription
countintegerObligatoire

Counted when asked: a listing begun afterwards may meet folders created or deleted since.

FolderSummary

One folder of a workspace's tree.

ChampTypeObligatoireDescription
idstring (uuid)Obligatoire

The folder's identifier — what GET /v1/assets?parent= takes.

namestringObligatoire

Its name, as the organization wrote it.

descriptionstringpeut valoir nullObligatoire

What it says it is for; null when it says nothing.

workspace_idstring (uuid)Obligatoire

The workspace whose tree it is in — the id of one of GET /v1/workspaces.

parent_idstring (uuid)peut valoir nullObligatoire

The folder it sits directly under in that tree — the id of another folder of the same listing — or null at the root.

created_atstring (date-time)Obligatoire

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

updated_atstring (date-time)Obligatoire

When anything about it last changed (RFC 3339).

FolderView

One folder, as a read of it answers.

ChampTypeObligatoireDescription
idstring (uuid)Obligatoire

The folder's identifier — what GET /v1/assets?parent= takes.

namestringObligatoire

Its name, as the organization wrote it.

descriptionstringpeut valoir nullObligatoire

What it says it is for; null when it says nothing.

workspace_idstring (uuid)Obligatoire

The workspace whose tree it is in — the id of one of GET /v1/workspaces.

parent_idstring (uuid)peut valoir nullObligatoire

The folder it sits directly under in that tree — the id of another folder of the same listing — or null at the root.

created_atstring (date-time)Obligatoire

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

updated_atstring (date-time)Obligatoire

When anything about it last changed (RFC 3339).

OrgId

An organization: the account its members act in, and the one an API key belongs to.

Page_AssetSummary

One page of a list: its items, and the cursor of the page after it. Send next back as after to read the following page, until it is null. A page carries no total.

ChampTypeObligatoireDescription
dataarray<AssetSummary>Obligatoire

The items of this page, in the list's order.

data[].idstring (uuid)Obligatoire

The asset's identifier — stable for its whole life, and the one to store.

data[].namestringObligatoire

Its title, as the organization wrote it. Never empty.

data[].typeAssetTypeObligatoire

What kind of thing it is.

Valeurs : video, audio, image, document, archive, file, subtitles, third_party, other

data[].statusAssetStatusObligatoire

Where it is in its processing: only a ready asset can be played.

Valeurs : uploading, processing, awaiting_credit, ready, error

data[].workspace_idstring (uuid)Obligatoire

The workspace it is in — the id of one of GET /v1/workspaces. An asset is in exactly one here, whatever else the organization files it under.

data[].parent_idstring (uuid)peut valoir nullObligatoire

The folder of that workspace it sits directly in — the id of one of GET /v1/workspaces/{workspace_id}/folders, what GET /v1/assets?parent= takes — or null at the workspace's root.

data[].descriptionstringpeut valoir nullObligatoire

Its description, as the organization wrote it; null when it has none.

data[].external_refstringpeut valoir nullObligatoire

Your identifier for this asset, when the organization recorded one — the field that maps an asset of ours to a record of yours. Not unique; null when unset.

data[].languagestringpeut valoir nullObligatoire

The language of its content, as a BCP 47 tag (fr, en-GB); null when unknown.

data[].duration_msintegerpeut valoir nullObligatoire

Its running time in milliseconds, for a video or a sound; null when it has none or it is not known yet.

data[].created_atstring (date-time)Obligatoire

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

data[].updated_atstring (date-time)Obligatoire

When anything about it last changed (RFC 3339) — but for its folder, its tags and its custom fields: moving it or setting them does not move it.

data[].third_partyThirdPartyVideopeut valoir nullObligatoire

For an asset of type third_party, the video it plays from another provider's site; null for every other type.

data[].thumbnail_urlstring (uri)peut valoir nullObligatoire

The address of its picture — the one the organization chose to show it with, else the one Videas picked for it — as a JPEG at its own size, at most 3840 pixels a side; null while it has none.

Stable and anonymous: it needs no key, can be put as it is in a web page's <img>, and goes on answering the asset's picture when another one is chosen, so store the address rather than the bytes. Its answers may be held for a few minutes and carry an ETag.

The same address gives other sizes and formats with its last segment changed: thumbnail.webp or thumbnail.png for the picture at its own size, and {fit}-{width}x{height}.{ext} for one fitted to a box — fit cover (filling the box, cropped to it) or contain (inside it, never cropped), ext jpg, webp or png — such as cover-320x180.jpg or contain-1280x720.webp. A box it does not keep is redirected (308) to the smallest one it keeps that covers it. A picture is never enlarged.

It answers 404 once the asset is deleted or hidden, or no longer has a picture.

nextstringpeut valoir nullObligatoire

The cursor of the next page, to send back as after; null on the last page.

Page_CategorySummary

One page of a list: its items, and the cursor of the page after it. Send next back as after to read the following page, until it is null. A page carries no total.

ChampTypeObligatoireDescription
dataarray<CategorySummary>Obligatoire

The items of this page, in the list's order.

data[].idstring (uuid)Obligatoire

The category's identifier.

data[].channel_idstring (uuid)Obligatoire

The channel it belongs to, a GET /v1/channels id.

data[].parent_idstring (uuid)peut valoir nullObligatoire

The category it sits under, of the same channel; null at the root of the channel's tree. It names a category this listing answers too.

data[].namestringObligatoire

Its name, as the channel's audience reads it.

data[].slugstringObligatoire

The handle its address is built on — lowercase letters and digits joined by hyphens, unique within its channel.

data[].positionintegerObligatoire

Its place among the categories sharing its parent, lowest first. Not unique: siblings at one position are shown in the order of their names.

data[].is_activebooleanObligatoire

Whether the channel's audience sees it. A category switched off is hidden from the channel with everything below it; it keeps what is filed in it, and shows it again once it is switched back on.

data[].urlstringpeut valoir nullObligatoire

The address of its page on the channel: the channel's url followed by /categories/{slug}/. null when the channel's url is. The page answers 404 while the category, or one above it, is switched off.

data[].created_atstring (date-time)Obligatoire

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

data[].updated_atstring (date-time)Obligatoire

When anything about it last changed (RFC 3339) — moving it under another parent included.

nextstringpeut valoir nullObligatoire

The cursor of the next page, to send back as after; null on the last page.

Page_ChannelSummary

One page of a list: its items, and the cursor of the page after it. Send next back as after to read the following page, until it is null. A page carries no total.

ChampTypeObligatoireDescription
dataarray<ChannelSummary>Obligatoire

The items of this page, in the list's order.

data[].idstring (uuid)Obligatoire

The channel's identifier — what a category's channel_id names.

data[].namestringObligatoire

Its name, as its audience reads it.

data[].urlstringpeut valoir nullObligatoire

The address of its home page: its main domain, followed by a language segment such as /fr when that domain serves several channels, one per language. Every address on the channel starts with it. null while no domain of the channel is switched on. It is where the channel answers once it is online — a channel is listed whether it is online or not, and this read does not say which.

data[].languagestringObligatoire

The language it is written in, a BCP 47 tag such as fr or en.

data[].created_atstring (date-time)Obligatoire

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

data[].updated_atstring (date-time)Obligatoire

When the channel itself last changed (RFC 3339). A change of its domains alone, which moves its url, does not move it.

nextstringpeut valoir nullObligatoire

The cursor of the next page, to send back as after; null on the last page.

Page_CollectionItem

One page of a list: its items, and the cursor of the page after it. Send next back as after to read the following page, until it is null. A page carries no total.

ChampTypeObligatoireDescription
dataarray<CollectionItem>Obligatoire

The items of this page, in the list's order.

data[].positionintegerObligatoire

Where it comes when the collection is played, from 0 for the first: its rank among the items this endpoint lists, as they stood when this page was read. Sort by it to play them. A collection set to play in a random order is answered in the order the organization arranged it in, the same on every read, while its player plays it shuffled, in an order drawn again each day; one whose items Videas selects by rules answers a new order on every read.

data[].assetAssetSummaryObligatoire

The asset, as GET /v1/assets answers it.

nextstringpeut valoir nullObligatoire

The cursor of the next page, to send back as after; null on the last page.

Page_CollectionSummary

One page of a list: its items, and the cursor of the page after it. Send next back as after to read the following page, until it is null. A page carries no total.

ChampTypeObligatoireDescription
dataarray<CollectionSummary>Obligatoire

The items of this page, in the list's order.

data[].idstring (uuid)Obligatoire

The collection's identifier — stable for its whole life, and the one to store.

data[].namestringObligatoire

Its title, as the organization wrote it. Never empty.

data[].descriptionstringpeut valoir nullObligatoire

Its description, as the organization wrote it — Markdown, as written and not rendered; null when it has none.

data[].workspace_idstring (uuid)Obligatoire

The workspace it is in — the id of one of GET /v1/workspaces.

data[].subtypeCollectionSubtypeObligatoire

What it collects: the kind of asset its items are meant to be, or mixed for any kind. It says what the organization made the collection for, not what it holds — a curated collection may hold an asset of another kind.

Valeurs : videos, audios, images, documents, mixed

data[].item_countintegerObligatoire

How many entries it holds, counted whatever each entry's asset is: it may count entries GET /v1/collections/{collection_id}/items leaves out, such as an asset hidden from the library. 0 for a collection whose items Videas selects by rules rather than holds: its items are what that endpoint answers.

data[].duration_msintegerObligatoire

The running times of those same entries added up, in milliseconds; 0 when none has one.

data[].created_atstring (date-time)Obligatoire

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

data[].updated_atstring (date-time)Obligatoire

When its name, its description or the picture chosen for it last changed (RFC 3339). Its tags and its entries — which assets it holds, and in what order — do not move it: read its items to see theirs.

data[].thumbnail_urlstring (uri)peut valoir nullObligatoire

The address of its picture — the one the organization chose for the collection, else its cover entry's, else that of the first item it plays, the one its items rank 0 (for a collection set to shuffle, the first in its arrangement) — as a JPEG at its own size, at most 3840 pixels a side; null while it has none. A collection whose items Videas selects by rules is shown only by a picture chosen for it.

Stable and anonymous, like an asset's thumbnail_url, and with the same other names — thumbnail.webp, cover-320x180.jpg and the like. It follows the collection: when another picture is chosen, another entry becomes its cover, or another item plays first, the address answers that one, so store the address rather than the bytes. It answers 404 once the collection is deleted or hidden, or no longer has a picture.

nextstringpeut valoir nullObligatoire

The cursor of the next page, to send back as after; null on the last page.

Page_CustomFieldChoiceSummary

One page of a list: its items, and the cursor of the page after it. Send next back as after to read the following page, until it is null. A page carries no total.

ChampTypeObligatoireDescription
dataarray<CustomFieldChoiceSummary>Obligatoire

The items of this page, in the list's order.

data[].idstring (uuid)Obligatoire

The option's identifier — what a value of the field holds, and what a write sends.

data[].labelstringObligatoire

What a person reads for it.

nextstringpeut valoir nullObligatoire

The cursor of the next page, to send back as after; null on the last page.

Page_CustomFieldSummary

One page of a list: its items, and the cursor of the page after it. Send next back as after to read the following page, until it is null. A page carries no total.

ChampTypeObligatoireDescription
dataarray<CustomFieldSummary>Obligatoire

The items of this page, in the list's order.

data[].idstring (uuid)Obligatoire

The field's identifier — what a write of an asset's values names it by, and the one to store.

data[].labelstringObligatoire

What a person reads beside its value.

data[].slugstringObligatoire

A short handle the organization gave it: lowercase letters and digits joined by hyphens. Not unique: two groups of fields may each hold one under the same handle — address a field by its id.

data[].typeCustomFieldTypeObligatoire

What it holds, which decides the shape of its value.

Valeurs : text, long_text, number, date, boolean, choice, link, record, json, file

data[].multiplebooleanObligatoire

For a choice field, whether it takes several options rather than one; false for every other type.

data[].requiredbooleanObligatoire

Whether it may be emptied: a value of a required field can be changed and never cleared. An asset may still have none, until somebody gives it one.

data[].publicbooleanObligatoire

Whether it is shown to the public wherever an asset carrying it is published — on a channel's page and in the player's details.

data[].workspace_idstring (uuid)peut valoir nullObligatoire

The one workspace whose assets it applies to; null for every workspace of the organization.

data[].asset_typesarray<AssetType>peut valoir nullObligatoire

The types of asset it applies to; null for every type.

Valeurs : video, audio, image, document, archive, file, subtitles, third_party, other

data[].created_atstring (date-time)Obligatoire

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

data[].updated_atstring (date-time)Obligatoire

When anything about it last changed (RFC 3339).

nextstringpeut valoir nullObligatoire

The cursor of the next page, to send back as after; null on the last page.

Page_FolderSummary

One page of a list: its items, and the cursor of the page after it. Send next back as after to read the following page, until it is null. A page carries no total.

ChampTypeObligatoireDescription
dataarray<FolderSummary>Obligatoire

The items of this page, in the list's order.

data[].idstring (uuid)Obligatoire

The folder's identifier — what GET /v1/assets?parent= takes.

data[].namestringObligatoire

Its name, as the organization wrote it.

data[].descriptionstringpeut valoir nullObligatoire

What it says it is for; null when it says nothing.

data[].workspace_idstring (uuid)Obligatoire

The workspace whose tree it is in — the id of one of GET /v1/workspaces.

data[].parent_idstring (uuid)peut valoir nullObligatoire

The folder it sits directly under in that tree — the id of another folder of the same listing — or null at the root.

data[].created_atstring (date-time)Obligatoire

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

data[].updated_atstring (date-time)Obligatoire

When anything about it last changed (RFC 3339).

nextstringpeut valoir nullObligatoire

The cursor of the next page, to send back as after; null on the last page.

Page_PlaybackSession

One page of a list: its items, and the cursor of the page after it. Send next back as after to read the following page, until it is null. A page carries no total.

ChampTypeObligatoireDescription
dataarray<PlaybackSession>Obligatoire

The items of this page, in the list's order.

data[].idstring (uuid)Obligatoire

The sitting's identifier. One sitting of a collection is one row per asset it played, each carrying the sitting's id with its own asset_id: a row is an id and an asset_id together.

data[].asset_idstring (uuid)Obligatoire

The asset watched. It may be one GET /v1/assets/{asset_id} answers 404 for: a session outlives its asset, whatever became of it — deleted, hidden, moved.

data[].viewer_idstring (uuid)peut valoir nullObligatoire

Who watched: the viewer_id your embed code gave the player, otherwise an identifier the player keeps for one browser on one device. It identifies a person only if you made it so — send one of your own in the embed code; an identifier of yours that is not a uuid can become one, a UUIDv5 of it for example. Nothing checks what a page sends. null when the session was recorded with none.

data[].started_atstring (date-time)Obligatoire

When the sitting started (RFC 3339), to the second. Lists are ordered by this instant. It never moves: a reload continues the sitting it reopens.

data[].watch_time_msintegerObligatoire

How long the asset was played, in milliseconds — seeking counts for nothing. It only ever grows while the sitting goes on.

data[].completion_percentagenumberObligatoire

How much of the asset the sitting watched, from 0 to 100: its watch time as a percentage of what a whole viewing lasts — the asset's duration, or the window its players keep of it when it is trimmed —, capped at 100 — never where the player stands, so a sitting that skipped to the end has watched only what it played. It only ever grows while the sitting goes on.

data[].asset_duration_msintegerObligatoire

The asset's duration when the sitting was recorded, in milliseconds — which a new version of the asset does not move. 0 when it had none, as a live stream has none.

data[].watchedarray<WatchedRange>Obligatoire

The stretches of the asset that were watched, in order and never overlapping, each at least once — a stretch watched twice is listed once. Their resolution is a hundredth of the asset's duration: each stretch starts and ends on one of a hundred equal steps of it, so it covers a little more than was watched, and none ends past asset_duration_ms. Empty when the sitting recorded none: nothing was watched yet, the asset has no duration, or the player that played it did not report one.

nextstringpeut valoir nullObligatoire

The cursor of the next page, to send back as after; null on the last page.

Page_PublicationSummary

One page of a list: its items, and the cursor of the page after it. Send next back as after to read the following page, until it is null. A page carries no total.

ChampTypeObligatoireDescription
dataarray<PublicationSummary>Obligatoire

The items of this page, in the list's order.

data[].idstring (uuid)Obligatoire

The publication's identifier — what PATCH /v1/publications/{publication_id} takes.

data[].channel_idstring (uuid)Obligatoire

The channel it is published on, a GET /v1/channels id. It never changes.

data[].asset_idstring (uuid)Obligatoire

The asset it publishes, a GET /v1/assets id. It never changes, and an asset is published at most once on a channel.

data[].slugstringObligatoire

The handle its address is built on — lowercase letters and digits in words joined by single hyphens, unique among the channel's publications.

data[].urlstringpeut valoir nullObligatoire

The address of its page on the channel: the channel's url followed by /{slug}/. null when the channel's url is. It answers 404 until the publication is published and its published_at has come, and the channel's own door applies to it — see access.

data[].statusPublicationStatusObligatoire

Valeurs : draft, published, archived

data[].published_atstring (date-time)peut valoir nullObligatoire

When it went, or goes, on the channel (RFC 3339) — null for a draft never published. A published publication whose date is in the future is scheduled: the channel shows it from that instant. A draft or an archived publication keeps the date it last went out with.

data[].is_listedbooleanObligatoire

Whether the channel shows it in its catalogue, its categories, its search and its sitemap. A publication that is not listed still answers at its url.

data[].accessPublicationAccessObligatoire

Valeurs : public, authenticated, restricted, paid, on_request

data[].category_idsarray<string (uuid)>Obligatoire

The categories of its channel it is filed in, each a GET /v1/categories id — a set, whose order says one thing only: its main category comes first when it has one, and the others follow in the order GET /v1/categories lists them, oldest first. Empty when it is filed nowhere.

data[].primary_category_idstring (uuid)peut valoir nullObligatoire

Its main category, the one its page and its card name — one of category_ids; null when it has none.

data[].created_atstring (date-time)Obligatoire

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

data[].updated_atstring (date-time)Obligatoire

When its own settings last changed (RFC 3339) — its address, its status, its date, whether it is listed, who it is for. Filing it in other categories does not move it.

nextstringpeut valoir nullObligatoire

The cursor of the next page, to send back as after; null on the last page.

Page_WorkspaceSummary

One page of a list: its items, and the cursor of the page after it. Send next back as after to read the following page, until it is null. A page carries no total.

ChampTypeObligatoireDescription
dataarray<WorkspaceSummary>Obligatoire

The items of this page, in the list's order.

data[].idstring (uuid)Obligatoire

The workspace's identifier — what an asset's workspace_id names.

data[].namestringObligatoire

Its name, as the organization wrote it.

data[].created_atstring (date-time)Obligatoire

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

data[].updated_atstring (date-time)Obligatoire

When anything about it last changed (RFC 3339).

nextstringpeut valoir nullObligatoire

The cursor of the next page, to send back as after; null on the last page.

PlaybackSession

One playback session: one sitting of one viewer on one asset of the organization.

ChampTypeObligatoireDescription
idstring (uuid)Obligatoire

The sitting's identifier. One sitting of a collection is one row per asset it played, each carrying the sitting's id with its own asset_id: a row is an id and an asset_id together.

asset_idstring (uuid)Obligatoire

The asset watched. It may be one GET /v1/assets/{asset_id} answers 404 for: a session outlives its asset, whatever became of it — deleted, hidden, moved.

viewer_idstring (uuid)peut valoir nullObligatoire

Who watched: the viewer_id your embed code gave the player, otherwise an identifier the player keeps for one browser on one device. It identifies a person only if you made it so — send one of your own in the embed code; an identifier of yours that is not a uuid can become one, a UUIDv5 of it for example. Nothing checks what a page sends. null when the session was recorded with none.

started_atstring (date-time)Obligatoire

When the sitting started (RFC 3339), to the second. Lists are ordered by this instant. It never moves: a reload continues the sitting it reopens.

watch_time_msintegerObligatoire

How long the asset was played, in milliseconds — seeking counts for nothing. It only ever grows while the sitting goes on.

completion_percentagenumberObligatoire

How much of the asset the sitting watched, from 0 to 100: its watch time as a percentage of what a whole viewing lasts — the asset's duration, or the window its players keep of it when it is trimmed —, capped at 100 — never where the player stands, so a sitting that skipped to the end has watched only what it played. It only ever grows while the sitting goes on.

asset_duration_msintegerObligatoire

The asset's duration when the sitting was recorded, in milliseconds — which a new version of the asset does not move. 0 when it had none, as a live stream has none.

watchedarray<WatchedRange>Obligatoire

The stretches of the asset that were watched, in order and never overlapping, each at least once — a stretch watched twice is listed once. Their resolution is a hundredth of the asset's duration: each stretch starts and ends on one of a hundred equal steps of it, so it covers a little more than was watched, and none ends past asset_duration_ms. Empty when the sitting recorded none: nothing was watched yet, the asset has no duration, or the player that played it did not report one.

watched[].start_msintegerObligatoire

Where it starts, in milliseconds from the asset's start.

watched[].end_msintegerObligatoire

Where it ends, in milliseconds from the asset's start — after start_ms, and at most the session's asset_duration_ms.

PlaybackSessionCount

How many playback sessions the listing would answer under the same filter.

ChampTypeObligatoireDescription
countintegerObligatoire

Counted when asked: a session played since, or still playing, may make a listing begun afterwards answer more.

PublicationAccess

Who the publication is for — its own setting.

It is not what a given visitor gets, which also depends on the channel's door: a public publication on a channel that asks every visitor to sign in is still behind that sign-in. public — anybody the channel lets in; authenticated — anybody who signed in to the channel, or gave its password; restricted — only the members granted it; paid — the members who bought it, or hold a subscription covering it; on_request — the members who asked for it and were granted it. A request sets the first two (WritablePublicationAccess); the other three are set from Videas, with the right or the offer each stands for. The list may grow: read a value you do not know as restricted.

Valeurs : public, authenticated, restricted, paid, on_request

PublicationCount

How many publications the listing would answer under the same filters.

ChampTypeObligatoireDescription
countintegerObligatoire

Counted when asked: a listing begun afterwards may meet publications created or changed since.

PublicationStatus

Where a publication is in its life.

draft — not on the channel; published — on the channel from its published_at, which may be in the future: a publication scheduled for later is published with a date to come, and the channel shows it from that instant; archived — retired from the channel and kept, with its date. The list may grow: read a value you do not know as a publication the channel does not show.

Valeurs : draft, published, archived

PublicationSummary

One asset published on one of the organization's channels.

ChampTypeObligatoireDescription
idstring (uuid)Obligatoire

The publication's identifier — what PATCH /v1/publications/{publication_id} takes.

channel_idstring (uuid)Obligatoire

The channel it is published on, a GET /v1/channels id. It never changes.

asset_idstring (uuid)Obligatoire

The asset it publishes, a GET /v1/assets id. It never changes, and an asset is published at most once on a channel.

slugstringObligatoire

The handle its address is built on — lowercase letters and digits in words joined by single hyphens, unique among the channel's publications.

urlstringpeut valoir nullObligatoire

The address of its page on the channel: the channel's url followed by /{slug}/. null when the channel's url is. It answers 404 until the publication is published and its published_at has come, and the channel's own door applies to it — see access.

statusPublicationStatusObligatoire

Valeurs : draft, published, archived

published_atstring (date-time)peut valoir nullObligatoire

When it went, or goes, on the channel (RFC 3339) — null for a draft never published. A published publication whose date is in the future is scheduled: the channel shows it from that instant. A draft or an archived publication keeps the date it last went out with.

is_listedbooleanObligatoire

Whether the channel shows it in its catalogue, its categories, its search and its sitemap. A publication that is not listed still answers at its url.

accessPublicationAccessObligatoire

Valeurs : public, authenticated, restricted, paid, on_request

category_idsarray<string (uuid)>Obligatoire

The categories of its channel it is filed in, each a GET /v1/categories id — a set, whose order says one thing only: its main category comes first when it has one, and the others follow in the order GET /v1/categories lists them, oldest first. Empty when it is filed nowhere.

primary_category_idstring (uuid)peut valoir nullObligatoire

Its main category, the one its page and its card name — one of category_ids; null when it has none.

created_atstring (date-time)Obligatoire

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

updated_atstring (date-time)Obligatoire

When its own settings last changed (RFC 3339) — its address, its status, its date, whether it is listed, who it is for. Filing it in other categories does not move it.

PublicationView

One publication, read by its id: every field a listing answers about it, under the same names. A field a listing cannot afford on every row may be added here.

ChampTypeObligatoireDescription
idstring (uuid)Obligatoire

The publication's identifier — what PATCH /v1/publications/{publication_id} takes.

channel_idstring (uuid)Obligatoire

The channel it is published on, a GET /v1/channels id. It never changes.

asset_idstring (uuid)Obligatoire

The asset it publishes, a GET /v1/assets id. It never changes, and an asset is published at most once on a channel.

slugstringObligatoire

The handle its address is built on — lowercase letters and digits in words joined by single hyphens, unique among the channel's publications.

urlstringpeut valoir nullObligatoire

The address of its page on the channel: the channel's url followed by /{slug}/. null when the channel's url is. It answers 404 until the publication is published and its published_at has come, and the channel's own door applies to it — see access.

statusPublicationStatusObligatoire

Valeurs : draft, published, archived

published_atstring (date-time)peut valoir nullObligatoire

When it went, or goes, on the channel (RFC 3339) — null for a draft never published. A published publication whose date is in the future is scheduled: the channel shows it from that instant. A draft or an archived publication keeps the date it last went out with.

is_listedbooleanObligatoire

Whether the channel shows it in its catalogue, its categories, its search and its sitemap. A publication that is not listed still answers at its url.

accessPublicationAccessObligatoire

Valeurs : public, authenticated, restricted, paid, on_request

category_idsarray<string (uuid)>Obligatoire

The categories of its channel it is filed in, each a GET /v1/categories id — a set, whose order says one thing only: its main category comes first when it has one, and the others follow in the order GET /v1/categories lists them, oldest first. Empty when it is filed nowhere.

primary_category_idstring (uuid)peut valoir nullObligatoire

Its main category, the one its page and its card name — one of category_ids; null when it has none.

created_atstring (date-time)Obligatoire

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

updated_atstring (date-time)Obligatoire

When its own settings last changed (RFC 3339) — its address, its status, its date, whether it is listed, who it is for. Filing it in other categories does not move it.

SetAssetTagsRequest

The words to file an asset under, which replace the ones it is filed under now.

A field this body does not list is refused.

ChampTypeObligatoireDescription
tagsarray<string>Obligatoire

The asset's tags, by name: at most 100 words, each at most 100 characters once the spaces around it are trimmed, never blank, and holding at least one Latin letter or digit. Case and accents do not count, and any run of spaces or punctuation counts as one separator — so Carbon fibre, carbon-fibre and CARBON FIBRE are one tag, and carbonfibre another. Two words that are one tag are filed once. An empty list takes off every tag but those this product attaches itself, and a word naming one of those is taken only on an asset that already carries it.

TagSummary

A tag the organization files assets under.

ChampTypeObligatoireDescription
idstring (uuid)Obligatoire

The tag's identifier — the same on every asset that carries it, and kept when the tag is renamed.

namestringObligatoire

The word itself, as the organization wrote it.

ThirdPartyProvider

Who hosts a third-party video: youtube, vimeo or dailymotion — or other, a player from another site, which has no video_id.

The list may grow: read a value you do not know as other.

Valeurs : youtube, vimeo, dailymotion, other

ThirdPartyVideo

A video another provider hosts, which an asset of type third_party plays from there.

ChampTypeObligatoireDescription
providerThirdPartyProviderObligatoire

Who hosts it.

Valeurs : youtube, vimeo, dailymotion, other

video_idstringpeut valoir nullObligatoire

The provider's own identifier of the video — what the address of its page names, such as the v of a YouTube address — and what to match your own records on. null for other, and when it is not known.

player_urlstring (uri)peut valoir nullObligatoire

The address of its player, https://, to put in an <iframe>; null when none is known, and the video then plays nowhere.

UpdateAssetCustomFieldsRequest

Values to write in an asset's custom fields: the fields you name, and no other.

A field left out keeps its value. A field this body does not list is refused.

ChampTypeObligatoireDescription
valuesarray<CustomFieldValueUpdate>Obligatoire

The values, one per field: at most 200, and a field named once.

values[].field_idstring (uuid)Obligatoire

The field — the id of one of GET /v1/custom-fields that applies to this asset: one of every workspace or of the asset's own, of every type or of the asset's.

values[].valueCustomFieldValuepeut valoir nullObligatoire

The value, in the shape the field's type gives it — the shape custom_fields reads it back in: a string for text and long_text, a number, YYYY-MM-DD for a date, true or false, an option's id for a choice — a list of them on a multiple one —, and {"url", "label"} for a link, whose url is an absolute http or https address and whose label may be left out. Nothing is converted: 42 is not a text and "true" is not a boolean.

Required, and null empties the field — so does an empty string on a text or a long_text field, and an empty list on a multiple one; a required field cannot be emptied. A record, json or file field is not written here yet.

UpdateAssetRequest

What to change about an asset: the fields you send, and no other.

A field left out is left as it is, and null empties a field that may be empty — every field but name — or, on parent_id, moves the asset to its workspace's root. A field this body does not list is refused, among them the asset's type, its handle, whether it is listed, its expiry, its licence, its picture and its workspace.

ChampTypeObligatoireDescription
copyrightstringpeut valoir nullFacultatif

The notice a reuser has to carry — who holds its rights, under what terms. At most 1000 characters; null or an empty string empties it.

descriptionstringpeut valoir nullFacultatif

Its description. At most 50000 characters; null or an empty string empties it.

excerptstringpeut valoir nullFacultatif

A short summary, shown under the title where the description would not fit. At most 1000 characters; null or an empty string empties it.

external_refstringpeut valoir nullFacultatif

Your identifier for this asset, kept without the spaces around it. Not unique, never blank, and at most 500 characters; null empties it.

languagestringpeut valoir nullFacultatif

The language of its content, as a BCP 47 tag: fr, en-GB, zh-Hans-CN. null empties it: the language is then unknown.

namestringFacultatif

The asset's title. Never blank, at most 500 characters once the spaces around it are trimmed, and never null: an asset always has one.

parent_idstring (uuid)peut valoir nullFacultatif

The folder of its workspace it moves to — the id of one of GET /v1/workspaces/{workspace_id}/folders for the workspace its workspace_id names — or null for that workspace's root. The parent_id the asset already reads with, null included, leaves it where it is. An asset never changes workspace here, and moving it into a folder shared by a link makes it visible through that link.

seo_descriptionstringpeut valoir nullFacultatif

The description a web page publishing it gives search engines and link previews. Kept without the spaces around it, at most 1000 characters, and never blank; null empties it.

seo_titlestringpeut valoir nullFacultatif

The title a web page publishing it gives itself, in place of its name. Kept without the spaces around it, at most 255 characters, and never blank; null empties it.

UpdatePublicationRequest

What to change about a publication: the fields you send, and no other. Its channel and its asset never change, and a field this body does not list is refused.

ChampTypeObligatoireDescription
accessWritablePublicationAccessFacultatif

Who it is for: public or authenticated, the two levels a request moves a publication between. Only the level moves: whether it shows itself, locked, to the visitors it is not for stays as it was — a publication created authenticated through this API does, and one created public and made authenticated later does not: those visitors do not see it at all. A publication that is restricted, paid or on_request is not moved by a request: a 409. Never null.

Valeurs : public, authenticated

category_idsarray<string (uuid)>Facultatif

The categories it is filed in, as a whole: the list replaces the one it has, and the order it is sent in says nothing. A category it stays in keeps its place and its featuring there, one it enters puts it last, and one left out no longer holds it. [] files it nowhere; never null. At most 100, all of its own channel's; an id sent twice counts once.

is_listedbooleanFacultatif

Whether the channel shows it in its listings. Never null.

primary_category_idstring (uuid)peut valoir nullFacultatif

Its main category — one of the categories it is filed in once this change is made — or null for none. Absent, the main category stays where it is while the publication is still filed there, and there is none otherwise.

published_atstring (date-time)Facultatif

When it goes on the channel (RFC 3339), for a publication that is published or is made so by status: a date in the future schedules it, and sent alone it moves the date of one already published. Refused on a draft or an archived publication; never null.

slugstringFacultatif

A new handle for its address, on the terms of the creation. Its old address goes on answering, sending visitors to the new one. Never null.

statusPublicationStatusFacultatif

draft or archived takes it off the channel and keeps its published_at; published puts it on — at the published_at sent, else now: one taken off and put back on comes back as new rather than under the date it first went out on. Never null.

Valeurs : draft, published, archived

Upload

One upload into the organization's library, opened with an API key.

For a file you send (source: client), send it to upload_url, carrying the upload_token the opener answered in X-Upload-Token: whole with one PUT when it is at most max_put_bytes, or with tus 1.0 core. The address is opaque — use it as given. For a link (source: link) there is nothing to send: we download the file in the background, source_url says from where — without its query — and failure says why, if it fails. The asset exists from the start, uploading; once the upload is completed it goes on to processing and ready, which GET /v1/assets/{asset_id} reads.

The fields that describe the transfer — upload_url, max_put_bytes, expires_at and received_bytes — are null once its record is deleted, ninety days after the upload ended; size_bytes then answers the stored file's size for a completed upload.

ChampTypeObligatoireDescription
idstring (uuid)Obligatoire

The upload's identifier: what GET and DELETE /v1/uploads/{upload_id} take.

asset_idstring (uuid)Obligatoire

The asset the upload creates, which exists from the moment the upload opens — the id GET /v1/assets/{asset_id} takes.

workspace_idstring (uuid)peut valoir nullObligatoire

The workspace the asset is in — the id of one of GET /v1/workspaces; null while the asset is on no workspace of the organization, once it has been deleted.

sourceUploadSourceObligatoire

Where the bytes come from.

Valeurs : client, link

statusUploadStatusObligatoire

Where the upload is.

Valeurs : pending, receiving, completed, cancelled, expired, failed, refused

size_bytesintegerpeut valoir nullObligatoire

The file's size in bytes, as the opener declared it — for a link, as the remote declared it, null until it has; null once the transfer's record is deleted, for an upload that did not complete.

received_bytesintegerpeut valoir nullObligatoire

How many bytes have been received — 0 for a link whose download has not started; null once the transfer's record is deleted.

upload_urlstring (uri)peut valoir nullObligatoire

Where to send the file, with X-Upload-Token: whole with one PUT, or with tus 1.0 core. An absolute URL, to be used as given. null for a link, and once the transfer's record is deleted.

max_put_bytesintegerpeut valoir nullObligatoire

The largest file one PUT to upload_url carries, in bytes; a larger one goes with tus, in chunks of at most this size. null for a link, and once the transfer's record is deleted.

expires_atstring (date-time)peut valoir nullObligatoire

When a file you send that has not completed by then is given up on (RFC 3339): its asset ends error. A request still sending bytes at that moment pushes it out for as long as it runs. null for a link, and once the upload has ended.

source_urlstring (uri)peut valoir nullObligatoire

For a link, where the file is fetched from: the link without its query, its fragment and any user name — so no signature it carried. null for a file you send.

failureUploadFailurepeut valoir nullObligatoire

Why the download of a link failed, when status is failed; null otherwise.

failure.codeUploadFailureCodeObligatoire

Valeurs : address_refused, unreachable, not_found, refused, not_a_file, too_large, interrupted, checksum_mismatch

failure.messagestringObligatoire

What happened, in English, for a person to read. Never the link, and never what the remote answered in its body. Not stable: branch on code.

created_atstring (date-time)Obligatoire

When the upload was opened (RFC 3339).

updated_atstring (date-time)Obligatoire

When anything about the upload last changed (RFC 3339).

finished_atstring (date-time)peut valoir nullObligatoire

When the upload ended — completed, cancelled, expired, failed or refused (RFC 3339); null while it is open.

UploadCreated

The upload just opened, and the token to send its file with.

ChampTypeObligatoireDescription
idstring (uuid)Obligatoire

The upload's identifier: what GET and DELETE /v1/uploads/{upload_id} take.

asset_idstring (uuid)Obligatoire

The asset the upload creates, which exists from the moment the upload opens — the id GET /v1/assets/{asset_id} takes.

workspace_idstring (uuid)peut valoir nullObligatoire

The workspace the asset is in — the id of one of GET /v1/workspaces; null while the asset is on no workspace of the organization, once it has been deleted.

sourceUploadSourceObligatoire

Where the bytes come from.

Valeurs : client, link

statusUploadStatusObligatoire

Where the upload is.

Valeurs : pending, receiving, completed, cancelled, expired, failed, refused

size_bytesintegerpeut valoir nullObligatoire

The file's size in bytes, as the opener declared it — for a link, as the remote declared it, null until it has; null once the transfer's record is deleted, for an upload that did not complete.

received_bytesintegerpeut valoir nullObligatoire

How many bytes have been received — 0 for a link whose download has not started; null once the transfer's record is deleted.

upload_urlstring (uri)peut valoir nullObligatoire

Where to send the file, with X-Upload-Token: whole with one PUT, or with tus 1.0 core. An absolute URL, to be used as given. null for a link, and once the transfer's record is deleted.

max_put_bytesintegerpeut valoir nullObligatoire

The largest file one PUT to upload_url carries, in bytes; a larger one goes with tus, in chunks of at most this size. null for a link, and once the transfer's record is deleted.

expires_atstring (date-time)peut valoir nullObligatoire

When a file you send that has not completed by then is given up on (RFC 3339): its asset ends error. A request still sending bytes at that moment pushes it out for as long as it runs. null for a link, and once the upload has ended.

source_urlstring (uri)peut valoir nullObligatoire

For a link, where the file is fetched from: the link without its query, its fragment and any user name — so no signature it carried. null for a file you send.

failureUploadFailurepeut valoir nullObligatoire

Why the download of a link failed, when status is failed; null otherwise.

failure.codeUploadFailureCodeObligatoire

Valeurs : address_refused, unreachable, not_found, refused, not_a_file, too_large, interrupted, checksum_mismatch

failure.messagestringObligatoire

What happened, in English, for a person to read. Never the link, and never what the remote answered in its body. Not stable: branch on code.

created_atstring (date-time)Obligatoire

When the upload was opened (RFC 3339).

updated_atstring (date-time)Obligatoire

When anything about the upload last changed (RFC 3339).

finished_atstring (date-time)peut valoir nullObligatoire

When the upload ended — completed, cancelled, expired, failed or refused (RFC 3339); null while it is open.

upload_tokenstringpeut valoir nullObligatoire

The credential upload_url takes, in X-Upload-Token, answered here and never again: no read of the upload returns it. It admits its holder to this one upload until the upload ends, and to nothing else, so it may be handed to the page that sends the file — never the API key. null for a link, which nobody sends anything to.

UploadFailure

Why the download of a link failed.

ChampTypeObligatoireDescription
codeUploadFailureCodeObligatoire

Valeurs : address_refused, unreachable, not_found, refused, not_a_file, too_large, interrupted, checksum_mismatch

messagestringObligatoire

What happened, in English, for a person to read. Never the link, and never what the remote answered in its body. Not stable: branch on code.

UploadFailureCode

Why the download of a link failed, for a program to branch on. Each is final: once the cause is fixed, a new upload is how to try again.

  • address_refused — we do not connect to where the link leads: an address of ours, or one that is not public. Over https it is also the answer when the connection to the server cannot be opened, twice in a row — a name that does not resolve, a server that refuses us — so check the link's host, and that it accepts connections from the addresses we fetch from;
  • unreachable — no answer, after trying again for a while: over plain http, a name that does not resolve or a connection that fails; a TLS failure or a timeout; or a server that kept failing (5xx) or pushing back (429);
  • not_found — 404 or 410: the link is wrong, or the file is gone;
  • refused — any other 4xx, typically a presigned link that expired: sign it for longer than the download may take, retries included; or a redirect we do not follow: a sixth one, or one from https to plain http;
  • not_a_file — a web page where a file was expected: link to the file itself;
  • too_large — larger than a file may be, 10 GiB;
  • interrupted — the download broke off more times than it is retried;
  • checksum_mismatch — the file was downloaded twice, and twice it was not the sha256 you gave.

The list may grow, like source's: read a code you do not know as a failure your code does not handle yet.

Valeurs : address_refused, unreachable, not_found, refused, not_a_file, too_large, interrupted, checksum_mismatch

UploadSource

Where an upload's bytes come from: client — the caller sends the file to upload_url; link — we download it from source_url.

The list may grow: a client should read a value it does not know as a source this client does not handle, not as an error.

Valeurs : client, link

UploadStatus

Where an upload is. Both sources reach every value but failed, which is a link's alone:

  • pending — open, nothing received yet; for a link, the download has not started;
  • receiving — bytes are arriving; for a link, the download is running;
  • completed — the file is stored, and the asset goes on to processing;
  • cancelled — given up on with DELETE /v1/uploads/{upload_id}; for a file you send, also with the tus termination on upload_url, and for a link, when its asset is deleted before the file has arrived;
  • expired — a file you send that did not complete before expires_at; for a link, a download nobody was fetching any more;
  • failed — a link's only: the download failed, and failure says why;
  • refused — the file arrived and the organization's credit could not pay its first month of storage, so nothing was kept: top up the credit, then upload the file again.

The last five are final, and the asset of an upload that ended any other way than completed ends error. The list may grow, like source's.

Valeurs : pending, receiving, completed, cancelled, expired, failed, refused

WatchedRange

One stretch of an asset a sitting watched.

ChampTypeObligatoireDescription
start_msintegerObligatoire

Where it starts, in milliseconds from the asset's start.

end_msintegerObligatoire

Where it ends, in milliseconds from the asset's start — after start_ms, and at most the session's asset_duration_ms.

WorkspaceCount

How many workspaces the listing would answer.

ChampTypeObligatoireDescription
countintegerObligatoire

Counted when asked: a listing begun afterwards may meet workspaces created or deleted since.

WorkspaceSummary

One workspace of the organization.

ChampTypeObligatoireDescription
idstring (uuid)Obligatoire

The workspace's identifier — what an asset's workspace_id names.

namestringObligatoire

Its name, as the organization wrote it.

created_atstring (date-time)Obligatoire

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

updated_atstring (date-time)Obligatoire

When anything about it last changed (RFC 3339).

WritablePublicationAccess

Who a publication is for, as a request sets it: public — anybody the channel lets in; authenticated — anybody who signed in to the channel, or gave its password.

It is the publication's own level, not what a visitor gets: on a channel that asks every visitor to sign in, a public publication is still behind that sign-in. restricted, paid and on_request are read and not set by a request — each stands for a right or an offer set from Videas, and is accepted here once those can be set through this API. Sending one is a 400.

Valeurs : public, authenticated