REST APIΒΆ

The REST API of the captioning module is enabled by performing the VHost.xml edit step in the Installation. chapter.

It is highly recommended to configure <AuthenticationMethod> to something other than none if the server is exposed.

The REST API comes with an OpenAPI v3 specification in yaml format that you can directly use for client code generation as well as import into tools such as Postman. Below you can find a basic example curl call that you can try out:

Click here to download the OpenAPI v3 specification

curl --location --request POST "http://localhost:1935/captions/v1/applications/live/streams/myStream/caption"
\ --header "Content-Type: application/json" --data-raw "{
\"captions\": [
    {
        \"textData\": \"Hello World, this is the captioning module\",
        \"language\": \"en\"
    }
]
\}"