ts_kmp_api

The `ts_kmp_api` directive configures the Kaltura Media Framework's API for handling JSON requests within specified location blocks.

Syntaxts_kmp_api;
Defaultnone
Contextlocation
Argumentsany

Description

The ts_kmp_api directive is designed to enable interaction with Kaltura Media Framework components by allowing NGINX to handle API requests in a structured manner. This directive operates within location contexts, where it manages incoming HTTP requests that are typically formatted as JSON payloads. According to the source code analysis, this directive uses the defined APIs to route requests, support various HTTP methods (GET, POST, PUT, DELETE), and integrate with Kaltura’s ecosystem effectively.

When a request is received, the NGINX handler processes the request data and utilizes defined handlers to process and respond to the incoming JSON data. This allows for seamless communication between different elements of the Kaltura Media Framework, enabling features like event updates, status checks, and orchestrating media flows through JSON events. The directive supports multi-response capabilities, error handling, and can generate JSON formatted responses as required by the Kaltura protocols.

An essential aspect of this directive is its flexibility in the context, meaning it's placed within relevant location blocks to define API endpoints properly. The parsing of input and construction of output messages are both handled according to the specifications laid out in the module documentation, with a clear focus on JSON data handling, facilitating interactions with different media processing components.

Config Example

location /api {
    ts_kmp_api;
}

Ensure that the directive is placed within a valid location block.

Be aware of the expected JSON structure in requests and responses, as improper formatting can lead to errors.

For optimal performance, monitor and tune NGINX worker settings based on expected load when using this API handling.

← Back to all directives