Overview
Origin Manager (OM) has one HTTP management API, the Account API. It manages the resources of one account: channels, content (recordings, uploads, buffered live and external assets) and distributions.
- Port:
9090by default, set withmanager.account_api_port - Content type:
application/jsonfor request and response bodies - Authentication: an API key in a request header, see Authentication
- Machine-readable description: the OpenAPI document is served at
/openapi.yaml. It is the only route that does not need an API key.
The examples on this page use three shell variables. The keys are throwaway examples. The account
key comes from om-admin account create, and the operator key from om-admin operator create,
see Creating an Account and an Operator:
export OM_API=http://om-1.example.invalid:9090
export API_KEY=3f2b8c1e-5d4a-4e7b-9a10-6c8d2e4f1a77
export OPERATOR_KEY=7d1e4b92-0a6c-4f35-9e18-5c2a8d3b6f01
The samples come from the setup of the
Complete Configuration Example, as on
the How-To page. There nas-1 (tagged sports) and ftp-1 are the
storage systems, cbm-1 serves the channel groups sports and news, and cbm-2 serves every
group. A channel in the group default, such as news-1, is therefore stored on ftp-1 only.
The storage names in your delivery URLs come from your own configuration.
curl $OM_API/openapi.yaml | head -3
openapi: 3.0.3
info:
title: Origin Manager — Account API
JSON responses use two-space indentation. The order of the keys in an object is not significant.
Time stamps are in UTC. Header names are not case sensitive, and the curl -i examples show only
the headers that matter.
Routes
| Resource | Routes |
|---|---|
| Channels | POST /api/2/channel, GET /api/2/channel, GET /api/2/channel/{channel_id}, DELETE /api/2/channel/{channel_id} |
| Content | POST /api/2/content, GET /api/2/content, GET /api/2/content/{content_id}, PUT /api/2/content/{content_id}, DELETE /api/2/content/{content_id} |
| Content pending deletes | GET /api/1/content-pending-deletes |
| Distributions | POST /api/1/distribution, GET /api/1/distribution, GET /api/1/distribution/{cache_name}, PUT /api/1/distribution/{cache_name}, DELETE /api/1/distribution/{cache_name}, GET /api/2/distribution |
| API description | GET /openapi.yaml (no authentication) |
Only these routes are served. OM covers HTTP and WebTV content, so the older routes for
recordings and uploads under /api/1/ do not exist. A request with a valid key to a path or
method that is not served gets a plain text answer instead of the JSON error body:
curl -i -H "X-Account-API-Key: $API_KEY" $OM_API/api/1/recording
HTTP/1.1 404 Not Found
Content-Type: text/plain; charset=utf-8
404 page not found
A wrong method on a served path gets 405 Method Not Allowed, also as plain text.
Without a valid key the key check runs first. Every request that has no key, also one for a path
or method that is not served, gets the JSON 401 Bad or missing API key. Only GET /openapi.yaml
is exempt. DELETE /openapi.yaml also gets 401.
Authentication
Every request except GET /openapi.yaml must carry credentials in one of two forms.
Account API key. Send the key in the X-Account-API-Key header. The request acts on the
account that owns the key.
curl -H "X-Account-API-Key: $API_KEY" $OM_API/api/2/channel
Operator API key. Send the key in X-Operator-API-Key together with the name of the target
account in X-Account. The request acts on the account named in X-Account.
curl -H "X-Operator-API-Key: $OPERATOR_KEY" -H "X-Account: example-account" \
$OM_API/api/2/channel
Keys are checked against the database on every request, so a key that you rotate or delete stops working at once. The rules are:
- If
X-Account-API-Keyis present it is used andX-Operator-API-Keyis ignored. A wrong account key gives401, even when a valid operator key is sent too. A header with an empty value counts as absent. - If only
X-Operator-API-Keyis present,X-Accountis required. The account name inX-Accountis matched without regard to case:X-Account: EXAMPLE-ACCOUNTfindsexample-account. - If neither key is present, the request gets
401.
An authentication failure returns 401 Unauthorized. The message tells you why:
curl -i $OM_API/api/2/channel
HTTP/1.1 401 Unauthorized
Content-Type: application/json
{
"tag": "unauthorized",
"message": "Bad or missing API key.",
"details": null
}
| Situation | Message |
|---|---|
| No key header at all | Bad or missing API key. |
| Account key not found | Account API key is invalid |
Operator key used without X-Account | Missing account name when authenticating with Operator API key |
| Operator key not found | Operator API key is invalid |
X-Account names an unknown account | Account name is invalid |
If OM cannot reach its database while it checks a key, the answer is 500 with the tag
internal-server-error and the message Internal server error, so that an outage is not mistaken
for a wrong key. The text of a 500 message depends on where the failure happens, see
Error Handling.
An account sees and changes only its own resources. A resource that belongs to another account
is reported as 404. The one exception is the uniqueness of channel ids: a channel_id is unique
in the whole deployment, so creating a channel with an id that another account uses fails with
409 data-exists, while a GET for that id answers 404.
Channels
Channels describe the live sources that recordings and buffered live content refer to. OM
accepts only the channel type mbr_ts_multicast.
Create a channel
POST /api/2/channel
Fields:
channel_id(string, required): unique identifier of the channel in the whole deployment, not only in the account. If another account owns the id, the request fails with409 data-exists. It must not be empty, start with__, contain a space or/, or be.or... Other ids with dots, such astrailer.mp4, are valid.title(string, required): display title. An empty title is accepted for a channel.channel_type(string, required): must bembr_ts_multicast.mbr_ts_multicast(object, required): data for the channel type. The key is named after the value ofchannel_type. OM stores the object as it is and does not use its content: the Catch-up Buffer Manager finds the channel by its name, and recordings and buffered live content work with{}. Use{}.channel_group(string, optional): channel group. Defaultdefault. The group decides which Catch-up Buffer Managers record the channel. An empty string""is stored as an empty group, not replaced bydefault.egress_encryption(object, optional): DRM settings.drm_content_id_source:api_defined(needsdrm_content_id) orauto_generated(OM generates the id). Without a source, adrm_content_idthat you send is stored asapi_defined. Content behaves differently, see Create content.drm_content_id: 1 to 128 characters.
Request:
curl -i -X POST $OM_API/api/2/channel \
-H "X-Account-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"channel_id":"news-1","title":"News One","channel_type":"mbr_ts_multicast","mbr_ts_multicast":{}}'
Response: 201 Created, with the path of the new channel in the Location header.
HTTP/1.1 201 Created
Content-Type: application/json
Location: /api/2/channel/news-1
{
"channel_group": "default",
"channel_id": "news-1",
"channel_type": "mbr_ts_multicast",
"creation_time": "2026-11-02T10:00:00Z",
"mbr_ts_multicast": {},
"modification_time": "2026-11-02T10:00:00Z",
"title": "News One"
}
Common errors:
The
channel_idalready exists, in your account or in another one:409 Conflict. If you cannot see the channel (GETgives404), it belongs to another account.{ "tag": "data-exists", "message": "Data already exists.", "details": null }The
channel_idis not valid, herenews/1:400 Bad Request.{ "tag": "bad-repr", "message": "Bad resource representation (syntax error): \"/\" not allowed in ID", "details": null }The
channel_idis.or..:400 Bad Request.{ "tag": "bad-repr", "message": "Bad resource representation (syntax error): ID must not be \".\"", "details": null }
These are the other messages of a channel create. All are 400 Bad Request with the tag
bad-repr. Each message starts with Bad resource representation (syntax error):, a space and
the text in this table:
| Cause | message ends with |
|---|---|
channel_id is empty | ID must not be empty |
channel_id starts with __ | "^__" not allowed in ID |
channel_id contains a space | " " not allowed in ID |
channel_id is missing | channel_id is required |
title is missing | title is required |
title is not a string | title must be a string |
channel_type is missing | channel_type is required |
channel_type is another type | channel_type must be mbr_ts_multicast |
The mbr_ts_multicast object is missing | field 'mbr_ts_multicast' is missing |
drm_content_id_source is not api_defined or auto_generated | invalid drm_content_id_source |
drm_content_id is empty | drm_content_id must be at least 1 character |
drm_content_id is longer than 128 characters | drm_content_id must be at most 128 characters |
api_defined without a drm_content_id | drm_content_id_source is api_defined, but no drm_content_id was specified. |
| The body is not valid JSON | malformed JSON body |
A channel with DRM settings:
curl -X POST $OM_API/api/2/channel \
-H "X-Account-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"channel_id":"drm-1","title":"DRM One","channel_type":"mbr_ts_multicast",
"mbr_ts_multicast":{},"channel_group":"sports",
"egress_encryption":{"drm_content_id_source":"api_defined","drm_content_id":"drm-key-1"}}'
{
"channel_group": "sports",
"channel_id": "drm-1",
"channel_type": "mbr_ts_multicast",
"creation_time": "2026-11-02T10:00:00Z",
"egress_encryption": {
"drm_content_id": "drm-key-1",
"drm_content_id_source": "api_defined"
},
"mbr_ts_multicast": {},
"modification_time": "2026-11-02T10:00:00Z",
"title": "DRM One"
}
egress_encryption appears in responses only when the channel has a DRM content id.
Get a channel
GET /api/2/channel/{channel_id}
curl -H "X-Account-API-Key: $API_KEY" $OM_API/api/2/channel/news-1
Response: 200 OK with the channel object shown above. For a channel that does not exist, the
answer is 404 Not Found:
{
"tag": "missing-resource",
"message": "No resource available at given URI.",
"details": null
}
List channels
GET /api/2/channel
GET /api/2/channel?cursor=<cursor>
curl -H "X-Account-API-Key: $API_KEY" $OM_API/api/2/channel
Channels are returned 100 at a time, in a stable order. There is no total. When more channels
remain, the response has a next value with the path and query of the next page, for example
"next": "/api/2/channel?cursor=42". On the last page next is missing. See
Pagination. The list cannot be filtered.
{
"channels": [
{
"channel_group": "default",
"channel_id": "news-1",
"channel_type": "mbr_ts_multicast",
"creation_time": "2026-11-02T10:00:00Z",
"mbr_ts_multicast": {},
"modification_time": "2026-11-02T10:00:00Z",
"title": "News One"
}
]
}
Delete a channel
DELETE /api/2/channel/{channel_id}
curl -i -X DELETE -H "X-Account-API-Key: $API_KEY" $OM_API/api/2/channel/news-1
HTTP/1.1 204 No Content
Deleting a channel that does not exist gives the 404 shown above.
A channel can be deleted while buffered live content with the same name still exists. The delete
works (204), and that content then answers get and update with
400 Bad request: Channel "<id>" does not exist, see
When no delivery URIs are returned. Delete the buffered
live content first.
Content
A content item is a playable asset. Its source decides how it is produced:
| Source | Meaning |
|---|---|
recording | A scheduled recording of a channel over a time window |
upload | A file that OM fetches from a URL and stores |
buffered_live | The live buffer of a channel, addressed by the channel name |
external | An asset that is already hosted elsewhere. OM only registers it |
Only the service HTTP is accepted.
Create content
POST /api/2/content
Fields that are common to all sources:
content_id(string, required): unique identifier of the content in the account. It is used as a file name. ASCII only. It must not be empty, start with__, contain a space or/, or be.or... Other ids with dots, such astrailer.mp4, are valid.title(string, required): display title.service(string, required):HTTP.source(string, required):recording,upload,buffered_liveorexternal.content_duration_ms(integer, optional): duration in milliseconds. For recordings OM replaces it with the length of the recording window.tag(array of strings, optional): tags. Spaces around a tag are removed and empty tags are dropped. Tags of an upload decide which storage systems are used. A tag with a comma is split into two tags for recordings, uploads and buffered live content:["x,y"]becomes["x","y"]. Forexternalcontent a tag must not contain,or;, see External.ad_marker_detection(object, optional):{"enabled": true}. Not used forexternalcontent.egress_encryption(object, optional): DRM settings, as for channels. Without adrm_content_id_sourceit isauto_generated, and adrm_content_idthat you send is dropped and replaced by a generated one (a channel keeps it asapi_defined). Send"drm_content_id_source": "api_defined"with yourdrm_content_idto keep it. Forrecordingandbuffered_livecontent the source can also beinherited_from_channel. The id is then taken from the channel, and the request fails if the channel has none.
The response for every source is 201 Created with the content (see
Content representation), the entity tag in the ETag header and the
path of the new item in the Location header.
These errors apply to every source. They are 400 Bad Request. The tag is bad-repr, and the
message starts with Bad resource representation (syntax error):, a space and the text in this
table, unless the table says otherwise:
| Cause | message ends with |
|---|---|
content_id, title, service or source is missing | <field> is required |
content_id is empty, starts with __, or contains a space or / | ID must not be empty, "^__" not allowed in ID, " " not allowed in ID or "/" not allowed in ID |
content_id is . or .. | ID must not be "." (or "..") |
content_id is not ASCII | Only ASCII characters allowed in "content_id" |
service is not HTTP (the check is case sensitive) | invalid service |
source is not one of the four | invalid source |
title is empty or not a string | title must be a non-empty string |
tag is not an array of strings | invalid tag |
ad_marker_detection is not valid | invalid ad_marker_detection |
drm_content_id_source is api_defined without an id | drm_content_id missing |
inherited_from_channel for an upload or external content | drm_content_id_source=inherited_from_channel is only valid for recordings and buffered live |
inherited_from_channel, and the channel has no DRM content id (tag bad-request, prefix Bad request:) | Cannot use inherited_from_channel, because the channel has no "drm_content_id" |
| The body is not valid JSON | malformed JSON body |
Recording
Schedules a recording of a channel.
curl -i -X POST $OM_API/api/2/content \
-H "X-Account-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content_id": "match-1",
"title": "Evening match",
"service": "HTTP",
"source": "recording",
"recording": {
"channel": "news-1",
"start_time": "2026-12-01T20:00:00Z",
"stop_time": "2026-12-01T22:00:00Z"
}
}'
HTTP/1.1 201 Created
Content-Type: application/json
Etag: "5f1c2b3a-0000-4000-8000-000000000001"
Location: /api/2/content/match-1
{
"additional_state_info": null,
"content_duration_ms": "7200000",
"content_id": "match-1",
"creation_time": "2026-11-02T10:00:00Z",
"delivery_uris": {
"dash": "/__cl/s:ftp-1/__c/r/2/6/0/r_match1_26045eed8babc290c1a16217f8163e47/__op/dash-default/__f/manifest.mpd",
"hls": "/__cl/s:ftp-1/__c/r/2/6/0/r_match1_26045eed8babc290c1a16217f8163e47/__op/hls-default/__f/index.m3u8",
"mss": "/__cl/s:ftp-1/__c/r/2/6/0/r_match1_26045eed8babc290c1a16217f8163e47/__op/mss-default/__f/Manifest"
},
"modification_time": "2026-11-02T10:00:00Z",
"playable": false,
"recording": {
"channel": "news-1",
"start_time": "2026-12-01T20:00:00Z",
"stop_time": "2026-12-01T22:00:00Z"
},
"service": "HTTP",
"source": "recording",
"state": "pending",
"tag": [],
"title": "Evening match"
}
The response has a recording object with the channel and the window of the recording, from the
recording job. See Content representation.
The rules for a recording:
recording.channel,recording.start_timeandrecording.stop_timeare required. A time is an ISO 8601 string:2026-12-01T20:00:00Z, with an offset (2026-12-01T21:00:00+01:00), without a zone (read as UTC) or a plain date.- The channel must exist in the account.
stop_timemust be later thanstart_time.- With a catch-up buffer (
buffer_durationis set),start_timemust not be earlier than the start of the buffer. Without a catch-up buffer,start_timemust be at least 5 seconds in the future. - OM chooses the storage from the Catch-up Buffer Managers that serve the channel group.
Known limitation: a recording without a catch-up buffer ends in error. The rules above are
enforced, and the request is accepted, but the recorder asks the Catch-up Buffer Manager for a
time range that has not been recorded yet. With the ew-vodingest delivered with this release, the
manager answers Code 416, every copy fails within a second and the state becomes error. Set the
same buffer_duration on every Catch-up Buffer Manager before you create recordings, see the
Configuration page.
The new item starts in state pending. Errors that are specific to recordings:
| Cause | Status | message |
|---|---|---|
| Channel does not exist | 400 | Bad request: Channel does not exist: nope |
stop_time is not after start_time | 400 | Bad request: Stop time must be greater than start time |
| Start is less than 5 seconds in the future (or in the past) and there is no catch-up buffer | 400 | Bad request: Scheduling HTTP recordings is not allowed earlier than 5 seconds in the future |
| Start is before the start of the catch-up buffer | 400 | Bad request: Cannot schedule HTTP recording to start before the start of the catch-up buffer. |
recording is missing | 400 | Bad resource representation (syntax error): recording is required |
channel is missing | 400 | Bad resource representation (syntax error): channel is required |
start_time is missing | 400 | Bad resource representation (syntax error): start_time is required |
stop_time is missing | 400 | Bad resource representation (syntax error): stop_time is required |
| A time cannot be read | 400 | Bad resource representation (syntax error): invalid start_time (or invalid stop_time) |
| No storage or origin server for the channel group | 503 | no storage available for the requested storage systems |
For example, a channel that does not exist:
{
"tag": "bad-request",
"message": "Bad request: Channel does not exist: nope",
"details": null
}
Upload
Creates an item whose media OM fetches from a URL. For http and https the URL must be the URL
of a SMIL file that lists the media files, see the rules below.
curl -i -X POST $OM_API/api/2/content \
-H "X-Account-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content_id": "promo-1",
"title": "Promo clip",
"service": "HTTP",
"source": "upload",
"tag": ["promo"],
"upload": {
"location": "https://media.example.invalid/vod/promo.smil"
}
}'
HTTP/1.1 201 Created
Content-Type: application/json
Etag: "5f1c2b3a-0000-4000-8000-000000000008"
Location: /api/2/content/promo-1
{
"additional_state_info": "tag:promo",
"additional_state_information": "tag:promo",
"content_duration_ms": "N/A",
"content_id": "promo-1",
"creation_time": "2026-11-02T10:00:00Z",
"delivery_uris": {
"dash": "/__cl/s:ftp-1/__c/v/c/5/2/v_promo1_c52e8a07d91b34f6a8e0b7253c9d1f48/__op/dash-default/__f/manifest.mpd",
"hls": "/__cl/s:ftp-1/__c/v/c/5/2/v_promo1_c52e8a07d91b34f6a8e0b7253c9d1f48/__op/hls-default/__f/index.m3u8",
"mss": "/__cl/s:ftp-1/__c/v/c/5/2/v_promo1_c52e8a07d91b34f6a8e0b7253c9d1f48/__op/mss-default/__f/Manifest"
},
"modification_time": "2026-11-02T10:00:00Z",
"playable": false,
"service": "HTTP",
"source": "upload",
"state": "pending",
"tag": [
"promo"
],
"title": "Promo clip",
"upload": {
"location": "https://media.example.invalid/vod/promo.smil"
}
}
upload.location(string, required): the URL that the uploader fetches the media from. The scheme must behttp,httpsorftp.- For
httpandhttpsthe location must be a SMIL file. The media files are fetched from the paths in the SMIL file. A bare media URL such asclip.mp4is accepted with201, but the upload then ends inerror. See the SMIL manifest page of ew-vodingest, and the How-To page for an example. - For
ftpthe input rules of ew-vodingest apply: it accepts a SMIL file or a directory, and not a bare MP4 file, see Input locations. A SMIL file over FTP was not tested with OM. - With another scheme (for example
fileors3) the request is accepted, but the upload ends inerror. Itscommentin the uploader log, and itsadditional_state_info, then isdownloading failed: uploader: source scheme "s3" is not allowed (allowed: http, https, ftp).
- For
- OM chooses the storage from
uploader.storages, taking thetagvalues into account. In the example setup the tagpromomatchesftp-1only, becausenas-1is taggedsports. - The response has an
uploadobject with thelocation. A password in the location is removed from the response: forftp://ingest:change-me@ftp.example.invalid/vod/promo.smilit showsftp://ingest@ftp.example.invalid/vod/promo.smil. A location that has no host name and contains@, such asuser:password@ftp.example.invalid/file.ts, is not shown at all:locationis an empty string. - When an upload ends in
error,additional_state_infogives a short reason, see Content state. The details are in theingest_logfield of theingest failedline in the log oforigin-uploader, see the How-To page.
Errors that are specific to uploads:
| Cause | Status | message |
|---|---|---|
upload is missing | 400 | Bad resource representation (syntax error): upload is required |
upload.location is missing | 400 | Bad resource representation (syntax error): location is required |
upload.location is empty or not a string | 400 | Bad resource representation (syntax error): location must be a non-empty string |
| No storage or origin server matches | 503 | no storage available for the requested storage systems |
{
"tag": "service-unavailable-error",
"message": "no storage available for the requested storage systems",
"details": null
}
Buffered live
Exposes the live buffer of a channel as content.
curl -i -X POST $OM_API/api/2/content \
-H "X-Account-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content_id": "news-1",
"title": "News One live",
"service": "HTTP",
"source": "buffered_live",
"buffered_live": { "channel": "news-1" }
}'
HTTP/1.1 201 Created
Content-Type: application/json
Etag: "5f1c2b3a-0000-4000-8000-000000000011"
Location: /api/2/content/news-1
{
"additional_state_info": null,
"buffered_live": {
"channel": "news-1"
},
"content_duration_ms": "N/A",
"content_id": "news-1",
"creation_time": "2026-11-02T10:00:00Z",
"delivery_uris": {
"dash": "/__cl/cg:default/__c/news-1/__op/dash-default/__f/manifest.mpd",
"hls": "/__cl/cg:default/__c/news-1/__op/hls-default/__f/index.m3u8",
"mss": "/__cl/cg:default/__c/news-1/__op/mss-default/__f/Manifest"
},
"modification_time": "2026-11-02T10:00:00Z",
"playable": true,
"service": "HTTP",
"source": "buffered_live",
"state": "N/A",
"tag": [],
"title": "News One live"
}
buffered_live.channel(string, required): the channel. It must exist in the account.content_idmust be the same as the channel name.- No storage system is needed, so the request does not depend on the
storageconfiguration. The delivery URLs use the channel group (cg:default). - The content has the
stateN/Aand can be played at once. - The response has a
buffered_liveobject with thechannel.
Errors that are specific to buffered live content:
| Cause | Status | message |
|---|---|---|
content_id differs from the channel name | 400 | Bad request: Content ID (live-news) and channel name (news-1) must be the same |
| Channel does not exist | 400 | Bad request: Channel does not exist: nope |
buffered_live is missing | 400 | Bad resource representation (syntax error): buffered_live is required |
buffered_live.channel is missing | 400 | Bad resource representation (syntax error): channel is required |
External
Registers an asset that is already hosted on a storage system. OM only stores the record. It does not copy, fetch or check any file.
curl -i -X POST $OM_API/api/2/content \
-H "X-Account-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content_id": "trailer-1",
"title": "Trailer",
"service": "HTTP",
"source": "external",
"tag": ["promo"],
"external": {
"storage_name": "trailers/trailer-1",
"content_duration_ms": 90000
}
}'
HTTP/1.1 201 Created
Content-Type: application/json
Etag: "5f1c2b3a-0000-4000-8000-000000000013"
Location: /api/2/content/trailer-1
{
"additional_state_info": "tag:promo",
"additional_state_information": "tag:promo",
"content_duration_ms": "90000",
"content_id": "trailer-1",
"creation_time": "2026-11-02T10:00:00Z",
"delivery_uris": {
"dash": "/__cl/s:trailers/trailer-1/__c/3b1f0c8e5d6a4f7b9c2d1e0f8a7b6c5d@trailers/trailer-1/__op/dash-default/__f/manifest.mpd",
"hls": "/__cl/s:trailers/trailer-1/__c/3b1f0c8e5d6a4f7b9c2d1e0f8a7b6c5d@trailers/trailer-1/__op/hls-default/__f/index.m3u8",
"mss": "/__cl/s:trailers/trailer-1/__c/3b1f0c8e5d6a4f7b9c2d1e0f8a7b6c5d@trailers/trailer-1/__op/mss-default/__f/Manifest"
},
"external": {
"storage_name": "3b1f0c8e5d6a4f7b9c2d1e0f8a7b6c5d@trailers/trailer-1"
},
"modification_time": "2026-11-02T10:00:00Z",
"playable": false,
"service": "HTTP",
"source": "external",
"state": "N/A",
"tag": [
"promo"
],
"title": "Trailer"
}
- The
externalobject is optional. When it is present,external.storage_nameis required, with 1 to 255 characters. - If
storage_namecontains an@, OM keeps it as it is. Otherwise OM stores it as<32 hex characters>@<storage_name>, as in the example. The stored value is returned inexternal.storage_name. The stored name must not be longer than 255 characters. - If the
externalobject is left out, the storage name is thecontent_id. - The delivery URLs are built from the stored name. The location is the part after the first
@, up to the next@if there is one, or the whole name when there is no@. The content name is the whole stored name. With"storage_name": "ab12@archive-store"the HLS URL is/__cl/s:archive-store/__c/ab12@archive-store/__op/hls-default/__f/index.m3u8. See Delivery URIs. external.content_duration_mshas no minimum, and it wins over the top-levelcontent_duration_ms. A top-levelcontent_duration_mson external content must be at least 1. Durations below 1000 ms are shown as"N/A".- Tags must not contain
,or;. - OM creates no storage entry and does not check the storage, so this request never fails with
503. - The content has the
stateN/A.playableisfalsefor external content.
Errors that are specific to external content:
| Cause | Status | message |
|---|---|---|
The content_id or the stored storage_name is already used | 409 | Data already exists. |
storage_name is empty | 400 | Bad resource representation (syntax error): storage_name must not be empty |
storage_name is not a string | 400 | Bad resource representation (syntax error): invalid storage_name |
The stored storage_name is longer than 255 characters | 400 | Bad resource representation (syntax error): storage_name must be at most 255 characters |
external is present without storage_name | 400 | Bad resource representation (syntax error): storage_name is required |
A tag contains , or ; | 400 | Bad resource representation (syntax error): tag must not contain "," or ";" |
A top-level content_duration_ms below 1 | 400 | Bad resource representation (syntax error): content_duration_ms must be at least 1 |
Content representation
Create, get, update and list return the same object. The recording response shown above is an example. These are its fields:
content_id,title,serviceandsource: as given when the content was created.state(string): see Content state.playable(boolean):truewhen the content is available for playback. A new recording or upload becomes playable when it has finished. Buffered live content is playable at once. External content is never marked playable.content_duration_ms(string): the duration in milliseconds as a string, or"N/A"when it is unknown or not positive (for external content also when it is below 1000 ms).tag(array of strings): the tags, or an empty array.delivery_uris(object): the delivery URLsmss,hlsanddash. Each is a path without a host name that ends with the presentation file of its protocol. Present when the delivery location is known. For a recording or upload it is built from the storage systems. For buffered live content it is built from the channel group. See Delivery URIs.recording(object or string): only forrecordingcontent, from the recording job. It holds the channel and the window of the recording, and no other field:channel(the channel of the recording, as sent when it was created),start_timeandstop_time(UTC, for example2026-12-01T20:00:00Z).upload(object or string): only foruploadcontent, from the upload job. It holdslocation, the URL that the upload was created with. A password in the URL is removed:ftp://ingest:change-me@ftp.example.invalid/vod/promo.smilis shown asftp://ingest@ftp.example.invalid/vod/promo.smil. A location that has no host name and contains@, such asuser:password@ftp.example.invalid/file.ts, is withheld:locationis then an empty string. Nothing else is removed, so do not put a secret in the path or the query of a location. The host name is written in lower case.buffered_live(object): only forbuffered_livecontent. It holdschannel, the channel name, which is the same as thecontent_id.external(object): only forexternalcontent. It holdsstorage_name, the full stored name.egress_encryption(object): only when a DRM content id is set.ad_marker_detection(object): when it was set.additional_state_info(string ornull): always present. It holdstag:<tags>when the content has tags. Without tags, an upload shows the reason that the uploader stored with the upload job, see Content state.additional_state_informationhas the same text and is present only when it is not empty.creation_timeandmodification_time(string): time stamps in UTC. For a recording,modification_timeis the later of the last change of the content and the last change of the recording job, so it moves when the recording changes state.
The name of the source object is the value of source. A recording or upload item whose job
record does not exist has the string "N/A" instead of the object, and its state is "N/A" as
well. This is how the four source objects look, shown with their source:
{
"source": "recording",
"recording": {
"channel": "news-1",
"start_time": "2026-12-01T20:00:00Z",
"stop_time": "2026-12-01T22:00:00Z"
}
}
{
"source": "upload",
"upload": {
"location": "https://media.example.invalid/vod/promo.smil"
}
}
{
"source": "buffered_live",
"buffered_live": {
"channel": "news-1"
}
}
{
"source": "external",
"external": {
"storage_name": "3b1f0c8e5d6a4f7b9c2d1e0f8a7b6c5d@trailers/trailer-1"
}
}
An upload whose job record is missing looks like this. A recording is the same, with
"recording": "N/A":
{
"source": "upload",
"state": "N/A",
"upload": "N/A"
}
Delivery URIs
delivery_uris has one URL for each streaming protocol. A player plays the content with one of
them. Every URL ends with /__f/ and the presentation file of its protocol:
| Key | Protocol | Output profile | Presentation file |
|---|---|---|---|
mss | Microsoft Smooth Streaming | mss-default | Manifest |
hls | HLS | hls-default | index.m3u8 |
dash | MPEG-DASH | dash-default | manifest.mpd |
OM always writes the output profiles and presentation files in this table. There is no
configuration key to change them, and OM does not know the output profiles and presentations that
are configured in your repackager. To use another one, replace the __op or __f part of the URL.
The URL format is the CCMI URL format of AgileTV Origin. The location, the output profile and the
presentation must be defined in the configuration of the repackager. See CCMI URLs
for the whole format.
The URL is a path
The values have no scheme and no host name, because OM does not know the address of your repackager. The URL for a player is the address of the repackager followed by the value:
curl -s -H "X-Account-API-Key: $API_KEY" $OM_API/api/2/content/promo-1 | grep '"hls"'
"hls": "/__cl/s:ftp-1/__c/v/c/5/2/v_promo1_c52e8a07d91b34f6a8e0b7253c9d1f48/__op/hls-default/__f/index.m3u8",
The three player URLs of promo-1, with the repackager at repackager.example.invalid:
http://repackager.example.invalid/__cl/s:ftp-1/__c/v/c/5/2/v_promo1_c52e8a07d91b34f6a8e0b7253c9d1f48/__op/hls-default/__f/index.m3u8
http://repackager.example.invalid/__cl/s:ftp-1/__c/v/c/5/2/v_promo1_c52e8a07d91b34f6a8e0b7253c9d1f48/__op/dash-default/__f/manifest.mpd
http://repackager.example.invalid/__cl/s:ftp-1/__c/v/c/5/2/v_promo1_c52e8a07d91b34f6a8e0b7253c9d1f48/__op/mss-default/__f/Manifest
The host name in the player URL (here repackager.example.invalid) must be a cache name of a
distribution of the account and must lead to the Request Router, which serves any other host name
for the default account. See
Serving the Content of an Account through the Request Router.
Parts of a URL
The parts always come in this order. This is the HLS URL of promo-1, split into its parts:
| Order | Part | In the example | Meaning |
|---|---|---|---|
| 1 | /__cl/<location> | /__cl/s:ftp-1 | Content location: s: and the storage systems that hold the file, or cg: and a channel group |
| 2 | /__c/<content name> | /__c/v/c/5/2/v_promo1_c52e8a07d91b34f6a8e0b7253c9d1f48 | Name of the content on that location. It can contain / |
| 3 | /__op/<profile> | /__op/hls-default | Output profile of the protocol |
| 4 | /__dci/<drm content id> | none | Only for content with a DRM content id. Left out otherwise |
| 5 | /__f/<file> | /__f/index.m3u8 | Presentation file of the protocol. Always the last part |
The location and the content name depend on the source:
| Source | __cl | __c |
|---|---|---|
recording | s: and the storage systems of the recording, separated by commas | The storage name that OM generated. It starts with r/ |
upload | s: and the storage systems of the upload, separated by commas | The storage name that OM generated. It starts with v/ |
buffered_live | cg: and the channel group of the channel | The content_id, which is the channel name |
external | s: and the part of the stored name after the first @ (up to the next @, if any) | The whole stored name, as in external.storage_name |
The generated storage name is not the content_id. To see it, run
om-admin content storage-name <account>/<content_id>, see
Inspecting the Storage of a Content Item.
One storage system
A recording or an upload that is stored on ftp-1 has s:ftp-1. The
Recording and Upload examples above show the full responses. The HLS
URL of the upload is:
/__cl/s:ftp-1/__c/v/c/5/2/v_promo1_c52e8a07d91b34f6a8e0b7253c9d1f48/__op/hls-default/__f/index.m3u8
Several storage systems
When the content is on more than one storage system, __cl lists all of them after s:,
separated by commas. The names after s: are names of storage systems, not addresses. The
repackager does not read from an FTP server. It resolves the location with its own configuration,
for example from an origin server that delivers the files of ftp-1 over HTTP, see
Origin Servers.
curl -H "X-Account-API-Key: $API_KEY" $OM_API/api/2/content/clip-2
Response: 200 OK.
{
"additional_state_info": "tag:sports",
"additional_state_information": "tag:sports",
"content_duration_ms": "N/A",
"content_id": "clip-2",
"creation_time": "2026-11-02T10:00:00Z",
"delivery_uris": {
"dash": "/__cl/s:nas-1,ftp-1/__c/v/b/7/e/v_clip2_b7e1c0f94a2d3865e1f07c9a4b3d6a82/__op/dash-default/__f/manifest.mpd",
"hls": "/__cl/s:nas-1,ftp-1/__c/v/b/7/e/v_clip2_b7e1c0f94a2d3865e1f07c9a4b3d6a82/__op/hls-default/__f/index.m3u8",
"mss": "/__cl/s:nas-1,ftp-1/__c/v/b/7/e/v_clip2_b7e1c0f94a2d3865e1f07c9a4b3d6a82/__op/mss-default/__f/Manifest"
},
"modification_time": "2026-11-02T10:00:00Z",
"playable": false,
"service": "HTTP",
"source": "upload",
"state": "pending",
"tag": [
"sports"
],
"title": "Sports clip",
"upload": {
"location": "https://media.example.invalid/vod/clip-2.smil"
}
}
The list of storage systems is built when the content is created, from the systems that match at
that time. Known limitation: it does not shrink when fewer copies are made. This happens when
recorder.replication_factor is lower than the number of sources, and when one destination of an
upload fails. A recording with replication_factor: 1 and two sources has one copy, but its URLs
and its origin servers still name both storage systems, so a request that is routed to the system
without a copy finds nothing. After a failed copy, om-admin storage repair <account>/<content>
brings the copy back. Run it as the user edgeware, see the
CLI page.
Buffered live content
Buffered live content uses the channel group of its channel, written as cg:<group>. The content
name is the content_id. The Buffered live example above shows the full response
for the group default. For a channel in the group sports, with the content_id sports-1, the
HLS URL is:
/__cl/cg:sports/__c/sports-1/__op/hls-default/__f/index.m3u8
External content
External content uses s: and the part of the stored name after the @. The content name is the
whole stored name. The External example above shows the full response. The HLS URL
for the stored name 3b1f0c8e5d6a4f7b9c2d1e0f8a7b6c5d@trailers/trailer-1 is:
/__cl/s:trailers/trailer-1/__c/3b1f0c8e5d6a4f7b9c2d1e0f8a7b6c5d@trailers/trailer-1/__op/hls-default/__f/index.m3u8
DRM
When the content has a DRM content id, /__dci/<drm content id> comes after the output profile
and before /__f/. The id is the egress_encryption.drm_content_id of the same item, whether you
set it (api_defined), OM generated it (auto_generated) or it came from the channel
(inherited_from_channel).
curl -i -X POST $OM_API/api/2/content \
-H "X-Account-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content_id": "clip-3",
"title": "Protected clip",
"service": "HTTP",
"source": "upload",
"upload": {
"location": "https://media.example.invalid/vod/clip-3.smil"
},
"egress_encryption": {
"drm_content_id_source": "api_defined",
"drm_content_id": "drm-key-1"
}
}'
HTTP/1.1 201 Created
Content-Type: application/json
Etag: "5f1c2b3a-0000-4000-8000-000000000031"
Location: /api/2/content/clip-3
{
"additional_state_info": null,
"content_duration_ms": "N/A",
"content_id": "clip-3",
"creation_time": "2026-11-02T10:00:00Z",
"delivery_uris": {
"dash": "/__cl/s:nas-1,ftp-1/__c/v/1/4/d/v_clip3_14d093fbe5374e8c31d7a24ffa4d5fce/__op/dash-default/__dci/drm-key-1/__f/manifest.mpd",
"hls": "/__cl/s:nas-1,ftp-1/__c/v/1/4/d/v_clip3_14d093fbe5374e8c31d7a24ffa4d5fce/__op/hls-default/__dci/drm-key-1/__f/index.m3u8",
"mss": "/__cl/s:nas-1,ftp-1/__c/v/1/4/d/v_clip3_14d093fbe5374e8c31d7a24ffa4d5fce/__op/mss-default/__dci/drm-key-1/__f/Manifest"
},
"egress_encryption": {
"drm_content_id": "drm-key-1",
"drm_content_id_source": "api_defined"
},
"modification_time": "2026-11-02T10:00:00Z",
"playable": false,
"service": "HTTP",
"source": "upload",
"state": "pending",
"tag": [],
"title": "Protected clip",
"upload": {
"location": "https://media.example.invalid/vod/clip-3.smil"
}
}
The player URL of the HLS stream is:
http://repackager.example.invalid/__cl/s:nas-1,ftp-1/__c/v/1/4/d/v_clip3_14d093fbe5374e8c31d7a24ffa4d5fce/__op/hls-default/__dci/drm-key-1/__f/index.m3u8
When no delivery URIs are returned
The object is left out of the response, or the request fails, in these cases:
| Situation | Result |
|---|---|
The service of the content is not HTTP. OM creates only HTTP content, but the database can hold content that was created elsewhere | 200, no delivery_uris |
| A recording or an upload whose storage entry no longer exists | 200, no delivery_uris |
| Looking up the storage systems (for buffered live content, the channel) fails for another reason, such as a database error | The whole request fails with 500 and the tag internal-server-error. This applies to get, update and list |
| Buffered live content whose channel was deleted. Get and update | 400 with the message Bad request: Channel "news-1" does not exist |
| Buffered live content whose channel was deleted. List | 200, and the item has URLs with an empty group, such as /__cl/cg:/__c/news-1/__op/hls-default/__f/index.m3u8. They do not play |
For the missing channel on a get:
{
"tag": "bad-request",
"message": "Bad request: Channel \"news-1\" does not exist",
"details": null
}
Content state
state is not stored with the content. It follows the recording or upload behind the content:
| State | Meaning |
|---|---|
pending | The recording is waiting to start or has been handed to a recorder, or the upload has not started |
ongoing | The recording is in progress, or the upload is being downloaded, checked or stored |
done | The recording has finished, or the upload has completed. A recording is done when at least recorder.minimum_replication_factor copies are complete, also when OM cancelled the other copies |
error | The recording failed, or the upload failed or was cancelled |
N/A | Nothing runs behind the content: buffered_live and external content. Also a recording or upload whose job record does not exist |
A recording gives no reason for error. additional_state_info stays null, or holds only
the tags. The reason is in the logs of the scheduler and the recorder. See
When a Recording Ends in error on the
How-To page, and the Logging page.
An upload gives a short reason. The uploader stores a comment with the upload job, and
additional_state_info and additional_state_information show it. For an upload that failed:
{
"additional_state_info": "downloading failed: ingest reported status=error",
"additional_state_information": "downloading failed: ingest reported status=error",
"state": "error",
"upload": {
"location": "https://media.example.invalid/vod/missing.smil"
}
}
The comment starts with one of these texts. The details of a failed ingest are only in the log
of origin-uploader, see Creating an Upload on the
How-To page.
| Comment | State | Meaning |
|---|---|---|
downloading failed: <detail> | error | The ingest failed. The <detail> is general, for example ingest reported status=error, or the reason that the source was refused |
downloading failed: ingest was killed by a signal | error | A signal that OM did not send ended the ingest program |
downloading failed: ingest exited <n>; last log line: <line> | error | The ingest program exited with a code other than 0 and 2, and its last log line has no status=ok or status=error. A password in a URL in <line> is replaced by xxxxx, also when the URL has no user name, as in https://:secret@host/file |
validation failed: <detail> | error | The ingest ran, but the result is not valid, for example staged output holds no files |
<n> of <m> destinations succeeded, minimum_replication_factor=<k> | error | Fewer storage systems than uploader.minimum_replication_factor got a copy |
uploading partially done, failed on destinations: <systems> | done | The upload finished, but the copy to the named storage systems failed. See Several storage systems |
For example, an ingest that was killed, and an ingest that stopped on the placeholder license of
ew-vodingest (see ew-vodingest License):
downloading failed: ingest was killed by a signal
downloading failed: ingest exited 1; last log line: 2026-11-11T05:58:32Z FTL license check error: empty expiry
Known limitation: an upload that has tags shows the tags (tag:promo) in
additional_state_info, and the reason is not shown. Use the log of origin-uploader for it.
A recording may go from pending straight to done, without ongoing. A recording whose time
window is already in the catch-up buffer is recorded in seconds, and the state follows only when
the scheduler checks the recordings (every scheduler.status_polling_interval seconds, 30 by
default).
Get content
GET /api/2/content/{content_id}
curl -i -H "X-Account-API-Key: $API_KEY" $OM_API/api/2/content/match-1
Response: 200 OK with the content and its current entity tag in the ETag header. Use the tag
as If-Match when you update the content. For an unknown or deleted item the answer is
404 Not Found with the missing-resource error shown for channels. For buffered_live
content whose channel was deleted the answer is 400 Bad Request.
This is the answer for match-1 after the recording has finished. The state is done, the
item is playable, and modification_time is the time of the last change of the recording job,
which is later than the creation_time:
HTTP/1.1 200 OK
Content-Type: application/json
Etag: "9d4b7e12-5a3c-4c68-b0f1-2e8a6d1c3b57"
{
"additional_state_info": null,
"content_duration_ms": "7200000",
"content_id": "match-1",
"creation_time": "2026-11-02T10:00:00Z",
"delivery_uris": {
"dash": "/__cl/s:ftp-1/__c/r/2/6/0/r_match1_26045eed8babc290c1a16217f8163e47/__op/dash-default/__f/manifest.mpd",
"hls": "/__cl/s:ftp-1/__c/r/2/6/0/r_match1_26045eed8babc290c1a16217f8163e47/__op/hls-default/__f/index.m3u8",
"mss": "/__cl/s:ftp-1/__c/r/2/6/0/r_match1_26045eed8babc290c1a16217f8163e47/__op/mss-default/__f/Manifest"
},
"modification_time": "2026-12-01T22:06:09Z",
"playable": true,
"recording": {
"channel": "news-1",
"start_time": "2026-12-01T20:00:00Z",
"stop_time": "2026-12-01T22:00:00Z"
},
"service": "HTTP",
"source": "recording",
"state": "done",
"tag": [],
"title": "Evening match"
}
List content
GET /api/2/content
GET /api/2/content?source=recording&state=pending&title=match&offset=0&limit=50
Query parameters:
| Parameter | Values |
|---|---|
source | recording, upload, buffered_live or external |
service | HTTP |
state | pending, ongoing, done or error. This is the content state, and N/A is not accepted |
title | A part of the title |
offset | Position of the first item. Default 0 |
limit | Items per page. Default 100. At most 1000. A larger value is lowered to 1000 |
Deleted items are not listed. The title, state and service filters ignore case (state=PENDING
and service=http work). source is case sensitive: source=Recording gives 400.
curl -H "X-Account-API-Key: $API_KEY" \
"$OM_API/api/2/content?source=recording&state=pending&limit=1"
{
"content": [
{
"additional_state_info": null,
"content_duration_ms": "7200000",
"content_id": "match-1",
"creation_time": "2026-11-02T10:00:00Z",
"delivery_uris": {
"dash": "/__cl/s:ftp-1/__c/r/2/6/0/r_match1_26045eed8babc290c1a16217f8163e47/__op/dash-default/__f/manifest.mpd",
"hls": "/__cl/s:ftp-1/__c/r/2/6/0/r_match1_26045eed8babc290c1a16217f8163e47/__op/hls-default/__f/index.m3u8",
"mss": "/__cl/s:ftp-1/__c/r/2/6/0/r_match1_26045eed8babc290c1a16217f8163e47/__op/mss-default/__f/Manifest"
},
"modification_time": "2026-11-02T10:00:00Z",
"playable": false,
"recording": {
"channel": "news-1",
"start_time": "2026-12-01T20:00:00Z",
"stop_time": "2026-12-01T22:00:00Z"
},
"service": "HTTP",
"source": "recording",
"state": "pending",
"tag": [],
"title": "Evening match"
}
],
"next": "/api/2/content?limit=1&offset=1&source=recording&state=pending",
"total": 2
}
total is the number of items that match the filters, over all pages. next is present only
when more items remain, and it keeps the filters. See Pagination.
An invalid filter value gives 400 Bad Request:
curl -H "X-Account-API-Key: $API_KEY" "$OM_API/api/2/content?state=N/A"
{
"tag": "bad-repr",
"message": "Bad resource representation (syntax error): invalid state filter",
"details": null
}
The messages for the other filters are invalid source filter and invalid service filter.
Update content
PUT /api/2/content/{content_id}
Changes the title or the duration, changes the tags and storage name of external content, or reschedules a pending recording. The update uses the entity tag for optimistic locking.
Header:
If-Match(optional): the entity tag from an earlier get, create or update, as returned inETag(with or without the quotes). If it is not the current tag, the request fails with412 Precondition Failed.*matches any current tag, and several tags separated by commas match if one of them is current. WithoutIf-Match, the update is still refused with412if someone else changed the item after OM read it. A reschedule does not checkIf-Match, see Reschedule a pending recording.
Response: 200 OK with the updated content and the new entity tag in the ETag header.
Rename or change the duration
curl -i -X PUT $OM_API/api/2/content/promo-1 \
-H "X-Account-API-Key: $API_KEY" \
-H 'If-Match: "5f1c2b3a-0000-4000-8000-000000000008"' \
-H "Content-Type: application/json" \
-d '{"title": "Promo clip (final)", "content_duration_ms": 31000}'
HTTP/1.1 200 OK
Content-Type: application/json
Etag: "5f1c2b3a-0000-4000-8000-000000000009"
{
"additional_state_info": "tag:promo",
"additional_state_information": "tag:promo",
"content_duration_ms": "31000",
"content_id": "promo-1",
"creation_time": "2026-11-02T10:00:00Z",
"delivery_uris": {
"dash": "/__cl/s:ftp-1/__c/v/c/5/2/v_promo1_c52e8a07d91b34f6a8e0b7253c9d1f48/__op/dash-default/__f/manifest.mpd",
"hls": "/__cl/s:ftp-1/__c/v/c/5/2/v_promo1_c52e8a07d91b34f6a8e0b7253c9d1f48/__op/hls-default/__f/index.m3u8",
"mss": "/__cl/s:ftp-1/__c/v/c/5/2/v_promo1_c52e8a07d91b34f6a8e0b7253c9d1f48/__op/mss-default/__f/Manifest"
},
"modification_time": "2026-11-02T10:10:00Z",
"playable": false,
"service": "HTTP",
"source": "upload",
"state": "pending",
"tag": [
"promo"
],
"title": "Promo clip (final)",
"upload": {
"location": "https://media.example.invalid/vod/promo.smil"
}
}
title(string, optional): must not be empty. An empty title givesBad resource representation (syntax error): invalid title.content_duration_ms(integer, optional).- Every successful
PUTgives the content a new entity tag, also aPUTwith the body{}that changes nothing.
If the entity tag is old, the answer is 412 Precondition Failed. Read the content again and use
the new tag:
{
"tag": "precondition-failed",
"message": "etag mismatch",
"details": null
}
Update external content
For external content the body can also contain external and tag:
curl -X PUT $OM_API/api/2/content/trailer-1 \
-H "X-Account-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"title": "Trailer (HD)", "tag": ["promo", "hd"]}'
The response is the content with "title": "Trailer (HD)", "tag": ["promo", "hd"],
"additional_state_info": "tag:promo,hd" and a new ETag.
- If the
externalobject is present,storage_nameis required, and the same rules as for create apply. Renaming to a storage name that is already used gives409 Conflict. - A duration is applied only when it is at least 1000 ms. From 1 to 999 ms it is ignored. A value
of
0is refused with400 Bad resource representation (syntax error): content_duration_ms must be at least 1. - A tag list that is not empty replaces all tags. An empty list is ignored, so tags cannot be
removed. Tags must not contain
,or;. This rule is only forexternalcontent: for the other sources a comma splits a tag on create (see Create content). - For other sources
externalandtagare ignored.
Reschedule a pending recording
A body with a recording object reschedules a recording:
curl -i -X PUT $OM_API/api/2/content/match-1 \
-H "X-Account-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"recording": {"start_time": "2026-12-01T20:30:00Z", "stop_time": "2026-12-01T22:30:00Z"}}'
The response is 200 OK with the content, the new window length in content_duration_ms and a
new ETag. The recording object shows the new window:
HTTP/1.1 200 OK
Content-Type: application/json
Etag: "5f1c2b3a-0000-4000-8000-000000000002"
{
"additional_state_info": null,
"content_duration_ms": "7200000",
"content_id": "match-1",
"creation_time": "2026-11-02T10:00:00Z",
"delivery_uris": {
"dash": "/__cl/s:ftp-1/__c/r/2/6/0/r_match1_26045eed8babc290c1a16217f8163e47/__op/dash-default/__f/manifest.mpd",
"hls": "/__cl/s:ftp-1/__c/r/2/6/0/r_match1_26045eed8babc290c1a16217f8163e47/__op/hls-default/__f/index.m3u8",
"mss": "/__cl/s:ftp-1/__c/r/2/6/0/r_match1_26045eed8babc290c1a16217f8163e47/__op/mss-default/__f/Manifest"
},
"modification_time": "2026-11-02T10:10:00Z",
"playable": false,
"recording": {
"channel": "news-1",
"start_time": "2026-12-01T20:30:00Z",
"stop_time": "2026-12-01T22:30:00Z"
},
"service": "HTTP",
"source": "recording",
"state": "pending",
"tag": [],
"title": "Evening match"
}
start_timeandstop_timeare both optional. A value that you leave out keeps its current value. An empty object ("recording": {}) changes no times. Atitleorcontent_duration_msin the same body is still applied.- The new window is checked like a new recording: the stop must be after the start, and the start must not be before the start of the catch-up buffer. The duration is set to the length of the new window.
- Rescheduling is available only when
buffer_durationis set. Without it the request fails. If-Matchis not checked on this path: a stale or invented tag is accepted. The commandom content reschedulerequires-E, but the value has no effect. OM refuses the change with412if someone else changed the item at the same moment.- A reschedule fails with
412once the scheduler has claimed the recording. That happensscheduler.scheduler_window_sizeseconds (180 by default) before the recording is due to run, which is its stop time plusrecorder.buffered_schedule_delay.GETstill showspendingthen. Reschedule earlier than that. - A
recordingobject for content that is not a recording (upload,buffered_live) gives404 Not Found. Forexternalcontent it is ignored.
| Cause | Status | message |
|---|---|---|
The scheduler has already claimed the recording (scheduler_window_size seconds before it is due) while GET still shows pending | 412 | reschedule is supported only for pending recordings |
The item was changed by someone else at the same moment (a stale If-Match does not cause this) | 412 | etag mismatch |
| The recording has finished or failed | 400 | Bad request: Rescheduling of finished HTTP recordings is not supported |
| There is no catch-up buffer | 400 | Bad request: Rescheduling of live HTTP recordings is not supported |
| The new stop is not after the new start | 400 | Bad request: Stop time must be greater than start time |
| The new start is before the start of the buffer | 400 | Bad request: Cannot schedule HTTP recording to start before the start of the catch-up buffer. |
{
"tag": "precondition-failed",
"message": "reschedule is supported only for pending recordings",
"details": null
}
Delete content
DELETE /api/2/content/{content_id}
curl -i -X DELETE -H "X-Account-API-Key: $API_KEY" $OM_API/api/2/content/match-1
HTTP/1.1 204 No Content
A deleted item is no longer delivered and disappears from get and list. Content of every source
except external is only marked as deleted: a cleanup in the background stops a running recording
or upload and removes the files and the records, and until it has finished the item is listed by
content pending deletes. external content is removed at once, without a cleanup, and never
appears in content pending deletes.
An unknown content_id gives 404 Not Found. A 500 is returned when the cleanup could not be
queued. Known limitation: a second DELETE of a recording or upload while its cleanup is still
running (the first one or two seconds) answers 204 again, although GET already gives 404.
Content pending deletes
GET /api/1/content-pending-deletes
GET /api/1/content-pending-deletes?offset=0&limit=100
Lists the content of the account that is deleted but not yet cleaned up. The response has the
same shape and the same offset and limit paging as the content list (content, total and
next). It accepts only offset and limit.
curl -H "X-Account-API-Key: $API_KEY" $OM_API/api/1/content-pending-deletes
Each item has the full content representation. Shortened here:
{
"content": [
{
"content_id": "match-1",
"recording": {
"channel": "news-1",
"start_time": "2026-12-01T20:00:00Z",
"stop_time": "2026-12-01T22:00:00Z"
},
"source": "recording",
"state": "done",
"title": "Evening match",
"...": "..."
}
],
"total": 1
}
The state of an item is the state of its recording or upload job while the job record exists:
done or error, or pending for a job that has not run yet. Afterwards it is N/A, and the
recording or upload object is the string "N/A".
When the cleanup is done, the list is empty: {"content": [], "total": 0}. With working storage
that takes one or two seconds. If the cleanup cannot finish (a storage base directory that is
missing or not writable on the scheduler node, an FTP server that refuses the delete, files that
the services may not remove), the item stays in the list. OM retries up to 25 times, with a growing
delay, and there is no way to trigger a retry. origin-scheduler logs every failed attempt, see
When the Cleanup Does Not Finish.
Distributions
A distribution links a cache host name to the origin servers that serve it. The cache_host is
unique in the deployment.
The cache host name is also the cache name of the distribution. The Request Router matches it
against the Host header of a request to choose the account, see
Serving the Content of an Account through the Request Router.
The v1 routes call the field cache_host in their bodies, and the {cache_name} in their paths
holds the same value. The v2 list calls it cache_name:
| Routes | Field in the body |
|---|---|
POST /api/1/distribution and PUT /api/1/distribution/{cache_name} (request and response), GET /api/1/distribution/{cache_name}, GET /api/1/distribution | cache_host |
GET /api/2/distribution | cache_name |
Create a distribution
POST /api/1/distribution
cache_host(string, required).origins(array, optional): each origin needshost.portis 1 to 65535 and defaults to 80.timeoutis optional, 1 to 65535 seconds.
curl -i -X POST $OM_API/api/1/distribution \
-H "X-Account-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"cache_host": "cache.example.invalid",
"origins": [
{ "host": "origin-1.example.invalid", "port": 8080, "timeout": 10 },
{ "host": "origin-2.example.invalid" }
]
}'
Response: 201 Created with the distribution and its entity tag in the ETag header. The
representation leaves out port when it is 80 and leaves out a timeout that is not set:
HTTP/1.1 201 Created
Content-Type: application/json
Etag: "a1b2c3d4-0000-4000-8000-000000000001"
{
"cache_host": "cache.example.invalid",
"origins": [
{
"host": "origin-1.example.invalid",
"port": 8080,
"timeout": 10
},
{
"host": "origin-2.example.invalid"
}
]
}
Common errors:
| Cause | Status | message |
|---|---|---|
The cache_host exists | 409 | Data already exists. |
cache_host is missing | 400 | Bad resource representation (syntax error): cache_host is required |
| A port is outside 1 to 65535 | 400 | Bad resource representation (syntax error): origin port out of range |
A timeout is outside 1 to 65535 | 400 | Bad resource representation (syntax error): origin timeout out of range |
An origin has no host | 400 | Bad resource representation (syntax error): origin host is required |
| The body is not valid JSON | 400 | Bad resource representation (syntax error): unexpected EOF (for a truncated body) |
Get a distribution
GET /api/1/distribution/{cache_name}
{cache_name} is the cache_host of the distribution.
curl -i -H "X-Account-API-Key: $API_KEY" $OM_API/api/1/distribution/cache.example.invalid
Response: 200 OK with the same representation as above and the entity tag in ETag. An unknown
cache_host gives 404 Not Found.
Replace a distribution
PUT /api/1/distribution/{cache_name}
The body is the same as for create and replaces the cache host and the origins:
curl -i -X PUT $OM_API/api/1/distribution/cache.example.invalid \
-H "X-Account-API-Key: $API_KEY" \
-H 'If-Match: "a1b2c3d4-0000-4000-8000-000000000001"' \
-H "Content-Type: application/json" \
-d '{"cache_host": "cache.example.invalid", "origins": [{ "host": "origin-3.example.invalid", "port": 8080 }]}'
{
"cache_host": "cache.example.invalid",
"origins": [
{
"host": "origin-3.example.invalid",
"port": 8080
}
]
}
The response is 200 OK with the new entity tag in ETag. If If-Match is sent and is not the
current tag (quotes are ignored), or someone else changed the distribution meanwhile, the answer is
412 Precondition Failed with the message etag mismatch. Unlike for content, * is not a
wildcard here.
{cache_name} in the path is the current cache name. A different cache_host in the body renames
the distribution: the old cache name stops selecting the account and the new one starts to. If
another distribution already has the new name, the answer is 409 with Data already exists..
The request replaces the origins too, so an origins array that you leave out becomes empty. A
cache name that does not exist, or that belongs to another account, gives 404.
A distribution that has origin servers is not the default distribution of its account, see
om-admin account. If you replace the default distribution with
a body that has origins, the account has no default distribution until it has another distribution
without origin servers. om-admin account set-domain creates one.
Delete a distribution
DELETE /api/1/distribution/{cache_name}
curl -i -X DELETE -H "X-Account-API-Key: $API_KEY" $OM_API/api/1/distribution/cache.example.invalid
HTTP/1.1 204 No Content
List distributions
GET /api/1/distribution
GET /api/2/distribution
GET /api/2/distribution?limit=50&cursor=<cursor>
Both routes list the distributions of the account, with cursor and limit paging (default 100,
at most 1000). The v2 route returns:
curl -H "X-Account-API-Key: $API_KEY" $OM_API/api/2/distribution
{
"distributions": [
{
"cache_name": "cache.example.invalid",
"storage_id": "0192f6a2-7c3e-7d52-9c1b-3f2a8e5d4c10",
"origins": [
{
"host": "origin-3.example.invalid",
"port": 8080
}
]
}
]
}
storage_id is an identifier that is used as the delivery path prefix. In the v2 shape port is
always present. A distribution that has no origins, such as the one that om-admin account create
makes, is listed with "origins": []. The v1 list has the same distributions and next keys,
with each distribution in the v1 shape, which names the cache name cache_host:
curl -H "X-Account-API-Key: $API_KEY" $OM_API/api/1/distribution
{
"distributions": [
{
"cache_host": "cache.example.invalid",
"origins": [
{
"host": "origin-3.example.invalid",
"port": 8080
}
]
}
]
}
When more distributions remain, next holds the path and query of the next page, for example
/api/2/distribution?cursor=17&limit=50.
POST /api/2/distribution is not implemented:
{
"tag": "not-implemented",
"message": "Not implemented.",
"details": null
}
The status is 501 Not Implemented.
Pagination
OM uses two paging styles.
Content and content pending deletes: offset and limit. Use offset (default 0) and limit
(default 100, at most 1000). The response has total, the number of matching items. When more
items remain, next holds a link with the next offset and the same limit and filters. Follow
next until it is missing. A value of offset that is not a number or is negative, and a limit
that is not a number or is not positive, are ignored and the default is used. A query parameter
that OM does not know, such as foo=bar, has no effect, but it is copied into next. The same
holds for the content pending deletes list, which ignores filters such as state=pending.
curl -H "X-Account-API-Key: $API_KEY" "$OM_API/api/2/content?source=recording&limit=2"
{
"content": [ "..." ],
"next": "/api/2/content?limit=2&offset=2&source=recording",
"total": 5
}
Channels and distributions: cursor. Channels use a cursor and a fixed page size of 100.
Distributions use a cursor and an optional limit. The cursor is taken from the previous page.
Do not build it yourself. When more items remain the response has next, the path and query of
the next page. These responses have no total. A cursor that is not a positive number is ignored
and the first page is returned.
curl -H "X-Account-API-Key: $API_KEY" "$OM_API/api/2/channel?cursor=42"
Error Handling
Errors use HTTP status codes and a JSON body:
{
"tag": "missing-resource",
"message": "No resource available at given URI.",
"details": null
}
tag: error tag. It decides the HTTP status.message: description for people.details: always present. It isnullfor all errors that OM produces now.
Messages for a request that cannot be accepted start with a fixed text. A bad-repr message
starts with Bad resource representation (syntax error): and a bad-request message starts with
Bad request:, followed by a space and the reason.
The message of a 500 differs by place. It is Internal server error when OM cannot check the
API key, Internal error. for a failure in a channel, content or distribution request, and
internal server error (all lower case) for any other unexpected failure. Do not match on the
text, use the status and the tag.
| Tag | HTTP status | Typical causes |
|---|---|---|
unauthorized | 401 | Missing or wrong API key, operator key without X-Account, unknown account name |
bad-request | 400 | A request that is well formed but cannot be accepted: unknown channel, invalid recording window, buffered live content_id different from the channel, rescheduling not possible, inherited DRM id with no id on the channel |
bad-repr | 400 | Malformed JSON, missing or wrongly typed field, invalid content_id or channel_id, unsupported channel_type, service or source, invalid list filter, invalid storage_name |
missing-resource | 404 | The channel, content item or distribution does not exist, was deleted, or belongs to another account |
data-exists | 409 | A channel, content item (content_id or external storage name) or distribution (cache_host) already exists |
precondition-failed | 412 | The If-Match entity tag is not current (not for a reschedule), the item changed meanwhile, or the scheduler has already claimed the recording to reschedule |
internal-server-error | 500 | An unexpected failure, such as a database error, or a cleanup that could not be queued. The message depends on where it happens, see below |
not-implemented | 501 | POST /api/2/distribution |
service-unavailable-error | 503 | No storage or origin server is available for a new recording or upload |