Application

/v1/vhosts/{vhost_name}/apps

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

Creates Applications in the VirtualHost Request Example: POST http://1.2.3.4:8081/v1/vhosts/default/apps [ { "name": "app", "type": "live", "outputProfiles": { "outputProfile": [ { "name": "bypass_profile", "outputStreamName": "${OriginStreamName}", "encodes": { "videos": [ { "bypass": true } ], "audios": [ { "bypass": true } ] } } ] } ]

Path Parameters

NameTypeDescription

vhost_name

string

A name of VirtualHost

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

(json body)

array

A list of Application

[
	{
		"statusCode": 200,
		"message": "OK",
		"response": {
			"dynamic": false,
			"name": "app",
			"outputProfiles":{
				"outputProfile": [
				{
					"encodes": {
						"audios": [
							{
								"bypass": true
							}
						],
						"images": [],
						"videos": [
							{
								"bypass": true
							}
						]
					},
					"name": "bypass_profile",
					"outputStreamName": "${OriginStreamName}"
				}
				],
			},
			"providers": {
				"mpegts": {},
				"rtmp": {}
			},
			"publishers": {
				"dash": {
					"segmentCount": 3,
					"segmentDuration": 5
				},
				"hls": {
					"segmentCount": 3,
					"segmentDuration": 5
				},
				"llDash": {
					"segmentDuration": 3
				},
				"sessionLoadBalancingThreadCount": 8,
				"webrtc": {
					"timeout": 30000
				}
			},
			"type": "live"
		}
	}
]

/v1/vhosts/{vhost_name}/apps

GET http://<OME_HOST>:<API_PORT>/v1/vhosts/{vhost_name}/apps

Lists all application names in the VirtualHost Request Example: GET http://1.2.3.4:8081/v1/vhosts/default/apps

Path Parameters

NameTypeDescription

vhost_name

string

A name of VirtualHost

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": [
		"app",
		"app2",
		"test_app"
	]
}

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

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

Gets the configuration of the Application Request Example: GET http://1.2.3.4:8081/v1/vhosts/default/apps/app

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": {
		"dynamic": false,
		"name": "app",
		"outputProfiles":{
			"outputProfile": [
			{
				"encodes": {
					"audios": [
						{
							"bypass": true
						},
						{
							"active": true,
							"bitrate": "128000",
							"channel": 2,
							"codec": "opus",
							"samplerate": 48000
						}
					],
					"images": [],
					"videos": [
						{
							"bypass": true
						}
					]
				},
				"name": "bypass.opus",
				"outputStreamName": "${OriginStreamName}"
			}
			],
		},
		"providers": {
			"mpegts": {},
			"ovt": {},
			"rtmp": {},
			"rtspPull": {}
		},
		"publishers": {
			"dash": {
				"crossDomains": [
					"*"
				],
				"segmentCount": 3,
				"segmentDuration": 5
			},
			"file": {
				"fileInfoPath": "/root/temp/ome_rec/${Application}/${Stream}/${Id}_${Sequence}.xml",
				"filePath": "/root/temp/ome_rec/${Application}/${Stream}/${Id}_${Sequence}.mp4"
			},
			"hls": {
				"crossDomains": [
					"*"
				],
				"segmentCount": 3,
				"segmentDuration": 5
			},
			"llDash": {
				"crossDomains": [
					"*"
				],
				"segmentDuration": 5
			},
			"ovt": {},
			"sessionLoadBalancingThreadCount": 8,
			"webrtc": {
				"timeout": 30000
			}
		},
		"type": "live"
	}
}

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

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

Changes the configuration of the Application Request Example: PUT http://1.2.3.4:8081/v1/vhosts/default/apps/app { "type": "live" }

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

(json body)

object

Application

{
	"statusCode": 200,
	"message": "OK",
	"response": {
		"dynamic": false,
		"name": "app",
		"outputProfiles": {
			"outputProfile": [
			{
				"encodes": {
					"audios": [
						{
							"bypass": true
						}
					],
					"images": [],
					"videos": [
						{
							"bypass": true
						}
					]
				},
				"name": "bypass_profile",
				"outputStreamName": "${OriginStreamName}"
			}
			],
		},
		"providers": {
			"mpegts": {},
			"rtmp": {}
		},
		"publishers": {
			"dash": {
				"segmentCount": 3,
				"segmentDuration": 5
			},
			"hls": {
				"segmentCount": 3,
				"segmentDuration": 5
			},
			"llDash": {
				"segmentDuration": 3
			},
			"sessionLoadBalancingThreadCount": 8,
			"webrtc": {
				"timeout": 30000
			}
		},
		"type": "live"
	}
}

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

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

Deletes the Application Request Example: DELETE http://1.2.3.4:8081/v1/vhosts/default/apps/app

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"
}

Last updated