Start push publishing the stream with SRT, RTMP or MPEG2-TS. If the requested stream does not exist on the server, this task is reserved. And when the stream is created, it automatically starts push publishing.
Request
Responses
400 Bad Request
Invalid request.
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 or application name could not be found.
Body
{
"message": "[HTTP] Could not find the application: [vhost/app1] (404)",
"statusCode": 404
}
409 Conflict
duplicate ID
Stop Push Publishing
Request
POST /v1/vhosts/{vhost}/apps/{app}:stopPush
Header
Authorization: Basic {credentials}
# Authorization
Credentials for HTTP Basic Authentication created with <AccessToken>
Body
{
"id": "{unique_push_id}"
}
# id (required)
unique ID to identify the push publishing task
Responses
200 Ok
The request has succeeded
Header
Content-Type: application/json
Body
{
"statusCode": 200,
"message": "OK",
}
# statusCode
Same as HTTP Status Code
# message
A human-readable description of the response code
400 Bad Request
Invalid request.
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/application name or id of recording task could not be found.
Body
{
"message": "[HTTP] Could not find the application: [vhost/app1] (404)",
"statusCode": 404
}
Get Push Publishing State
Request
POST /v1/vhosts/{vhost}/apps/{app}:pushes
Header
Authorization: Basic {credentials}
# Authorization
Credentials for HTTP Basic Authentication created with <AccessToken>
Body
{
"id": "{unique_push_id}"
}
# id (optional)
unique ID to identify the push publishing task. If no id is given in the request, the full list is returned.
Responses
200 Ok
The request has succeeded
Header
Content-Type: application/json
Body
The response is Json array format.
{
"statusCode": 200,
"message": "OK",
"response": [
{
"id": "{unique_push_id}",
"state": "started",
"vhost": "default",
"app": "app",
"stream": {
"name": "{output_stream_name}",
"trackIds": [],
"variantNames": []
},
"protocol": "rtmp",
"url": "rtmp://{host}[:port]/{app_name}",
"streamKey": "{stream_name}",
"sentBytes": 0,
"sentTime": 0,
"sequence": 0,
"totalsentBytes": 0,
"totalsentTime": 0,
"createdTime": "2023-03-15T23:02:34.371+09:00",
"startTime": "1970-01-01T09:00:00.000+09:00",
"finishTime": "1970-01-01T09:00:00.000+09:00"
},
{
"id": "4",
...
}
]
}
# statusCode
Same as HTTP Status Code
# message
A human-readable description of the response code
# response
Information of recording tasks. If there is no recording task,
response with empty array ("response": [])
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 or application name could not be found.
Body
{
"message": "[HTTP] Could not find the application: [vhost/app1] (404)",
"statusCode": 404
}
State of Push Publishing
The Push Publishing task has the state shown in the table below. You can get the state in the Start Push Publishing and Get Push Publishing State API response.