create.md
Create
Media API · Live Outputs
PUT https://app.mk.io/api/v1/projects/{project_name}/media/liveEvents/{event_name}/liveOutputs/{output_name}
Creates a Live Output
RBAC Capability Required: ams.liveeventoutput.create
Authentication
Authorizationheader — Bearer authentication of the formBearer <token>.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_name |
string | Yes | — |
event_name |
string | Yes | — |
output_name |
string | Yes | — |
Request body
Content type: application/json
properties· object · Required — The properties of the live output.archiveWindowLength· string · Required — ISO 8601 timespan duration of the archive window length. This is duration that customer want to retain the recorded content.assetName· string · Required · 1-260 characters — The name of the asset that the live output will write to.description· string · Optional · 0-4096 characters — The description of the live output.hls· object · Optional — The HLS configuration.fragmentsPerTsSegment· integer · Optional · 1 to 100000000 · Defaults to 1 — The number of fragments per HLS segment.
manifestName· string · Optional · 1-64 characters · pattern: ^[a-zA-Z0-9-]+[a-zA-Z0-9]$ — The name of the manifest file. If not provided, the service will generate one automatically. This is the filename that will appear in playback URLs.outputSnapTime· integer · Optional · Defaults to 0 — Not supported. The output snapshot time. This is the wall clock time, in unix epoch seconds, that the live output will begin recording from.rewindWindowLength· string · Optional — Not supported. ISO 8601 timespan duration of the rewind window length during live playback. This is the amount of time that the live output will be able to rewind.
Example request
curl -X PUT "https://app.mk.io/api/v1/projects/{project_name}/media/liveEvents/{event_name}/liveOutputs/{output_name}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"properties": {
"archiveWindowLength": "string",
"assetName": "string",
"description": "string",
"hls": {
"fragmentsPerTsSegment": 1
},
"manifestName": "name",
"outputSnapTime": 0,
"rewindWindowLength": "string"
}
}'
Responses
201 — Live Output created
name· string · Optional · 1-256 characters · pattern: ^[a-zA-Z0-9]+(-[a-zA-Z0-9])$ — The name of the resourceproperties· object · Required — The properties of the live output.archiveWindowLength· string · Required — ISO 8601 timespan duration of the archive window length. This is duration that customer want to retain the recorded content.assetName· string · Required · 1-260 characters — The name of the asset that the live output will write to.created· string · Optional — The exact time the live output was created.description· string · Optional · 0-4096 characters — The description of the live output.hls· object · Optional — The HLS configuration.fragmentsPerTsSegment· integer · Optional · 1 to 100000000 · Defaults to 1 — The number of fragments per HLS segment.
lastModified· string · Optional — The exact time the live output was last modified.manifestName· string · Optional · 1-64 characters · pattern: ^[a-zA-Z0-9-]+[a-zA-Z0-9]$ — The name of the manifest file. If not provided, the service will generate one automatically. This is the filename that will appear in playback URLs.outputSnapTime· integer · Optional · Defaults to 0 — Not supported. The output snapshot time. This is the wall clock time, in unix epoch seconds, that the live output will begin recording from.provisioningState· string · Optional — The provisioning state of the live output.resourceState· enum · Optional — The resource state of the live output.- Allowed values:
Creating,Deleting,Running
- Allowed values:
rewindWindowLength· string · Optional — Not supported. ISO 8601 timespan duration of the rewind window length during live playback. This is the amount of time that the live output will be able to rewind.
Example:
{
"name": "name",
"properties": {
"archiveWindowLength": "string",
"assetName": "string",
"created": "string",
"description": "string",
"hls": {
"fragmentsPerTsSegment": 1
},
"lastModified": "string",
"manifestName": "name",
"outputSnapTime": 0,
"provisioningState": "string",
"resourceState": "Creating",
"rewindWindowLength": "string"
}
}
400 — Bad Request
error· object · Required — Pertinent information about the errorcode· string · Required — The error code.detail· string · Required — The error message.extraDetail· map from strings to any · Optional — Extra information regarding this error.[any key]· any — map of additional properties
ref· string · Required — A reference to the request that caused the error.status· integer · Required — The HTTP status code
Example:
{
"error": {
"code": "string",
"detail": "string",
"extraDetail": {
"key": null
}
},
"ref": "string",
"status": 0
}
401 — Unauthorized
Example:
{
"error": {
"code": "string",
"detail": "string",
"extraDetail": {
"key": null
}
},
"ref": "string",
"status": 0
}
403 — Forbidden
Example:
{
"error": {
"code": "string",
"detail": "string",
"extraDetail": {
"key": null
}
},
"ref": "string",
"status": 0
}
404 — Not Found
Example:
{
"error": {
"code": "string",
"detail": "string",
"extraDetail": {
"key": null
}
},
"ref": "string",
"status": 0
}
409 — Conflict
Example:
{
"error": {
"code": "string",
"detail": "string",
"extraDetail": {
"key": null
}
},
"ref": "string",
"status": 0
}
429 — Too Many Requests
Example:
{
"error": {
"code": "string",
"detail": "string",
"extraDetail": {
"key": null
}
},
"ref": "string",
"status": 0
}
500 — Internal Server Error
Example:
{
"error": {
"code": "string",
"detail": "string",
"extraDetail": {
"key": null
}
},
"ref": "string",
"status": 0
}