"description":"Retrieve valid JWT access and refresh tokens to use for accessing the API. Login either by username/password or Auth0 token",
"produces":[
"application/json"
],
"summary":"Retrieve an access and a refresh token",
"operationId":"jwt-login",
"parameters":[
{
"description":"Login data",
"name":"data",
"in":"body",
"required":true,
"schema":{
"$ref":"#/definitions/api.Login"
}
}
],
"responses":{
"200":{
"description":"OK",
"schema":{
"$ref":"#/definitions/api.JWT"
}
},
"400":{
"description":"Bad Request",
"schema":{
"$ref":"#/definitions/api.Error"
}
},
"403":{
"description":"Forbidden",
"schema":{
"$ref":"#/definitions/api.Error"
}
},
"500":{
"description":"Internal Server Error",
"schema":{
"$ref":"#/definitions/api.Error"
}
}
}
}
},
"/api/login/refresh":{
"get":{
"security":[
{
"ApiRefreshKeyAuth":[]
}
],
"description":"Retrieve a new access token by providing the refresh token",
"produces":[
"application/json"
],
"summary":"Retrieve a new access token",
"operationId":"jwt-refresh",
"responses":{
"200":{
"description":"OK",
"schema":{
"$ref":"#/definitions/api.JWTRefresh"
}
},
"500":{
"description":"Internal Server Error",
"schema":{
"$ref":"#/definitions/api.Error"
}
}
}
}
},
"/api/swagger":{
"get":{
"description":"Swagger UI for this API",
"produces":[
"text/html"
],
"summary":"Swagger UI for this API",
"operationId":"swagger",
"responses":{
"200":{
"description":"OK",
"schema":{
"type":"string"
}
}
}
}
},
"/api/v3/config":{
"get":{
"security":[
{
"ApiKeyAuth":[]
}
],
"description":"Retrieve the currently active Restreamer configuration",
"produces":[
"application/json"
],
"summary":"Retrieve the currently active Restreamer configuration",
"operationId":"config-3-get",
"responses":{
"200":{
"description":"OK",
"schema":{
"$ref":"#/definitions/api.Config"
}
}
}
},
"put":{
"security":[
{
"ApiKeyAuth":[]
}
],
"description":"Update the current Restreamer configuration by providing a complete or partial configuration. Fields that are not provided will not be changed.",
"consumes":[
"application/json"
],
"produces":[
"application/json"
],
"summary":"Update the current Restreamer configuration",
"operationId":"config-3-set",
"parameters":[
{
"description":"Restreamer configuration",
"name":"config",
"in":"body",
"required":true,
"schema":{
"$ref":"#/definitions/api.SetConfig"
}
}
],
"responses":{
"200":{
"description":"OK",
"schema":{
"type":"string"
}
},
"400":{
"description":"Bad Request",
"schema":{
"$ref":"#/definitions/api.Error"
}
},
"409":{
"description":"Conflict",
"schema":{
"$ref":"#/definitions/api.ConfigError"
}
}
}
}
},
"/api/v3/config/reload":{
"get":{
"security":[
{
"ApiKeyAuth":[]
}
],
"description":"Reload the currently active configuration. This will trigger a restart of the Restreamer.",
"produces":[
"text/plain"
],
"summary":"Reload the currently active configuration",
"operationId":"config-3-reload",
"responses":{
"200":{
"description":"OK",
"schema":{
"type":"string"
}
}
}
}
},
"/api/v3/fs/disk/":{
"get":{
"security":[
{
"ApiKeyAuth":[]
}
],
"description":"List all files on the filesystem. The listing can be ordered by name, size, or date of last modification in ascending or descending order.",
"produces":[
"application/json"
],
"summary":"List all files on the filesystem",
"operationId":"diskfs-3-list-files",
"parameters":[
{
"type":"string",
"description":"glob pattern for file names",
"name":"glob",
"in":"query"
},
{
"type":"string",
"description":"none, name, size, lastmod",
"name":"sort",
"in":"query"
},
{
"type":"string",
"description":"asc, desc",
"name":"order",
"in":"query"
}
],
"responses":{
"200":{
"description":"OK",
"schema":{
"type":"array",
"items":{
"$ref":"#/definitions/api.FileInfo"
}
}
}
}
}
},
"/api/v3/fs/disk/{path}":{
"get":{
"security":[
{
"ApiKeyAuth":[]
}
],
"description":"Fetch a file from the filesystem. The contents of that file are returned.",
"produces":[
"application/data",
"application/json"
],
"summary":"Fetch a file from the filesystem",
"operationId":"diskfs-3-get-file",
"parameters":[
{
"type":"string",
"description":"Path to file",
"name":"path",
"in":"path",
"required":true
}
],
"responses":{
"200":{
"description":"OK",
"schema":{
"type":"file"
}
},
"301":{
"description":"Moved Permanently",
"schema":{
"type":"string"
}
},
"404":{
"description":"Not Found",
"schema":{
"$ref":"#/definitions/api.Error"
}
}
}
},
"put":{
"security":[
{
"ApiKeyAuth":[]
}
],
"description":"Writes or overwrites a file on the filesystem",
"consumes":[
"application/data"
],
"produces":[
"text/plain",
"application/json"
],
"summary":"Add a file to the filesystem",
"operationId":"diskfs-3-put-file",
"parameters":[
{
"type":"string",
"description":"Path to file",
"name":"path",
"in":"path",
"required":true
},
{
"description":"File data",
"name":"data",
"in":"body",
"required":true,
"schema":{
"type":"array",
"items":{
"type":"integer"
}
}
}
],
"responses":{
"201":{
"description":"Created",
"schema":{
"type":"string"
}
},
"204":{
"description":"No Content",
"schema":{
"type":"string"
}
},
"507":{
"description":"Insufficient Storage",
"schema":{
"$ref":"#/definitions/api.Error"
}
}
}
},
"delete":{
"security":[
{
"ApiKeyAuth":[]
}
],
"description":"Remove a file from the filesystem",
"produces":[
"text/plain"
],
"summary":"Remove a file from the filesystem",
"operationId":"diskfs-3-delete-file",
"parameters":[
{
"type":"string",
"description":"Path to file",
"name":"path",
"in":"path",
"required":true
}
],
"responses":{
"200":{
"description":"OK",
"schema":{
"type":"string"
}
},
"404":{
"description":"Not Found",
"schema":{
"$ref":"#/definitions/api.Error"
}
}
}
}
},
"/api/v3/fs/mem/":{
"get":{
"security":[
{
"ApiKeyAuth":[]
}
],
"description":"List all files on the memory filesystem. The listing can be ordered by name, size, or date of last modification in ascending or descending order.",
"produces":[
"application/json"
],
"summary":"List all files on the memory filesystem",
"operationId":"memfs-3-list-files",
"parameters":[
{
"type":"string",
"description":"glob pattern for file names",
"name":"glob",
"in":"query"
},
{
"type":"string",
"description":"none, name, size, lastmod",
"name":"sort",
"in":"query"
},
{
"type":"string",
"description":"asc, desc",
"name":"order",
"in":"query"
}
],
"responses":{
"200":{
"description":"OK",
"schema":{
"type":"array",
"items":{
"$ref":"#/definitions/api.FileInfo"
}
}
}
}
}
},
"/api/v3/fs/mem/{path}":{
"get":{
"security":[
{
"ApiKeyAuth":[]
}
],
"description":"Fetch a file from the memory filesystem",
"produces":[
"application/data",
"application/json"
],
"summary":"Fetch a file from the memory filesystem",
"operationId":"memfs-3-get-file-api",
"parameters":[
{
"type":"string",
"description":"Path to file",
"name":"path",
"in":"path",
"required":true
}
],
"responses":{
"200":{
"description":"OK",
"schema":{
"type":"file"
}
},
"301":{
"description":"Moved Permanently",
"schema":{
"type":"string"
}
},
"404":{
"description":"Not Found",
"schema":{
"$ref":"#/definitions/api.Error"
}
}
}
},
"put":{
"security":[
{
"ApiKeyAuth":[]
}
],
"description":"Writes or overwrites a file on the memory filesystem",
"consumes":[
"application/data"
],
"produces":[
"text/plain",
"application/json"
],
"summary":"Add a file to the memory filesystem",
"operationId":"memfs-3-put-file-api",
"parameters":[
{
"type":"string",
"description":"Path to file",
"name":"path",
"in":"path",
"required":true
},
{
"description":"File data",
"name":"data",
"in":"body",
"required":true,
"schema":{
"type":"array",
"items":{
"type":"integer"
}
}
}
],
"responses":{
"201":{
"description":"Created",
"schema":{
"type":"string"
}
},
"204":{
"description":"No Content",
"schema":{
"type":"string"
}
},
"507":{
"description":"Insufficient Storage",
"schema":{
"$ref":"#/definitions/api.Error"
}
}
}
},
"delete":{
"security":[
{
"ApiKeyAuth":[]
}
],
"description":"Remove a file from the memory filesystem",
"produces":[
"text/plain"
],
"summary":"Remove a file from the memory filesystem",
"operationId":"memfs-delete-file-api",
"parameters":[
{
"type":"string",
"description":"Path to file",
"name":"path",
"in":"path",
"required":true
}
],
"responses":{
"200":{
"description":"OK",
"schema":{
"type":"string"
}
},
"404":{
"description":"Not Found",
"schema":{
"$ref":"#/definitions/api.Error"
}
}
}
},
"patch":{
"security":[
{
"ApiKeyAuth":[]
}
],
"description":"Create a link to a file in the memory filesystem. The file linked to has to exist.",
"consumes":[
"application/data"
],
"produces":[
"text/plain",
"application/json"
],
"summary":"Create a link to a file in the memory filesystem",
"operationId":"memfs-3-patch",
"parameters":[
{
"type":"string",
"description":"Path to file",
"name":"path",
"in":"path",
"required":true
},
{
"description":"Path to the file to link to",
"name":"url",
"in":"body",
"required":true,
"schema":{
"type":"string"
}
}
],
"responses":{
"201":{
"description":"Created",
"schema":{
"type":"string"
}
},
"400":{
"description":"Bad Request",
"schema":{
"$ref":"#/definitions/api.Error"
}
}
}
}
},
"/api/v3/log":{
"get":{
"security":[
{
"ApiKeyAuth":[]
}
],
"description":"Get the last log lines of the Restreamer application",
"produces":[
"application/json"
],
"summary":"Application log",
"operationId":"log-3",
"parameters":[
{
"type":"string",
"description":"Format of the list of log events (*console, raw)",
"name":"format",
"in":"query"
}
],
"responses":{
"200":{
"description":"application log",
"schema":{
"type":"array",
"items":{
"type":"string"
}
}
}
}
}
},
"/api/v3/metadata/{key}":{
"get":{
"security":[
{
"ApiKeyAuth":[]
}
],
"description":"Retrieve the previously stored JSON metadata under the given key. If the key is empty, all metadata will be returned.",
"description":"Add arbitrary JSON metadata under the given key. If the key exists, all already stored metadata with this key will be overwritten. If the key doesn't exist, it will be created.",
"produces":[
"application/json"
],
"summary":"Add JSON metadata under the given key",
"description":"List all known processes. Use the query parameter to filter the listed processes.",
"produces":[
"application/json"
],
"summary":"List all known processes",
"operationId":"restream-3-get-all",
"parameters":[
{
"type":"string",
"description":"Comma separated list of fields (config, state, report, metadata) that will be part of the output. If empty, all fields will be part of the output",
"name":"filter",
"in":"query"
},
{
"type":"string",
"description":"Return only these process that have this reference value. Overrides a list of IDs. If empty, the reference will be ignored",
"name":"reference",
"in":"query"
},
{
"type":"string",
"description":"Comma separated list of process ids to list",
"name":"id",
"in":"query"
}
],
"responses":{
"200":{
"description":"OK",
"schema":{
"type":"array",
"items":{
"$ref":"#/definitions/api.Process"
}
}
}
}
},
"post":{
"security":[
{
"ApiKeyAuth":[]
}
],
"description":"Add a new FFmpeg process",
"consumes":[
"application/json"
],
"produces":[
"application/json"
],
"summary":"Add a new process",
"operationId":"restream-3-add",
"parameters":[
{
"description":"Process config",
"name":"config",
"in":"body",
"required":true,
"schema":{
"$ref":"#/definitions/api.ProcessConfig"
}
}
],
"responses":{
"200":{
"description":"OK",
"schema":{
"$ref":"#/definitions/api.ProcessConfig"
}
},
"400":{
"description":"Bad Request",
"schema":{
"$ref":"#/definitions/api.Error"
}
}
}
}
},
"/api/v3/process/{id}":{
"get":{
"security":[
{
"ApiKeyAuth":[]
}
],
"description":"List a process by its ID. Use the filter parameter to specifiy the level of detail of the output.",
"produces":[
"application/json"
],
"summary":"List a process by its ID",
"operationId":"restream-3-get",
"parameters":[
{
"type":"string",
"description":"Process ID",
"name":"id",
"in":"path",
"required":true
},
{
"type":"string",
"description":"Comma separated list of fields (config, state, report, metadata) to be part of the output. If empty, all fields will be part of the output",
"name":"filter",
"in":"query"
}
],
"responses":{
"200":{
"description":"OK",
"schema":{
"$ref":"#/definitions/api.Process"
}
},
"404":{
"description":"Not Found",
"schema":{
"$ref":"#/definitions/api.Error"
}
}
}
},
"put":{
"security":[
{
"ApiKeyAuth":[]
}
],
"description":"Replace an existing process. This is a shortcut for DELETE+POST.",
"consumes":[
"application/json"
],
"produces":[
"application/json"
],
"summary":"Replace an existing process",
"operationId":"restream-3-update",
"parameters":[
{
"type":"string",
"description":"Process ID",
"name":"id",
"in":"path",
"required":true
},
{
"description":"Process config",
"name":"config",
"in":"body",
"required":true,
"schema":{
"$ref":"#/definitions/api.ProcessConfig"
}
}
],
"responses":{
"200":{
"description":"OK",
"schema":{
"$ref":"#/definitions/api.ProcessConfig"
}
},
"400":{
"description":"Bad Request",
"schema":{
"$ref":"#/definitions/api.Error"
}
},
"404":{
"description":"Not Found",
"schema":{
"$ref":"#/definitions/api.Error"
}
}
}
},
"delete":{
"security":[
{
"ApiKeyAuth":[]
}
],
"description":"Delete a process by its ID",
"produces":[
"application/json"
],
"summary":"Delete a process by its ID",
"operationId":"restream-3-delete",
"parameters":[
{
"type":"string",
"description":"Process ID",
"name":"id",
"in":"path",
"required":true
}
],
"responses":{
"200":{
"description":"OK",
"schema":{
"type":"string"
}
},
"404":{
"description":"Not Found",
"schema":{
"$ref":"#/definitions/api.Error"
}
}
}
}
},
"/api/v3/process/{id}/command":{
"put":{
"security":[
{
"ApiKeyAuth":[]
}
],
"description":"Issue a command to a process: start, stop, reload, restart",
"consumes":[
"application/json"
],
"produces":[
"application/json"
],
"summary":"Issue a command to a process",
"operationId":"restream-3-command",
"parameters":[
{
"type":"string",
"description":"Process ID",
"name":"id",
"in":"path",
"required":true
},
{
"description":"Process command",
"name":"command",
"in":"body",
"required":true,
"schema":{
"$ref":"#/definitions/api.Command"
}
}
],
"responses":{
"200":{
"description":"OK",
"schema":{
"type":"string"
}
},
"400":{
"description":"Bad Request",
"schema":{
"$ref":"#/definitions/api.Error"
}
},
"404":{
"description":"Not Found",
"schema":{
"$ref":"#/definitions/api.Error"
}
}
}
}
},
"/api/v3/process/{id}/config":{
"get":{
"security":[
{
"ApiKeyAuth":[]
}
],
"description":"Get the configuration of a process. This is the configuration as provided by Add or Update.",
"produces":[
"application/json"
],
"summary":"Get the configuration of a process",
"operationId":"restream-3-get-config",
"parameters":[
{
"type":"string",
"description":"Process ID",
"name":"id",
"in":"path",
"required":true
}
],
"responses":{
"200":{
"description":"OK",
"schema":{
"$ref":"#/definitions/api.ProcessConfig"
}
},
"400":{
"description":"Bad Request",
"schema":{
"$ref":"#/definitions/api.Error"
}
},
"404":{
"description":"Not Found",
"schema":{
"$ref":"#/definitions/api.Error"
}
}
}
}
},
"/api/v3/process/{id}/metadata/{key}":{
"get":{
"security":[
{
"ApiKeyAuth":[]
}
],
"description":"Retrieve the previously stored JSON metadata under the given key. If the key is empty, all metadata will be returned.",
"produces":[
"application/json"
],
"summary":"Retrieve JSON metadata stored with a process under a key",
"description":"Add arbitrary JSON metadata under the given key. If the key exists, all already stored metadata with this key will be overwritten. If the key doesn't exist, it will be created.",
"produces":[
"application/json"
],
"summary":"Add JSON metadata with a process under the given key",
"operationId":"restream-3-set-process-metadata",
"parameters":[
{
"type":"string",
"description":"Process ID",
"name":"id",
"in":"path",
"required":true
},
{
"type":"string",
"description":"Key for data store",
"name":"key",
"in":"path",
"required":true
},
{
"description":"Arbitrary JSON data. The null value will remove the key and its contents",
"description":"The available space in the receiver's buffer, in bytes",
"type":"integer"
},
"avail_send_buf_bytes":{
"description":"The available space in the sender's buffer, in bytes",
"type":"integer"
},
"bandwidth_mbit":{
"description":"Estimated bandwidth of the network link, in Mbps",
"type":"number"
},
"flight_size_pkt":{
"description":"The number of packets in flight",
"type":"integer"
},
"flow_window_pkt":{
"description":"The maximum number of packets that can be \"in flight\"",
"type":"integer"
},
"max_bandwidth_mbit":{
"description":"Transmission bandwidth limit, in Mbps",
"type":"number"
},
"mss_bytes":{
"description":"Maximum Segment Size (MSS), in bytes",
"type":"integer"
},
"pkt_recv_avg_belated_time_ms":{
"description":"Accumulated difference between the current time and the time-to-play of a packet that is received late",
"type":"integer"
},
"pkt_send_period_us":{
"description":"Current minimum time interval between which consecutive packets are sent, in microseconds",
"type":"number"
},
"recv_ack_pkt":{
"description":"The total number of received ACK (Acknowledgement) control packets",
"type":"integer"
},
"recv_buf_bytes":{
"description":"Instantaneous (current) value of pktRcvBuf, expressed in bytes, including payload and all headers (IP, TCP, SRT)",
"type":"integer"
},
"recv_buf_ms":{
"description":"The timespan (msec) of acknowledged packets in the receiver's buffer",
"type":"integer"
},
"recv_buf_pkt":{
"description":"The number of acknowledged packets in receiver's buffer",
"type":"integer"
},
"recv_bytes":{
"description":"Same as pktRecv, but expressed in bytes, including payload and all the headers (IP, TCP, SRT)",
"type":"integer"
},
"recv_drop_bytes":{
"description":"Same as pktRcvDrop, but expressed in bytes, including payload and all the headers (IP, TCP, SRT)",
"type":"integer"
},
"recv_drop_pkt":{
"description":"The total number of dropped by the SRT receiver and, as a result, not delivered to the upstream application DATA packets",
"type":"integer"
},
"recv_km_pkt":{
"description":"The total number of received KM (Key Material) control packets",
"type":"integer"
},
"recv_loss__bytes":{
"description":"Same as pktRcvLoss, but expressed in bytes, including payload and all the headers (IP, TCP, SRT), bytes for the presently missing (either reordered or lost) packets' payloads are estimated based on the average packet size",
"type":"integer"
},
"recv_loss_pkt":{
"description":"The total number of SRT DATA packets detected as presently missing (either reordered or lost) at the receiver side",
"type":"integer"
},
"recv_nak_pkt":{
"description":"The total number of received NAK (Negative Acknowledgement) control packets",
"type":"integer"
},
"recv_pkt":{
"description":"The total number of received DATA packets, including retransmitted packets",
"type":"integer"
},
"recv_retran_pkts":{
"description":"The total number of retransmitted packets registered at the receiver side",
"type":"integer"
},
"recv_tsbpd_delay_ms":{
"description":"Timestamp-based Packet Delivery Delay value set on the socket via SRTO_RCVLATENCY or SRTO_LATENCY",
"type":"integer"
},
"recv_undecrypt_bytes":{
"description":"Same as pktRcvUndecrypt, but expressed in bytes, including payload and all the headers (IP, TCP, SRT)",
"type":"integer"
},
"recv_undecrypt_pkt":{
"description":"The total number of packets that failed to be decrypted at the receiver side",
"type":"integer"
},
"recv_unique_bytes":{
"description":"Same as pktRecvUnique, but expressed in bytes, including payload and all the headers (IP, TCP, SRT)",
"type":"integer"
},
"recv_unique_pkt":{
"description":"The total number of unique original, retransmitted or recovered by the packet filter DATA packets received in time, decrypted without errors and, as a result, scheduled for delivery to the upstream application by the SRT receiver.",
"type":"integer"
},
"reorder_tolerance_pkt":{
"description":"Instant value of the packet reorder tolerance",
"type":"integer"
},
"rtt_ms":{
"description":"Smoothed round-trip time (SRTT), an exponentially-weighted moving average (EWMA) of an endpoint's RTT samples, in milliseconds",
"type":"number"
},
"send_buf_bytes":{
"description":"Instantaneous (current) value of pktSndBuf, but expressed in bytes, including payload and all headers (IP, TCP, SRT)",
"type":"integer"
},
"send_buf_ms":{
"description":"The timespan (msec) of packets in the sender's buffer (unacknowledged packets)",
"type":"integer"
},
"send_buf_pkt":{
"description":"The number of packets in the sender's buffer that are already scheduled for sending or even possibly sent, but not yet acknowledged",
"type":"integer"
},
"send_drop_bytes":{
"description":"Same as pktSndDrop, but expressed in bytes, including payload and all the headers (IP, TCP, SRT)",
"type":"integer"
},
"send_drop_pkt":{
"description":"The total number of dropped by the SRT sender DATA packets that have no chance to be delivered in time",
"type":"integer"
},
"send_duration_us":{
"description":"The total accumulated time in microseconds, during which the SRT sender has some data to transmit, including packets that have been sent, but not yet acknowledged",
"type":"integer"
},
"send_km_pkt":{
"description":"The total number of sent KM (Key Material) control packets",
"type":"integer"
},
"send_loss_pkt":{
"description":"The total number of data packets considered or reported as lost at the sender side. Does not correspond to the packets detected as lost at the receiver side.",
"type":"integer"
},
"send_tsbpd_delay_ms":{
"description":"Timestamp-based Packet Delivery Delay value of the peer",
"type":"integer"
},
"sent_ack_pkt":{
"description":"The total number of sent ACK (Acknowledgement) control packets",
"type":"integer"
},
"sent_bytes":{
"description":"Same as pktSent, but expressed in bytes, including payload and all the headers (IP, TCP, SRT)",
"type":"integer"
},
"sent_nak_pkt":{
"description":"The total number of sent NAK (Negative Acknowledgement) control packets",
"type":"integer"
},
"sent_pkt":{
"description":"The total number of sent DATA packets, including retransmitted packets",
"type":"integer"
},
"sent_retrans_bytes":{
"description":"Same as pktRetrans, but expressed in bytes, including payload and all the headers (IP, TCP, SRT)",
"type":"integer"
},
"sent_retrans_pkt":{
"description":"The total number of retransmitted packets sent by the SRT sender",
"type":"integer"
},
"sent_unique__bytes":{
"description":"Same as pktSentUnique, but expressed in bytes, including payload and all the headers (IP, TCP, SRT)",
"type":"integer"
},
"sent_unique_pkt":{
"description":"The total number of unique DATA packets sent by the SRT sender",
"type":"integer"
},
"timestamp_ms":{
"description":"The time elapsed, in milliseconds, since the SRT socket has been created",