Retrieve a chapter

get /videos/{videoId}/chapters/{language}

Retrieve a chapter for by video id in a specific language.

HTTP basic 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() {
    client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
    // if you rather like to use the sandbox environment:
    // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
        
    videoId := "vi4k0jvEUuaTdRAEjQ4Jfrgz" // string | The unique identifier for the video you want to show a chapter for.
    language := "en" // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.

    
    res, err := client.Chapters.Get(videoId, language)

    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `Chapters.Get``: %v\
", err)
    }
    // response from `Get`: Chapter
    fmt.Fprintf(os.Stdout, "Response from `Chapters.Get`: %v\
", res)
}
// 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

import apivideo
from apivideo.api import chapters_api
from apivideo.model.not_found import NotFound
from apivideo.model.chapter import Chapter
from pprint import pprint

# Enter a context with an instance of the API client
with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
    # Create an instance of the API class
    api_instance = chapters_api.ChaptersApi(api_client)
    video_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | The unique identifier for the video you want to show a chapter for.
    language = "en" # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.

    # example passing only required values which don't have defaults set
    try:
        # Show a chapter
        api_response = api_instance.get(video_id, language)
        pprint(api_response)
    except apivideo.ApiException as e:
        print("Exception when calling ChaptersApi->get: %s\n" % e)
// 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

import video.api.client.ApiVideoClient;
import video.api.client.api.ApiException;
import video.api.client.api.models.*;
import video.api.client.api.clients.ChaptersApi;
import java.util.*;

public class Example {
  public static void main(String[] args) {
    ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
    // if you rather like to use the sandbox environment:
    // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

    ChaptersApi apiInstance = client.chapters();
    
    String videoId = "vi4k0jvEUuaTdRAEjQ4Jfrgz"; // The unique identifier for the video you want to show a chapter for.
    String language = "en"; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.

    try {
      Chapter result = apiInstance.get(videoId, language);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ChaptersApi#get");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getMessage());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
// 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);
            }
        }
    }
}
<?php
// First install the api client: "composer require api-video/php-api-client"
// Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/ChaptersApi.md#delete

require __DIR__ . '/vendor/autoload.php';

$videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want to delete a chapter from.
$language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.

$client->chapters()->delete($videoId, $language); 
// 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

Examples Schema

Success

{
  "language": "fr",
  "src": "https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/chapters/fr.vtt",
  "uri": "/videos/vi3N6cDinStg3oBbN79GklWS/chapters/fr"
}

Not Found

{
  "name": "string",
  "status": 123,
  "title": "string",
  "type": "string"
}

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

post /videos/{videoId}/chapters/{language}

Upload a VTT file to add chapters to your video. Chapters help break the video into sections. Read our tutorial for more details.

HTTP basic 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() {
    client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
    // if you rather like to use the sandbox environment:
    // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
        
    videoId := "vi4k0jvEUuaTdRAEjQ4Jfrgz" // string | The unique identifier for the video you want to upload a chapter for.
    language := "en" // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
    file := os.NewFile(1234, "some_file") // *os.File | The VTT file describing the chapters you want to upload.

    
    res, err := client.Chapters.UploadFile(videoId, language, file)

    // you can also use a Reader instead of a File:
    // client.Chapters.Upload(videoId, language, fileName, fileReader)

    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `Chapters.Upload``: %v\
", err)
    }
    // response from `Upload`: Chapter
    fmt.Fprintf(os.Stdout, "Response from `Chapters.Upload`: %v\
", res)
}
// 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

import apivideo
from apivideo.api import chapters_api
from apivideo.model.bad_request import BadRequest
from apivideo.model.not_found import NotFound
from apivideo.model.chapter import Chapter
from pprint import pprint

# Enter a context with an instance of the API client
with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
    # Create an instance of the API class
    api_instance = chapters_api.ChaptersApi(api_client)
    video_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | The unique identifier for the video you want to upload a chapter for.
    language = "en" # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
    file = open('/path/to/file', 'rb') # file_type | The VTT file describing the chapters you want to upload.

    # example passing only required values which don't have defaults set
    try:
        # Upload a chapter
        api_response = api_instance.upload(video_id, language, file)
        pprint(api_response)
    except apivideo.ApiException as e:
        print("Exception when calling ChaptersApi->upload: %s\n" % e)
// 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

import video.api.client.ApiVideoClient;
import video.api.client.api.ApiException;
import video.api.client.api.models.*;
import video.api.client.api.clients.ChaptersApi;
import java.util.*;

public class Example {
  public static void main(String[] args) {
    ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
    // if you rather like to use the sandbox environment:
    // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

    ChaptersApi apiInstance = client.chapters();
    
    String videoId = "vi4k0jvEUuaTdRAEjQ4Jfrgz"; // The unique identifier for the video you want to upload a chapter for.
    String language = "en"; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
    File file = new File("/path/to/file"); // The VTT file describing the chapters you want to upload.

    try {
      Chapter result = apiInstance.upload(videoId, language, file);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ChaptersApi#upload");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getMessage());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
// 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);
            }
        }
    }
}
<?php
// First install the api client: "composer require api-video/php-api-client"
// Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/ChaptersApi.md#upload

require __DIR__ . '/vendor/autoload.php';

$videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want to upload a chapter for.
$language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.
$file = new SplFileObject(__DIR__ . '/en.vtt'); // The VTT file describing the chapters you want to upload.

$chapter = $client->chapters()->upload($videoId, $language, $file); 
// 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

Examples Schema

Success

{
  "language": "fr",
  "src": "https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/chapters/fr.vtt",
  "uri": "/videos/vi3N6cDinStg3oBbN79GklWS/chapters/fr"
}

Bad Request

{
  "name": "string",
  "problems": [
    {
      "name": "string",
      "status": 123,
      "title": "string",
      "type": "string"
    }
  ],
  "status": 123,
  "title": "string",
  "type": "string"
}

Not Found

{
  "name": "string",
  "status": 123,
  "title": "string",
  "type": "string"
}

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 /videos/{videoId}/chapters/{language}

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.

HTTP basic 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() {
    client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
    // if you rather like to use the sandbox environment:
    // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
        
    videoId := "vi4k0jvEUuaTdRAEjQ4Jfrgz" // string | The unique identifier for the video you want to delete a chapter from.
    language := "en" // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.

    
    err := client.Chapters.Delete(videoId, language)

    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `Chapters.Delete``: %v\
", err)
    }
}
// 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

import apivideo
from apivideo.api import chapters_api
from apivideo.model.not_found import NotFound
from pprint import pprint

# Enter a context with an instance of the API client
with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
    # Create an instance of the API class
    api_instance = chapters_api.ChaptersApi(api_client)
    video_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | The unique identifier for the video you want to delete a chapter from.
    language = "en" # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.

    # example passing only required values which don't have defaults set
    try:
        # Delete a chapter
        api_instance.delete(video_id, language)
    except apivideo.ApiException as e:
        print("Exception when calling ChaptersApi->delete: %s\n" % e)
// 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

import video.api.client.ApiVideoClient;
import video.api.client.api.ApiException;
import video.api.client.api.models.*;
import video.api.client.api.clients.ChaptersApi;
import java.util.*;

public class Example {
  public static void main(String[] args) {
    ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
    // if you rather like to use the sandbox environment:
    // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

    ChaptersApi apiInstance = client.chapters();
    
    String videoId = "vi4k0jvEUuaTdRAEjQ4Jfrgz"; // The unique identifier for the video you want to delete a chapter from.
    String language = "en"; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.

    try {
      apiInstance.delete(videoId, language);
    } catch (ApiException e) {
      System.err.println("Exception when calling ChaptersApi#delete");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getMessage());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
// 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);
            }
        }
    }
}
<?php
// First install the api client: "composer require api-video/php-api-client"
// Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/ChaptersApi.md#delete

require __DIR__ . '/vendor/autoload.php';

$videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want to delete a chapter from.
$language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.

$client->chapters()->delete($videoId, $language); 
// 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

Examples Schema

No Content

Empty response

Not Found

{
  "name": "string",
  "status": 123,
  "title": "string",
  "type": "string"
}

No schema

name

string

status

int

title

string

type

string

List video chapters

get /videos/{videoId}/chapters

Retrieve a list of all chapters for by video id.

HTTP basic 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() {
    client := apivideosdk.ClientBuilder("YOUR_API_KEY").Build()
    // if you rather like to use the sandbox environment:
    // client := apivideosdk.SandboxClientBuilder("YOUR_SANDBOX_API_KEY").Build()
        
    videoId := "vi4k0jvEUuaTdRAEjQ4Jfrgz" // string | The unique identifier for the video you want to show a chapter for.
    language := "en" // string | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.

    
    res, err := client.Chapters.Get(videoId, language)

    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `Chapters.Get``: %v\
", err)
    }
    // response from `Get`: Chapter
    fmt.Fprintf(os.Stdout, "Response from `Chapters.Get`: %v\
", res)
}
// 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

import apivideo
from apivideo.api import chapters_api
from apivideo.model.not_found import NotFound
from apivideo.model.chapter import Chapter
from pprint import pprint

# Enter a context with an instance of the API client
with apivideo.AuthenticatedApiClient(__API_KEY__) as api_client:
    # Create an instance of the API class
    api_instance = chapters_api.ChaptersApi(api_client)
    video_id = "vi4k0jvEUuaTdRAEjQ4Jfrgz" # str | The unique identifier for the video you want to show a chapter for.
    language = "en" # str | A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.

    # example passing only required values which don't have defaults set
    try:
        # Show a chapter
        api_response = api_instance.get(video_id, language)
        pprint(api_response)
    except apivideo.ApiException as e:
        print("Exception when calling ChaptersApi->get: %s\n" % e)
// 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

import video.api.client.ApiVideoClient;
import video.api.client.api.ApiException;
import video.api.client.api.models.*;
import video.api.client.api.clients.ChaptersApi;
import java.util.*;

public class Example {
  public static void main(String[] args) {
    ApiVideoClient client = new ApiVideoClient("YOUR_API_KEY");
    // if you rather like to use the sandbox environment:
    // ApiVideoClient client = new ApiVideoClient("YOUR_SANDBOX_API_KEY", ApiVideoClient.Environment.SANDBOX);

    ChaptersApi apiInstance = client.chapters();
    
    String videoId = "vi4k0jvEUuaTdRAEjQ4Jfrgz"; // The unique identifier for the video you want to show a chapter for.
    String language = "en"; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation.

    try {
      Chapter result = apiInstance.get(videoId, language);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ChaptersApi#get");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getMessage());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
// 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);
            }
        }
    }
}
<?php
// First install the api client: "composer require api-video/php-api-client"
// Documentation: https://github.com/apivideo/api.video-php-client/blob/main/docs/Api/ChaptersApi.md#list

require __DIR__ . '/vendor/autoload.php';

$videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg'; // The unique identifier for the video you want to retrieve a list of chapters for.

$captions = $client->chapters()->list($videoId, array(
    '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: 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

Examples Schema

Success

{
  "data": [
    {
      "language": "fr",
      "src": "https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/chapters/fr.vtt",
      "uri": "/videos/vi3N6cDinStg3oBbN79GklWS/chapters/fr"
    },
    {
      "language": "en",
      "src": "https://cdn.api.video/vod/vi3N6cDinStg3oBbN79GklWS/chapters/en.vtt",
      "uri": "/videos/vi3N6cDinStg3oBbN79GklWS/chapters/en"
    }
  ],
  "pagination": {
    "currentPage": 1,
    "currentPageItems": 2,
    "itemsTotal": 2,
    "links": [
      {
        "rel": "self",
        "uri": "/videos/vi3N6cDinStg3oBbN79GklWS/chapters?currentPage=1&pageSize=25"
      },
      {
        "rel": "first",
        "uri": "/videos/vi3N6cDinStg3oBbN79GklWS/chapters?currentPage=1&pageSize=25"
      },
      {
        "rel": "last",
        "uri": "/videos/vi3N6cDinStg3oBbN79GklWS/chapters?currentPage=1&pageSize=25"
      }
    ],
    "pageSize": 25,
    "pagesTotal": 1
  }
}

Not Found

{
  "name": "string",
  "status": 123,
  "title": "string",
  "type": "string"
}

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?