Authorization:Basic {credentials}# Authorization Credentials for HTTP Basic Authentication created with <AccessToken>
Responses
200 Ok
The request has succeeded
Header
Content-Type: application/json
Body
{"statusCode":200,"message":"OK","response": ["app","app2","app3" ]}# statusCode Same as HTTP Status Code# message A human-readable description of the response code# response Json array containing a list of application names
401 Unauthorized
Authentication required
Header
WWW-Authenticate:Basic realm=”OvenMediaEngine”
Body
{"message":"[HTTP] Authorization header is required to call API (401)","statusCode":401}
404 Not Found
The given vhost name could not be found.
Body
{"message":"[HTTP] Could not find the virtual host: [default1] (404)","statusCode":404}
Create Application
Create application in the virtual host
Request
POST /v1/vhosts/{vhost}/apps
Header
Body
Configure applications to be created in Json array format.
Responses
200 Ok
The request has succeeded
Header
Body
It responds with Json array for each request.
207 Multi-Status
There might be a mixture of responses.
Header
Body
It responds with Json array for each request.
400 Bad Request
Invalid request. Body is not a Json array or does not have a required value
401 Unauthorized
Authentication required
Header
Body
404 Not Found
The given vhost name could not be found.
Body
409 Conflict
An application name already exists
Get Application Information
Request
GET /v1/vhosts/{vhost}/apps/{app}
Header
Responses
200 Ok
The request has succeeded
Header
Body
401 Unauthorized
Authentication required
Header
Body
404 Not Found
The given vhost name or application name could not be found.
Body
Patch Application Information
Modify application settings. If this request succeeds, the Application will be restarted.
Request
PATCH /v1/vhosts/{vhost}/apps/{app}
Header
Body
Write the value you want to modify. However, name and outputProfiles cannot be modified.
Responses
200 Ok
The request has succeeded
Header
Body
400 Bad Request
Invalid request.
401 Unauthorized
Authentication required
Header
Body
404 Not Found
The given vhost name or application name could not be found.
Body
Delete Application
Request
DELETE /v1/vhosts/{vhost}/apps/{app}
Header
Responses
200 Ok
The request has succeeded
Header
Body
401 Unauthorized
Authentication required
Header
Body
404 Not Found
The given vhost name or application name could not be found.
Body
500 Internal Server Error
The request failed due to an error on the server. Check the server log for the reason of the error.
Authorization: Basic {credentials}
# Authorization
Credentials for HTTP Basic Authentication created with <AccessToken>
[
{
"name": "app",
"type": "live",
"outputProfiles": {
"outputProfile": [
{
"name": "default",
"outputStreamName": "${OriginStreamName}",
"encodes": {
"audios": [
{
"name": "opus",
"codec": "opus",
"samplerate": 48000,
"bitrate": 128000,
"channel": 2,
"bypassIfMatch": {
"codec": "eq"
}
},
{
"name": "aac",
"codec": "aac",
"samplerate": 48000,
"bitrate": 128000,
"channel": 2,
"bypassIfMatch": {
"codec": "eq"
}
}
],
"videos": [
{
"name": "bypass_video",
"bypass": true
}
]
}
}
]
},
"providers": {
"ovt": {},
"rtmp": {},
"rtspPull": {},
"srt": {},
"webrtc": {}
},
"publishers": {
"llhls": {},
"ovt": {},
"webrtc": {}
}
}
]
# name (required)
Application name to create
# type (required)
live - currently only support live
# outputProfiles (optional)
Set OutputProfile for Transcoding. See the ABR and Transcoding chapter for more details. If no outputProfiles are present in the request, a default outputProfile as above is configured.
# providers (optional)
Configure providers. See the Live Source chapter for details. If providers are not present in the request, they are configured with default providers as above.
# publishers (optional)
Configure publishers. See the Streaming chapter for details. If publishers are not present in the request, they are configured with default publishers as above.
Content-Type: application/json
[
{
"statusCode": 200,
"message": "OK",
"response": {
"name": "app",
"outputProfiles": {
...
"providers": {
"ovt": {},
"rtmp": {},
...
},
{
"statusCode": 200,
"message": "OK",
"response": {
...
}
}
}
# statusCode
Same as HTTP Status Code
# message
A human-readable description of the response code
# response
Created application information
Content-Type: application/json
[
{
"statusCode": 200,
"message": "OK",
"response": {
"name": "app",
"outputProfiles": {
...
"providers": {
"ovt": {},
"rtmp": {},
...
},
{
"statusCode": 409,
"message": "Conflict",
"response": {
...
}
}
}
# statusCode
Same as HTTP Status Code
# message
A human-readable description of the response code
# response
Application information created when statusCode is 200
WWW-Authenticate: Basic realm=”OvenMediaEngine”
{
"message": "[HTTP] Authorization header is required to call API (401)",
"statusCode": 401
}
{
"message": "[HTTP] Could not find the virtual host: [default1] (404)",
"statusCode": 404
}
Authorization: Basic {credentials}
# Authorization
Credentials for HTTP Basic Authentication created with <AccessToken>