Push

/v1/vhosts/{vhost_name}/apps/{app_name}:startPush

POST http://<OME_HOST>:<API_PORT>/v1/vhosts/{vhost_name}/apps/{app_name}:startPush

This is an action to request a push of a selected stream. Please refer to the "Push" document for detail setting. Request Example: POST http://1.2.3.4:8081/v1/vhosts/default/apps/app:startPush { "id": "{UserDefinedUniqueId}", "stream": { "name": "output_stream_name", "tracks": [ 101, 102 ] }, "protocol": "rtmp", "url":"rtmp://{host}[:port]/{appName}", "streamKey":"{streamName}" }

Path Parameters

NameTypeDescription

vhost_name*

string

A name of VirtualHost

app_name*

string

A name of Application

Headers

NameTypeDescription

authorization*

string

A string for authentication in Basic Base64(AccessToken) format.

For example, Basic b21lLWFjY2Vzcy10b2tlbg== if access token is ome-access-token

Request Body

NameTypeDescription

id*

string

Unique identifier for push management. if there is no value, automatically created and returned

stream*

string

Output stream for push

name*

string

Output stream name

tracks

string

Track id for want to push, if there is no value, all tracks are push

protocol*

string

Transport protocol [rtmp | mpegts]

url*

string

Destination URL

streamKey*

object

Destination stream key

{
  "message": "OK",
  "response": [
    {
      "app": "app",
      "createdTime": "2021-02-04T01:42:40.160+0900",
      "id": "userDefinedUniqueId",
      "protocol": "rtmp",
      "sentBytes": 0,
      "sentTime": 0,
      "sequence": 0,
      "startTime": "1970-01-01T09:00:00.000+0900",
      "state": "ready",
      "stream": {
        "name": "stream",
        "tracks": [
          101,
          102
        ]
      },
      "streamKey": "2u5w-rt7q-tepj-91qa-4yft",
      "totalsentBytes": 0,
      "totalsentTime": 0,
      "url": "rtmp://a.rtmp.youtube.com/live2",
      "vhost": "default"
    }
  ],
  "statusCode": 200
}

/v1/vhosts/{vhost_name}/apps/{app_name}:stopPush

POST http://<OME_HOST>:<API_PORT>/v1/vhosts/{vhost_name}/apps/{app_name}:stopPush

Request to stop pushing Request Example: POST http://1.2.3.4:8081/v1/vhosts/default/apps/app:stopRecord { "id": "{userDefinedUniqueId}" }

Path Parameters

NameTypeDescription

vhost_name*

string

A name of VirtualHost

app_name*

string

A name of Application

Headers

NameTypeDescription

authorization*

string

A string for authentication in Basic Base64(AccessToken) format.

For example, Basic b21lLWFjY2Vzcy10b2tlbg== if access token is ome-access-token.

Request Body

NameTypeDescription

id*

string

Unique identifier for push management

    {
      "id": "userDefinedUniqueId",
      "app": "app",
      "createdTime": "2021-01-18T10:25:03.765+0900",
      "startTime": "2021-01-18T10:25:03.765+0900",
      "finishTime": "2021-01-18T10:35:03.765+0900",
      "protocol": "rtmp",
      "sentBytes": 32841631,
      "sentTime": 601,
      "sequence": 0,
      "state": "stopping",
      "stream": {
        "name": "stream",
        "tracks": [
          101,
          102
        ]
      },
      "streamKey": "2u5w-rt7q-tepj-91qa-4yft",
      "totalsentBytes": 32841631,
      "totalsentTime": 601000,
      "url": "rtmp://a.rtmp.youtube.com/live2",
      "vhost": "default"
    

/v1/vhosts/{vhost_name}/apps/{app_name}:pushes

POST http://<OME_HOST>:<API_PORT>/v1/vhosts/{vhost_name}/apps/{app_name}:pushes

Get all push lists for a specific application Request Example: POST http://1.2.3.4:8081/v1/vhosts/default/apps/app:pushes

Path Parameters

NameTypeDescription

vhost_name*

string

A name of VirtualHost

app_name*

string

A name of Application

Headers

NameTypeDescription

authorization*

string

A string for authentication in Basic Base64(AccessToken) format. For example, Basic b21lLWFjY2Vzcy10b2tlbg== if access token is ome-access-token.

{
	"statusCode": 200,
	"message": "OK",
	"response": [
    {
      "id": "UniqueId1",
      "app": "app",
      "createdTime": "2021-01-18T10:25:03.765+0900",
      "startTime": "1970-01-01T09:00:00.000+0900",
      "finishTime": "1970-01-01T09:00:00.000+0900",
      "protocol": "rtmp",
      "sentBytes": 0,
      "sentTime": 0,
      "sequence": 0,
      "state": "ready",
      "stream": {
        "name": "stream",
        "tracks": [
          101,
          102
        ]
      },
      "streamKey": "2u5w-rt7q-tepj-91qa-4yft",
      "totalsentBytes": 0,
      "totalsentTime": 0,
      "url": "rtmp://a.rtmp.youtube.com/live2",
      "vhost": "default"
    },
    {
      "id": "UniqueId2",
      "app": "app",
      "createdTime": "2021-01-18T10:26:15.968+0900",
      "startTime": "1970-01-01T09:00:00.000+0900",
      "finishTime": "1970-01-01T09:00:00.000+0900",
      "protocol": "rtmp",
      "sentBytes": 0,
      "sentTime": 0,
      "sequence": 0,
      "state": "ready",
      "stream": {
        "name": "strea2m",
        "tracks": [
          101,
          102
        ]
      },
      "streamKey": "2u5w-rt7q-tepj-91qa-4yft",
      "totalsentBytes": 0,
      "totalsentTime": 0,
      "url": "rtmp://a.rtmp.youtube.com/live2",
      "vhost": "default"
    }
	]
}

Last updated