Command Line Tools
om and om-admin command line toolsOverview
Origin Manager (OM) has three command line tools:
| Tool | Use it to | Talks to |
|---|---|---|
om | Manage channels and content | The Account API, over HTTP |
om-admin | Manage accounts, operators and storage, and look up content | The database and cache directly |
om-deploy | Install, configure, upgrade, downgrade, control and uninstall OM | The nodes, over SSH |
om and om-admin come with the origin-manager package, so they are on the nodes that have the
manager role. om-deploy is described on the Installation
page and is not covered here.
om and om-admin print their version when called with --version:
om --version
om x.y.z (commit <hash>, built <date>)
om
om is a client of the Account API. It sends the same requests as any other API client, so it
follows the same authentication and validation rules as the API.
It has only two groups, channel and content. It cannot manage distributions and it cannot
register external content: use the API for those.
Synopsis
om [-k api-key] [-H host] <group> <subcommand> [args]
Global flags
The global flags must come before the <group> argument.
| Flag | Environment variable | Default | Description |
|---|---|---|---|
-k, --api-key <key> | ACCT_CLI_APIKEY | none | Account API key |
-H, --host <host> | ACCT_CLI_HOST | localhost:9090 | Address of the Account API |
--version | Print the version and exit | ||
-h, --help | Print the usage text and exit with status 0 |
A flag on the command line wins over the environment variable. The default host uses port 9090,
the default port of the manager. If manager.account_api_port has another value, give the address
with -H or ACCT_CLI_HOST.
The host is written as [scheme://]host:port. Without a scheme om uses http://. Use an
https:// prefix when the API is served over TLS. Only the lowercase prefixes http:// and
https:// are recognized. With ftp:// or HTTP://, om puts http:// in front of the whole
text and fails with a DNS error. The API key is sent in the X-Account-API-Key header.
Set the address and key once for a shell session:
export ACCT_CLI_HOST=om-1.example.invalid:9090
export ACCT_CLI_APIKEY=3f2b8c1e-5d4a-4e7b-9a10-6c8d2e4f1a77
om channel list
om reads the same environment variables as the Convoy CLI. In a shell where you use both,
ACCT_CLI_HOST decides which Account API both tools talk to. The API key works for both, because
they share the accounts in MySQL.
Or give them on every call:
om -H https://om.example.invalid -k 3f2b8c1e-5d4a-4e7b-9a10-6c8d2e4f1a77 channel list
Without a key, om stops before it sends anything:
om: api key required: pass -k/--api-key or set ACCT_CLI_APIKEY
Output and errors
content list,channel listandchannel getprint a table.content getprints a detail view of one content item, see content.channel listandcontent listaccept--csvto print CSV with a header row instead. Both list commands follow thenextlinks of the API, so they print the whole collection, not only the first page.A table has a border line at the top and at the bottom, a header row, and a separator line under the header. Each column is as wide as its longest cell, but at least as wide as its header plus two characters. The text is left aligned, with one space on each side. A list with no items prints the borders, the header row and the separator line only.
CSV has the same columns as the table, without borders and colors. A list with no items prints the header row only.
On a terminal, the
Statecolumn ofcontent listis colored:erroris red, andpendingandongoingare yellow. There is no color when the output goes to a pipe or a file, with--csv, or when the environment variableNO_COLORis set to a value that is not empty.content getprints the lineetag: <value>as the last line of its output.omneeds the entity tag forcontent updateandcontent reschedule. Onlycontent updatechecks it.Commands that create or change something (
add,record,live,upload,rescheduleandupdate) print the response body, followed by anetag: <value>line when the response has anETagheader.channel deleteandcontent deleteprint one line,<id> is deleted, on standard output.<id>is the id that you gave.omprints the line when the API answers204. When the delete fails, nothing is printed on standard output, and the error goes to standard error as described in the next rule.Errors go to standard error as
om: <message>and the exit status is 1. When the API rejects a request, the message is<tag>: <message>, taken from the error body of the API:om: missing-resource: No resource available at given URI. om: unauthorized: Account API key is invalid om: precondition-failed: etag mismatchA response without an error body is shown as
http-error: <HTTP status text>.A request times out after 30 seconds. Redirects are not followed.
Running
omwithout a group, or with an unknown group, prints the usage text and exits with status 1.
A list with no items, as a table and as CSV:
om content list
+--------------+---------+-----------+---------+------------+---------+--------+
| Content ID | Title | Service | State | Playable | Start | Stop |
|--------------+---------+-----------+---------+------------+---------+--------|
+--------------+---------+-----------+---------+------------+---------+--------+
om content list --csv
Content ID,Title,Service,State,Playable,Start,Stop
Identifier rules
om checks identifiers before it sends a request, so an identifier can never change the request
path.
- A
channel_idmust not be empty and must not contain/,?,#,%or.. - A
content_idmust not be empty, must not contain/,?,#or%, and must not be.or... Acontent_idis a file name, so other dots are allowed (trailer.mp4).
om channel get news.1
om: invalid channel_id "news.1": character "." is not allowed
om content get .
om: invalid content_id ".": must not be a path-traversal segment
The API applies more rules when a channel or content item is created. Neither a channel_id nor
a content_id may be empty, start with __, contain a space or /, or be . or ... A
content_id must also be ASCII only. The API refuses . and .. with
400 Bad resource representation (syntax error): ID must not be ".", see the
API page.
channel
| Subcommand | Description |
|---|---|
channel get <channel_id> | Show one channel |
channel list [--csv] | List channels |
channel add <channel_id> -t TITLE [-g GROUP] [-T TYPE] | Create a channel |
channel delete <channel_id> | Delete a channel. Prints <channel_id> is deleted |
The columns of get and list are Channel ID, Title, Group, Type and Extra. Extra
shows the values of the object that belongs to the channel type (mbr_ts_multicast), as
key=value pairs separated by a comma and a space. A true or false value shows as True or
False. Extra is empty when the object is empty, which is what om channel add creates. It is
- when the channel has no such object.
Flags for channel add. The channel_id comes first, the flags follow it.
| Flag | Description |
|---|---|
-t, --title | Channel title. Required |
-g, --group | Channel group. Optional. The API uses default when it is left out |
-T, --type | Channel type. Default and only accepted value: mbr_ts_multicast |
Create a channel and look at it:
om channel add news-1 -t "News One" -g default
{
"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"
}
om channel get news-1
+--------------+----------+---------+------------------+---------+
| Channel ID | Title | Group | Type | Extra |
|--------------+----------+---------+------------------+---------|
| news-1 | News One | default | mbr_ts_multicast | |
+--------------+----------+---------+------------------+---------+
List all channels, as a table or as CSV:
om channel list
+--------------+------------+---------+------------------+---------+
| Channel ID | Title | Group | Type | Extra |
|--------------+------------+---------+------------------+---------|
| news-1 | News One | default | mbr_ts_multicast | |
| sports-1 | Sports One | sports | mbr_ts_multicast | |
+--------------+------------+---------+------------------+---------+
om channel list --csv
Channel ID,Title,Group,Type,Extra
news-1,News One,default,mbr_ts_multicast,
sports-1,Sports One,sports,mbr_ts_multicast,
Delete a channel. A successful delete prints <channel_id> is deleted on standard output. Getting
the channel afterwards is an error, which om prints on standard error:
om channel delete news-1
om channel get news-1
news-1 is deleted
om: missing-resource: No resource available at given URI.
Deleting a channel that does not exist fails in the same way. No is deleted line is printed, and
the exit status is 1:
om channel delete no-such-channel
om: missing-resource: No resource available at given URI.
A channel can be deleted while buffered live content with the same name still exists. That
content then answers content get and content update with an error, until you delete it too:
om: bad-request: Bad request: Channel "news-1" does not exist
content
| Subcommand | Description |
|---|---|
content get <content_id> | Show one content item and its entity tag |
content list [--csv] | List content |
content record <content_id> -t TITLE -c CHANNEL -b START -e STOP | Schedule a recording |
content live <content_id> -t TITLE -c CHANNEL | Create buffered live content |
content upload <content_id> -t TITLE -l LOCATION | Create content from an upload |
content reschedule <content_id> -E ETAG [-b START] [-e STOP] | Change the window of a recording |
content update <content_id> -E ETAG [-t TITLE] [-d DURATION_MS] | Change the title or the duration |
content delete <content_id> | Delete content. Prints <content_id> is deleted |
The columns of list are Content ID, Title, Service, State, Playable, Start and
Stop. Playable is yes or no. Start and Stop are the window of a recording, and - for
the other sources. om has no list filters, so use the API directly to filter. It has no
subcommand to register external content either. Use the API for that, see
Registering External Content.
Every create command sends the service HTTP, which is the only service OM accepts.
Flags. The content_id always comes first, the flags follow it.
| Command | Flag | Description |
|---|---|---|
record | -t, --title | Title. Required |
record | -c, --channel | Channel to record. Required |
record | -b, --start | Start time, RFC 3339. Required |
record | -e, --stop | Stop time, RFC 3339. Required |
live | -t, --title | Title. Required |
live | -c, --channel | Channel. Required. The content_id must be the same as the channel name |
upload | -t, --title | Title. Required |
upload | -l, --location | URL that the media is fetched from. Required. For http and https it must be the URL of a SMIL file, see Creating an Upload |
reschedule | -E, --etag | Entity tag from content get. Required by om, but the API does not check it |
reschedule | -b, --start | New start time, RFC 3339 |
reschedule | -e, --stop | New stop time, RFC 3339 |
update | -E, --etag | Entity tag from content get. Required |
update | -t, --title | New title |
update | -d, --duration | New duration in milliseconds |
reschedule needs at least one of --start and --stop. update needs at least one of
--title and --duration. An explicit -d 0 is sent to the API. The entity tag is sent in the
If-Match header. For content update, the API answers 412 if the content has changed since
you read the tag:
om: precondition-failed: etag mismatch
For content reschedule, om still requires -E, but the API does not compare the tag. A stale
or invented tag (--etag x) is accepted, and the window changes. The API answers 412 on a
reschedule only when the scheduler has already claimed the recording or when someone else changes
the content at the same moment, see
Rescheduling a Pending Recording.
If a required flag is missing, om says so before it sends anything:
om content record match-1 -t "Evening match"
om: content record: --title/-t, --channel/-c, --start/-b and --stop/-e are required
Schedule a recording. Times are RFC 3339:
om content record match-1 -t "Evening match" -c news-1 \
-b 2026-12-01T20:00:00Z -e 2026-12-01T22:00:00Z
{
"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"
}
etag: 5f1c2b3a-0000-4000-8000-000000000001
The response has a recording object with the channel and the window, and delivery_uris with
the delivery paths. See Content representation
and Delivery URIs.
Look at the content. om content get prints the content item as a list of lines, and the entity
tag as the last line:
om content get match-1
title: Evening match
service: HTTP
state: pending
playable: no
duration: 7200 seconds
created: 2026-11-02T10:00:00Z
modified: 2026-11-02T10:00:00Z
recording:
channel: news-1
start time: 2026-12-01T20:00:00Z
stop time: 2026-12-01T22: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
etag: 5f1c2b3a-0000-4000-8000-000000000001
These are the lines, in this order:
| Line | Meaning |
|---|---|
title: | The title |
service: | The service, always HTTP |
state: | The state, see Content state. A text in parentheses follows when the API has one in additional_state_information: the tags of the content, or the reason of a failed upload |
playable: | yes or no |
duration: | The duration in whole seconds, rounded down, or N/A seconds when it is not known |
created: and modified: | The times of creation and of the last change, in UTC. For a recording, modified: is the later of the last change of the content and of the recording job |
<source>: | The source (recording, upload, buffered_live or external), then one indented line for each value of the source object. A key is written with spaces instead of underscores. Only the <source>: line is printed when the source object is "N/A" or missing |
delivery URIs: | The dash:, hls: and mss: paths of the content. Printed only when the API returns delivery paths. They have no host name: put the address of your repackager in front of one of them |
drm: | The DRM content id and its source, as drm: <id> (<source>). Printed only for content with a DRM content id |
etag: | The entity tag. This is the last line, and om prints it only when the API sends an ETag header |
Change the title with the entity tag from the output:
om content update match-1 -E 5f1c2b3a-0000-4000-8000-000000000001 -t "Evening match (final)"
The response is the content with the new title, followed by the new tag:
{
"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:05: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 (final)"
}
etag: 5f1c2b3a-0000-4000-8000-000000000002
Move the window of a pending recording. This works only when the recorder uses a catch-up buffer,
and only until the scheduler claims the recording, scheduler.scheduler_window_size seconds
before it is due. The recording object in the response has the new window:
om content reschedule match-1 -E 5f1c2b3a-0000-4000-8000-000000000002 \
-b 2026-12-01T20:30:00Z -e 2026-12-01T22:30:00Z
{
"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 (final)"
}
etag: 5f1c2b3a-0000-4000-8000-000000000003
Create buffered live content and upload content:
om content live news-1 -t "News One live" -c 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"
}
etag: 5f1c2b3a-0000-4000-8000-000000000011
om content upload clip-1 -t "Trailer clip" -l https://media.example.invalid/vod/clip.smil
{
"additional_state_info": null,
"content_duration_ms": "N/A",
"content_id": "clip-1",
"creation_time": "2026-11-02T10:00:00Z",
"delivery_uris": {
"dash": "/__cl/s:nas-1,ftp-1/__c/v/d/a/4/v_clip1_da4f0f18c13b71a8baf988bb7878ba05/__op/dash-default/__f/manifest.mpd",
"hls": "/__cl/s:nas-1,ftp-1/__c/v/d/a/4/v_clip1_da4f0f18c13b71a8baf988bb7878ba05/__op/hls-default/__f/index.m3u8",
"mss": "/__cl/s:nas-1,ftp-1/__c/v/d/a/4/v_clip1_da4f0f18c13b71a8baf988bb7878ba05/__op/mss-default/__f/Manifest"
},
"modification_time": "2026-11-02T10:00:00Z",
"playable": false,
"service": "HTTP",
"source": "upload",
"state": "pending",
"tag": [],
"title": "Trailer clip",
"upload": {
"location": "https://media.example.invalid/vod/clip.smil"
}
}
etag: 5f1c2b3a-0000-4000-8000-000000000006
The location of an https upload is a SMIL file. A bare .mp4 URL is accepted, but the upload
then ends in error.
List the content:
om content list
+--------------+-----------------------+-----------+---------+------------+----------------------+----------------------+
| Content ID | Title | Service | State | Playable | Start | Stop |
|--------------+-----------------------+-----------+---------+------------+----------------------+----------------------|
| match-1 | Evening match (final) | HTTP | pending | no | 2026-12-01T20:30:00Z | 2026-12-01T22:30:00Z |
| news-1 | News One live | HTTP | N/A | yes | - | - |
| clip-1 | Trailer clip | HTTP | pending | no | - | - |
+--------------+-----------------------+-----------+---------+------------+----------------------+----------------------+
The same list as CSV:
om content list --csv
Content ID,Title,Service,State,Playable,Start,Stop
match-1,Evening match (final),HTTP,pending,no,2026-12-01T20:30:00Z,2026-12-01T22:30:00Z
news-1,News One live,HTTP,N/A,yes,-,-
clip-1,Trailer clip,HTTP,pending,no,-,-
The source lines of content get depend on the source. When the upload clip-1 has finished,
om content get shows its location. The API removes a password from the location, and it shows an
empty location when the location has no host name and contains @. So om never prints a
password, see Content representation:
om content get clip-1
title: Trailer clip
service: HTTP
state: done
playable: yes
duration: 31 seconds
created: 2026-11-02T10:00:00Z
modified: 2026-11-02T10:02:14Z
upload:
location: https://media.example.invalid/vod/clip.smil
delivery URIs:
dash: /__cl/s:nas-1,ftp-1/__c/v/d/a/4/v_clip1_da4f0f18c13b71a8baf988bb7878ba05/__op/dash-default/__f/manifest.mpd
hls: /__cl/s:nas-1,ftp-1/__c/v/d/a/4/v_clip1_da4f0f18c13b71a8baf988bb7878ba05/__op/hls-default/__f/index.m3u8
mss: /__cl/s:nas-1,ftp-1/__c/v/d/a/4/v_clip1_da4f0f18c13b71a8baf988bb7878ba05/__op/mss-default/__f/Manifest
etag: 5f1c2b3a-0000-4000-8000-000000000007
If an upload fails, the reason follows the state. Here clip-1 was created with a location whose
SMIL file missing.smil does not exist:
om content get clip-1
title: Trailer clip
service: HTTP
state: error (downloading failed: ingest reported status=error)
playable: no
duration: N/A seconds
created: 2026-11-11T12:53:58Z
modified: 2026-11-11T12:53:58Z
upload:
location: https://media.example.invalid/vod/missing.smil
delivery URIs:
dash: /__cl/s:nas-1,ftp-1/__c/v/d/a/4/v_clip1_da4f0f18c13b71a8baf988bb7878ba05/__op/dash-default/__f/manifest.mpd
hls: /__cl/s:nas-1,ftp-1/__c/v/d/a/4/v_clip1_da4f0f18c13b71a8baf988bb7878ba05/__op/hls-default/__f/index.m3u8
mss: /__cl/s:nas-1,ftp-1/__c/v/d/a/4/v_clip1_da4f0f18c13b71a8baf988bb7878ba05/__op/mss-default/__f/Manifest
etag: 5f1c2b3a-0000-4000-8000-000000000010
An upload that has tags shows the tags instead of the reason, for example done (tag:sports).
Buffered live content shows its channel. The state is N/A and the content is playable at once:
om content get news-1
title: News One live
service: HTTP
state: N/A
playable: yes
duration: N/A seconds
created: 2026-11-02T10:00:00Z
modified: 2026-11-02T10:00:00Z
buffered_live:
channel: news-1
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
etag: 5f1c2b3a-0000-4000-8000-000000000011
External content shows its stored storage name. Its tags show after the state, and it is never playable:
om content get trailer-1
title: Trailer
service: HTTP
state: N/A (tag:promo)
playable: no
duration: 90 seconds
created: 2026-11-02T10:00:00Z
modified: 2026-11-02T10:00:00Z
external:
storage name: 3b1f0c8e5d6a4f7b9c2d1e0f8a7b6c5d@trailers/trailer-1
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
etag: 5f1c2b3a-0000-4000-8000-000000000013
Content with a DRM content id has a drm: line, and the id is also part of the delivery paths:
om content get clip-3
title: Protected clip
service: HTTP
state: pending
playable: no
duration: N/A seconds
created: 2026-11-02T10:00:00Z
modified: 2026-11-02T10:00:00Z
upload:
location: https://media.example.invalid/vod/clip-3.smil
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
drm: drm-key-1 (api_defined)
etag: 5f1c2b3a-0000-4000-8000-000000000031
When the API has no job record for a recording or an upload, the state is N/A and only the
source name is printed. This is an upload without a job record, cut after the eighth line:
om content get clip-1 | head -8
title: Trailer clip
service: HTTP
state: N/A
playable: no
duration: N/A seconds
created: 2026-11-02T10:00:00Z
modified: 2026-11-02T10:00:00Z
upload:
Delete content. A successful delete prints <content_id> is deleted:
om content delete match-1
match-1 is deleted
om prints the line as soon as the API has accepted the delete. The cleanup of the files runs
afterwards, see Deleting Content. A second delete of
a recording or upload during its cleanup is answered with 204 again, so om prints the line
again.
An id that does not exist, or that is not valid, prints nothing on standard output. The error goes to standard error, and the exit status is 1:
om content delete no-such-content
om content delete a/b
om: missing-resource: No resource available at given URI.
om: invalid content_id "a/b": character "/" is not allowed
om-admin
om-admin works directly on the OM database (MySQL) and cache (Redis), without the Account API.
It needs no API key, but it must run on a manager node (a node that has the manager role), where
the tool is installed:
- It reads the etcd endpoints from
/etc/edgeware/origin-manager/etcd_hostsand takes the MySQL and Redis connection details and the storage settings from the OM configuration in etcd. It needssecret.keyon the node, so that it can decrypt the passwords. The key belongs toedgewareand has mode 0600. Runom-adminas root or as the useredgeware, because both can read the key andetcd_hosts. Runstorage repairasedgeware, see storage. - It exits with status 1 and an error message when etcd, MySQL or Redis cannot be reached, or when the topology has no Redis host.
om-admin synopsis
om-admin <group> <subcommand> [args]
om-admin --version
--version works only as the single argument. With no arguments, om-admin prints the usage
text to standard error and exits with status 2. Any other failure, including an unknown group or
subcommand and a wrong number of arguments, is printed as om-admin: <message> on standard error
and the exit status is 1. A command that works exits with status 0. One exception: account list
ignores extra arguments, so om-admin account list extra lists the accounts and exits with
status 0.
Arguments written as [account/]name take an optional account name before a slash. Without it
the default account is used. There are no flags other than those listed below.
account
| Subcommand | Description |
|---|---|
account create <name> [cachehost] [-N] | Create an account |
account delete <name> | Delete an account |
account rename <old> <new> | Rename an account |
account list [-v] | List accounts |
account set-domain <name> <domain> | Set the serving domain of the account, which is the cache name of its default distribution |
account set-default <name> | Make the account the default account of the whole system |
account reset-default | Remove the default account setting |
account set-param <name> <param> <value> | Set a parameter |
account show-param <name> <param> | Show a parameter |
account reset-param <name> token-secret | Reset the token secret |
An account can have several distributions. A distribution links a cache name to origin servers, see Distributions. The default distribution of an account is the first distribution of the account that has no origin servers. “First” means the one with the lowest id. A distribution with external origin servers is skipped. So a distribution that you give origin servers through the API stops being the default distribution of its account, and a distribution without origin servers can be the default distribution.
Data that Convoy wrote can also count as having no origin servers: origins that are missing or empty, or an origin without a host. The API does not create these.
An account that has no default distribution is listed with an empty domain= by account list -v.
account set-domain creates a default distribution for it.
Notes on the subcommands:
- An account name starts with a lowercase letter, followed by lowercase letters, digits, dots or
hyphens. Another name fails with
om-admin: account: invalid name. A name that exists fails withom-admin: account: already exists. account createalso creates a distribution without origin servers. This is the default distribution of the new account.cachehostis the cache name of that distribution. The Request Router matches the cache name against theHostheader of a request to choose the account. If you leavecachehostout, the cache name is the account name. Add-Nor--no-default-distribution(in any position) to skip the distribution. A cache name is unique in the deployment. If a distribution with that cache name already exists, the account is still created, without a distribution, and a warning is printed. The command prints the API key of the new account. See Serving the Content of an Account through the Request Router.account deletealso deletes all distributions of the account, so its cache host can be used for a new distribution afterwards. Delete the channels and content of the account before you delete the account.account listmarks the default account with*. The other lines start with two spaces. With-veach line also shows theapi-keyand thedomain, separated by tabs. Thedomainis the cache name of the default distribution of the account. It is empty when the account has no default distribution, for example when it was created with-N, or when all its distributions have origin servers. Warning:-vprints the API key of every account. Run it only where nobody else can read the output, and do not paste the output into tickets or chat.account set-domainrenames the default distribution of the account: it changes the cache name, and leaves its origin servers and the other distributions of the account as they are. If the account has no default distribution, it creates a distribution without origin servers with that cache name. The old cache name stops selecting the account. A name that another distribution already has fails withom-admin: account: already exists, and nothing is changed. If someone else changes the distribution afterom-adminhas read it and before it updates it, the command fails withom-admin: account: distribution was changed by someone else; retryand exits with status 1. Run it again. If the distribution is deleted in that time,set-domaincreates a new one.account renamechanges only the name of the account. The cache names of its distributions stay as they are.account set-defaultchanges the default account for the whole system. The Request Router serves every request whoseHostheader matches no cache name for the default account, so after the change all those requests see the channels and content of the new default account.- The parameters for
set-paramandshow-paramareapi-key,token-secretandenable-floating-sessions. An empty name ("") inshow-paramselects the default account. Onlytoken-secretcan be reset.
Create an account, and show it:
om-admin account create example-account
om-admin account list -v
created account "example-account" (api-key 3f2b8c1e-5d4a-4e7b-9a10-6c8d2e4f1a77)
example-account api-key=3f2b8c1e-5d4a-4e7b-9a10-6c8d2e4f1a77 domain=example-account
account create does not make the new account the default account, so its line starts with two
spaces. After om-admin account set-default example-account the line starts with * instead.
If a distribution with the cache host already exists, om-admin still creates the account and
prints a warning before the result:
warning: there was already a distribution called example-account; use 'om-admin account set-domain' to fix
created account "example-account" (api-key 3f2b8c1e-5d4a-4e7b-9a10-6c8d2e4f1a77)
Create an account without a default distribution, or with a named cache host:
om-admin account create other-account -N
om-admin account create third-account cache-3.example.invalid
created account "other-account" (api-key 9c2e7a40-1b6d-4f08-8d35-2a7f5e1c9b64)
created account "third-account" (api-key 0e5d1f93-7a24-4c6b-b1e8-4d9a3c7f2085)
other-account has no distribution, so no host name selects it. The cache name of third-account
is cache-3.example.invalid: the Request Router serves a request with the header
Host: cache-3.example.invalid for third-account.
account list -v shows an empty domain= for other-account, because it has no default
distribution:
om-admin account list -v
example-account api-key=3f2b8c1e-5d4a-4e7b-9a10-6c8d2e4f1a77 domain=example-account
other-account api-key=9c2e7a40-1b6d-4f08-8d35-2a7f5e1c9b64 domain=
third-account api-key=0e5d1f93-7a24-4c6b-b1e8-4d9a3c7f2085 domain=cache-3.example.invalid
account set-domain creates a default distribution for other-account. For third-account it
renames the default distribution that account create made:
om-admin account set-domain other-account other.example.invalid
om-admin account set-domain third-account cache-4.example.invalid
set domain of "other-account" to "other.example.invalid"
set domain of "third-account" to "cache-4.example.invalid"
A cache name that another distribution already has is refused, and nothing is changed. The command exits with status 1:
om-admin account set-domain third-account other.example.invalid
om-admin: account: already exists
If someone else changes the distribution at the same moment, for example with a PUT to the
Account API, the command fails with the message below and exits with status 1. Run it again:
om-admin: account: distribution was changed by someone else; retry
Other account commands and what they print:
om-admin account set-default example-account
om-admin account set-domain example-account media.example.invalid
om-admin account rename other-account spare-account
om-admin account set-param example-account api-key 6a1d9f27-3c58-4e0b-a7d4-8b2e5c1f9a30
om-admin account show-param example-account api-key
om-admin account reset-param example-account token-secret
om-admin account delete spare-account
om-admin account reset-default
default account is now "example-account"
set domain of "example-account" to "media.example.invalid"
renamed "other-account" to "spare-account"
set api-key on "example-account"
6a1d9f27-3c58-4e0b-a7d4-8b2e5c1f9a30
reset token-secret on "example-account"
deleted account "spare-account"
default account cleared
reset-param works only for token-secret. For another parameter, such as api-key, it fails with
om-admin: account: unknown param, although the parameter exists.
operator
| Subcommand | Description |
|---|---|
operator create <email> | Create an operator with a random API key |
operator delete <email> | Delete an operator |
operator list | List operators |
operator show <email> | Show one operator |
operator set config <email> <key> <value> | Set an operator preference |
operator set api-key <email> [key] | Set the API key. A new one is generated if you leave it out |
operator passwd <email> <password> | Set the password of the operator |
operator list and operator show print <email> with API key <key>, followed by one indented
<key> = <value> line for each preference, sorted by key. A new operator has no password until
you run operator passwd. operator set config prints set config <key> on "<email>", for
example set config theme on "admin@example.invalid".
om-admin operator create admin@example.invalid
om-admin operator passwd admin@example.invalid change-me
om-admin operator show admin@example.invalid
created operator "admin@example.invalid" with API key 7d1e4b92-0a6c-4f35-9e18-5c2a8d3b6f01
set password for "admin@example.invalid"
admin@example.invalid with API key 7d1e4b92-0a6c-4f35-9e18-5c2a8d3b6f01
Replace the API key of an operator. The old key stops working at once:
om-admin operator set api-key admin@example.invalid
api-key for "admin@example.invalid" is now b4e8c1d7-2f90-4a53-86d1-0c7e3a9f5b22
om-admin content
These commands only read the database. They do not change anything.
| Subcommand | Description |
|---|---|
content list [-n] | List the content of all accounts |
content show [-n] <[account/]file> | Show one content item |
content storage-name <[account/]file> | Print the internal storage name |
content external-name <storage_name> | Print the external name for a storage name |
list and show print one line for each item: file (title) for the default account, or
account/file (title) for other accounts. With -n or --no-resolve the account is printed for
the default account too. Content of an account that no longer exists shows the account
[ORPHANED account_id=<id>].
storage-name prints the internal name, which OM creates when the content is created and which
differs from the file name. external-name goes the other way: it prints file for the default
account and account/file for any other account.
om-admin content list
om-admin content show example-account/clip-1
om-admin content storage-name example-account/clip-1
om-admin content external-name v/d/a/4/v_clip1_da4f0f18c13b71a8baf988bb7878ba05
example-account/clip-1 (Trailer clip)
example-account/news-1 (News One live)
example-account/clip-1 (Trailer clip)
v/d/a/4/v_clip1_da4f0f18c13b71a8baf988bb7878ba05
example-account/clip-1
storage
All storage subcommands take the content as [account/]content and work on the storage name of
that content.
| Subcommand | Description |
|---|---|
storage inspect <[account/]content> | Show the storage entry and the cached origin servers |
storage assign <[account/]content> <system>... [-c cap] | Assign storage systems |
storage repair <[account/]content> | Repair the content, or copy it to more storage systems |
storage clean | Remove leftover storage directories of failed operations |
storage inspectprints the linesstorage,storage systems,origin servers,required capability,required roleandcache.cacheis the origin servers as stored in the cache. It is empty when nothing is cached.storage assignneeds at least one storage system.-cor--required-capability(in any position) sets the capability that origin servers must have. The default ishttp. The required role is not an option. It follows the source of the content.storage inspectshows the storage systems and origin servers that were assigned when the content was created. It does not show which copies exist. A content item keeps its assigned storage systems when a copy fails, so runstorage repairto bring the copy back. The order of the origin servers can differ from one content item to the next.storage repairmakes sure that the files are complete on every storage system that holds them and copies them to more storage systems until thereplication_factorof the source is reached.storage cleanremoves storage directories that no content refers to.assignandrepairrefuse some content and exit with status 1: external content (it has no storage entry), archived recordings, and content of the kindchannel. Buffered live content, the content that OM creates for a channel, is another kind and is not refused. See the limitation below.
om-admin storage inspect example-account/clip-1
storage: v/d/a/4/v_clip1_da4f0f18c13b71a8baf988bb7878ba05
storage systems: nas-1, ftp-1
origin servers: origin-1, origin-2
required capability: http
required role: upload
cache: origin-1,origin-2
om-admin storage assign example-account/clip-1 nas-1 ftp-1 -c http
runuser -u edgeware -- om-admin storage repair example-account/clip-1
om-admin storage clean
assigned "example-account/clip-1" to origin servers: origin-1, origin-2
repaired content "example-account/clip-1"
storage clean complete
The guard messages are:
om-admin: cannot assign storage for external content
om-admin: cannot repair external content
om-admin: cannot assign storage for a channel
om-admin: cannot repair a channel
om-admin: cannot assign storage for an archived recording
om-admin: cannot repair an archived recording
Known limitation: buffered live content. Buffered live content has no storage, but
storage assign and storage repair do not refuse it. They print success and create a storage
entry for it, with required role: buffered_live. The delivery URLs do not change and no files
are written. Do not run these commands on buffered live content. The entry is removed when the
content is deleted.
Known limitation: do not run storage repair as root. storage repair writes the files with
the identity of the user that runs it. Run as root, it creates the repaired copy, and any new hash
directory, owned by root (tested). The services run as edgeware, so a later delete of that content
fails with permission denied and the item stays in the pending deletes list. The root-owned
directory also blocks later content that hashes to it. Run the command as edgeware instead:
runuser -u edgeware -- om-admin storage repair example-account/clip-1
runuser -u edgeware -- runs the same om-admin program under another user. The base directory of
every local storage system must exist on this node and be writable by edgeware.
To recover from a repair that ran as root, remove the root-owned files and directories by hand, or
change their owner to edgeware. See
When the Cleanup Does Not Finish.
om-admin channel
| Subcommand | Description |
|---|---|
channel assign <[account/]channel> <origin>... | Assign a channel to origin servers |
channel assign needs at least one origin server. It finds the channel and the content that has
the same name as the channel, and assigns the origin servers to the storage of that content.
om-admin channel assign example-account/news-1 origin-1
assigned channel "example-account/news-1" to origin servers: origin-1