Chapters
Download SpecRetrieve a chapter
Retrieve a chapter for by video id in a specific language.
apiKey
videoId
string
required
The unique identifier for the video you want to show a chapter for.
- Example
- "vi4k0jvEUuaTdRAEjQ4Jfrgz"
language
string
required
A valid BCP 47 language representation.
- Example
- "en"
Request
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/ChaptersApi.md#get
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main()
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/ChaptersApi.md#get
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want to show a chapter for.
const language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
const chapter = await client.chapters.get(videoId, language);
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/ChaptersApi.md#get
# Enter a context with an instance of the API client
# Create an instance of the API class
=
= # str | The unique identifier for the video you want to show a chapter for.
= # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
# example passing only required values which don't have defaults set
# Show a chapter
=
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/ChaptersApi.md#get
;
;
;
;
;
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/ChaptersApi.md#get
using System.Diagnostics;
using ApiVideo.Client;
namespace Example
{
public class getExample
{
public static void Main()
{
var basePath = ApiVideoClient.Client.Environment.SANDBOX;
var apiKey = "YOUR_API_KEY";
var apiInstance = new ApiVideoClient(apiKey,basePath);
var videoId = vi4k0jvEUuaTdRAEjQ4Jfrgz; // string | The unique identifier for the video you want to show a chapter for.
var language = en; // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
var apiChaptersInstance = apiInstance.Chapters();
try
{
// Show a chapter
Chapter result = apiChaptersInstance.get(videoId, language);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ChaptersApi.get: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
// First install the api client: https://github.com/apivideo/api.video-ios-client#getting-started
// Documentation: https://github.com/apivideo/api.video-ios-client/blob/main/docs/ChaptersAPI.md#get
Response
Success
Not Found
language
string
src
string
The link to your VTT file, which contains your chapters information for the video.
- Example
- "https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/chapters/fr.vtt"
uri
string
name
string
status
int
title
string
type
string
Upload a chapter
Upload a VTT file to add chapters to your video. Chapters help break the video into sections. Read our tutorial for more details.
apiKey
videoId
string
required
The unique identifier for the video you want to upload a chapter for.
- Example
- "vi4k0jvEUuaTdRAEjQ4Jfrgz"
language
string
required
A valid BCP 47 language representation.
- Example
- "en"
file
string
binary
required
The VTT file describing the chapters you want to upload.
Request
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/ChaptersApi.md#upload
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main()
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/ChaptersApi.md#upload
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want to upload a chapter for.
const language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
const file = './en.vtt'; // The VTT file describing the chapters you want to upload.
const chapter = await client.chapters.upload(videoId, language, file);
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/ChaptersApi.md#upload
# Enter a context with an instance of the API client
# Create an instance of the API class
=
= # str | The unique identifier for the video you want to upload a chapter for.
= # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
= # file_type | The VTT file describing the chapters you want to upload.
# example passing only required values which don't have defaults set
# Upload a chapter
=
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/ChaptersApi.md#upload
;
;
;
;
;
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/ChaptersApi.md#upload
using System.Diagnostics;
using ApiVideo.Client;
namespace Example
{
public class uploadExample
{
public static void Main()
{
var basePath = ApiVideoClient.Client.Environment.SANDBOX;
var apiKey = "YOUR_API_KEY";
var apiInstance = new ApiVideoClient(apiKey,basePath);
var videoId = vi4k0jvEUuaTdRAEjQ4Jfrgz; // string | The unique identifier for the video you want to upload a chapter for.
var language = en; // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
var file = BINARY_DATA_HERE; // System.IO.Stream | The VTT file describing the chapters you want to upload.
var apiChaptersInstance = apiInstance.Chapters();
try
{
// Upload a chapter
Chapter result = apiChaptersInstance.upload(videoId, language, file);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ChaptersApi.upload: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
// First install the api client: https://github.com/apivideo/api.video-ios-client#getting-started
// Documentation: https://github.com/apivideo/api.video-ios-client/blob/main/docs/ChaptersAPI.md#upload
Response
Success
Bad Request
Not Found
language
string
src
string
The link to your VTT file, which contains your chapters information for the video.
- Example
- "https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/chapters/fr.vtt"
uri
string
name
string
The name of the parameter that caused the error.
problems
array[object (BadRequest)]
Returns any additional problems in the request in an array of objects.
BadRequest
object (BadRequest)
name
string
The name of the parameter that caused the error.
status
int
The HTTP status code.
title
string
A description of the error that occurred.
type
string
A link to the error documentation.
status
int
The HTTP status code.
title
string
A description of the error that occurred.
type
string
A link to the error documentation.
name
string
status
int
title
string
type
string
Delete a chapter
Delete a chapter in a specific language by providing the video ID for the video you want to delete the chapter from and the language the chapter is in.
apiKey
videoId
string
required
The unique identifier for the video you want to delete a chapter from.
- Example
- "vi4k0jvEUuaTdRAEjQ4Jfrgz"
language
string
required
A valid BCP 47 language representation.
- Example
- "en"
Request
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/ChaptersApi.md#delete
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main()
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/ChaptersApi.md#delete
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want to delete a chapter from.
const language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
await client.chapters.delete(videoId, language);
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/ChaptersApi.md#delete
# Enter a context with an instance of the API client
# Create an instance of the API class
=
= # str | The unique identifier for the video you want to delete a chapter from.
= # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
# example passing only required values which don't have defaults set
# Delete a chapter
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/ChaptersApi.md#delete
;
;
;
;
;
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/ChaptersApi.md#delete
using System.Diagnostics;
using ApiVideo.Client;
namespace Example
{
public class deleteExample
{
public static void Main()
{
var basePath = ApiVideoClient.Client.Environment.SANDBOX;
var apiKey = "YOUR_API_KEY";
var apiInstance = new ApiVideoClient(apiKey,basePath);
var videoId = vi4k0jvEUuaTdRAEjQ4Jfrgz; // string | The unique identifier for the video you want to delete a chapter from.
var language = en; // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
var apiChaptersInstance = apiInstance.Chapters();
try
{
// Delete a chapter
apiChaptersInstance.delete(videoId, language);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ChaptersApi.delete: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
// First install the api client: https://github.com/apivideo/api.video-ios-client#getting-started
// Documentation: https://github.com/apivideo/api.video-ios-client/blob/main/docs/ChaptersAPI.md#delete
Response
No Content
Empty response
Not Found
No schema
name
string
status
int
title
string
type
string
apiKey
videoId
string
required
The unique identifier for the video you want to retrieve a list of chapters for.
- Example
- "vi4k0jvEUuaTdRAEjQ4Jfrgz"
currentPage
int
Choose the number of search results to return per page. Minimum value: 1
- Default
- 1
- Example
- 2
pageSize
int
Results per page. Allowed values 1-100, default is 25.
- Default
- 25
- Example
- 30
Request
// First install the go client with "go get github.com/apivideo/api.video-go-client"
// Documentation: https://github.com/apivideo/api.video-go-client/blob/main/docs/ChaptersApi.md#list
package main
import (
"context"
"fmt"
"os"
apivideosdk "github.com/apivideo/api.video-go-client"
)
func main()
// First install the "@api.video/nodejs-client" npm package
// Documentation: https://github.com/apivideo/api.video-nodejs-client/blob/main/doc/api/ChaptersApi.md#list
const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" });
const captions = await client.chapters.list({
videoId 'vi4k0jvEUuaTdRAEjQ4Prklg', // The unique identifier for the video you want to retrieve a list of chapters for.
currentPage: 2, // Choose the number of search results to return per page. Minimum value: 1
pageSize: 30, // Results per page. Allowed values 1-100, default is 25.
);
# First install the api client with "pip install api.video"
# Documentation: https://github.com/apivideo/api.video-python-client/blob/main/docs/ChaptersApi.md#list
# Enter a context with an instance of the API client
# Create an instance of the API class
=
= # str | The unique identifier for the video you want to show a chapter for.
= # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
# example passing only required values which don't have defaults set
# Show a chapter
=
// First add the "video.api:java-api-client" maven dependency to your project
// Documentation: https://github.com/apivideo/api.video-java-client/blob/main/docs/ChaptersApi.md#list
;
;
;
;
;
// First add the "ApiVideo" NuGet package to your project
// Documentation: https://github.com/apivideo/api.video-csharp-client/blob/main/docs/ChaptersApi.md#list
using System.Diagnostics;
using ApiVideo.Client;
namespace Example
{
public class getExample
{
public static void Main()
{
var basePath = ApiVideoClient.Client.Environment.SANDBOX;
var apiKey = "YOUR_API_KEY";
var apiInstance = new ApiVideoClient(apiKey,basePath);
var videoId = vi4k0jvEUuaTdRAEjQ4Jfrgz; // string | The unique identifier for the video you want to show a chapter for.
var language = en; // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
var apiChaptersInstance = apiInstance.Chapters();
try
{
// Show a chapter
Chapter result = apiChaptersInstance.get(videoId, language);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ChaptersApi.get: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
// First install the api client: https://github.com/apivideo/api.video-ios-client#getting-started
// Documentation: https://github.com/apivideo/api.video-ios-client/blob/main/docs/ChaptersAPI.md#list
Response
Success
Not Found
data
array[object (Chapter)]
required
Chapter
object (Chapter)
language
string
src
string
The link to your VTT file, which contains your chapters information for the video.
- Example
- "https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/chapters/fr.vtt"
uri
string
pagination
object (pagination)
required
- Example
- { "currentPage": 3, "currentPageItems": 20, "itemsTotal": 123, "links": { "first": { "rel": "first", "uri": "/videos/search?currentPage=1&pageSize=20" }, "last": { "rel": "last", "uri": "/videos/search?currentPage=6&pageSize=20" }, "next": { "rel": "next", "uri": "/videos/search?currentPage=4&pageSize=20" }, "previous": { "rel": "previous", "uri": "/videos/search?currentPage=2&pageSize=20" } }, "pageSize": 20, "pagesTotal": 7 }
currentPage
int
The current page index.
currentPageItems
int
The number of items on the current page.
itemsTotal
int
Total number of items that exist.
links
array[object (PaginationLink)]
required
PaginationLink
object (PaginationLink)
rel
string
uri
string
uri
pageSize
int
Maximum number of item per page.
pagesTotal
int
Number of items listed in the current page.
name
string
status
int
title
string
type
string
Was this page helpful?