Haivision Media Platform

Command Line API Syntax

The HMP Command Line API provides a typical line-delimited command/response interface, as shown in the following examples:

Client Command

Server Response

startRecording e3af4dd4-b358-431e-9450-e7c82f64b6df

OK|9eed71ca-d567-4a16-9d9c-26c6c5ad282e

shareRecording someuser OWN 9eed71ca-d567-4a16-9d9c-26c6c5ad282e

OK

stopRecording 9eed71ca-d567-4a16-9d9c-26c6c5ad282e

OK

undefinedCommand "Example of \"Error\""

ERROR|Command not found

Command execution is synchronous:

  1. HMP reads commands from the TCP/IP connection one at a time.

  2. When a command is received, it is executed immediately.

  3. After each command has executed, a response is sent to the client device.

Character Set and Encoding

HMP supports the Unicode character set using the UTF-8 character encoding. All commands sent to the Command Line API must be valid UTF-8.

Note

UTF-8 is a compatible superset of the basic US-ASCII character set. For more information on Unicode visit the Unicode Consortium. For more information on UTF-8, refer to IETF RFC 3629.


End-Of-Line Character

The line feed control character (code U+000A) delimits the end of commands and responses.

Note

Many programming languages use the escape sequence \n to represent a newline control character in a string. The character codes generated for this newline may differ depending on the programming language and operating system in use.