Media Chapter
Add Media Chapter in a Specific Language
A chapter is stored per language. For a given media_id and lan, only one chapter resource exists.
POSThttps://api.aiozstream.network/api/media/:media_id/chapters/:lan
Parameters
media_id* The unique identifier of the media
lan* The chapter's language accepts both primary language tags (e.g. en, fr) and language-region tags (e.g. en-US, fr-CA) in [BCP 47] format.
Headers
Authorization Bearer your_access_token_here
or
stream-public-key your_public_key_here
stream-secret-key your_secret_key_here
Body
file* Chapter file (allowed: .vtt)
Response
201: Created
curl --location 'https://api.aiozstream.network/api/media/media_id/chapters/en' \
--header 'accept: application/json' \
--header 'Authorization: Bearer your_access_token_here' \
# --header 'stream-public-key: your_public_key_here' \
# --header 'stream-secret-key: your_secret_key_here' \
--form 'file=@"/path/to/file.vtt"'Get Media Chapter List
This endpoint returns the list of chapter resources available for a media. Each chapter is identified by its language (lan).
GEThttps://api.aiozstream.network/api/media/:media_id/chapters
Parameters
media_id* The unique identifier of the media
Query
offset The number of records to skip before starting to return the results (default: 0)
limit The maximum number of records to return in a query (max: 100)
Headers
Authorization Bearer your_access_token_here
or
stream-public-key your_public_key_here
stream-secret-key your_secret_key_here
Response
200: OK
curl --location 'https://api.aiozstream.network/api/media/media_id/chapters?offset=0&limit=10' \
--header 'accept: application/json' \
--header 'Authorization: Bearer your_access_token_here'
# --header 'stream-public-key: your_public_key_here' \
# --header 'stream-secret-key: your_secret_key_here' Remove Media Chapter
This deletes the chapter for a specific language of the media.
DELETEhttps://api.aiozstream.network/api/media/:media_id/chapters/:lan
Parameters
media_id* The unique identifier of the media
lan* The chapter's language accepts both primary language tags (e.g. en, fr) and language-region tags (e.g. en-US, fr-CA) in [BCP 47] format.
Headers
Authorization Bearer your_access_token_here
or
stream-public-key your_public_key_here
stream-secret-key your_secret_key_here
Response
200: OK
curl --location --request DELETE 'https://api.aiozstream.network/api/media/media_id/chapters/en' \
--header 'accept: application/json' \
--header 'Authorization: Bearer your_access_token_here'
# --header 'stream-public-key: your_public_key_here' \
# --header 'stream-secret-key: your_secret_key_here'