CLI command
content rights
The asset rights register: licences, likeness consents and music rights recorded per asset, and the check that keeps a blog post or a queued social or video post whose assets' rights have lapsed from going out.
Invocation#
echo-cli content rights list [--asset <url>]
echo-cli content rights record --asset <url> --kind <licence|likeness_consent|music_rights> --holder <who> --reference <what it rests on> (--expires-at <time> | --perpetual true) --by <name>
echo-cli content rights revoke --id <right-id> --by <name>
echo-cli content rights erase --id <right-id>
echo-cli content rights check --post <post-id>Inputs and output#
list writes every right, newest first: id, asset_url, kind, holder, reference, expires_at (null when perpetual), recorded_by, recorded_at, revoked_by and revoked_at. record, revoke and erase write the right. check writes post_id and assets: per address the post's body embeds (markdown images and src attributes), state (in_force, lapsed or unrecorded), in_force (the rights in force) and lapsed (each right with lapsed_at and how: expired, or revoked by whom).
State effect#
The verbs call Echo Web's authenticated /api/analytics/asset-rights with ECHO_INTERNAL_BEARER at ECHO_WEB_BASE_URL; the Asset rights section of the blog admin and of Echo Desktop's GEO screen do the same, and echo-mcp runs them as echo_asset_rights, echo_asset_right_record, echo_asset_right_revoke, echo_asset_right_erase and echo_asset_rights_check. Rights are stored in asset_rights by the address a piece embeds the asset at; a right is in force until it expires or is revoked. revoke keeps a right that was given and withdrawn, with who withdrew it; erase deletes a right recorded in error. Publishing a blog post, by the blog admin or an approved publish_blog_post request, is refused while an asset its body embeds has rights recorded and none in force: "not published: an embedded asset has no right in force: <asset>: <kind> <reference> expired at <time> | …". A social or video post in the content queue is checked the same way by its media_url and thumbnail_url when it is queued scheduled, or moved to scheduled or published, through /api/content-queue: "not scheduled: <asset>: <kind> <reference> expired at <time>" (or "not published: …"), a conflict. echo-cli content evergreen requeue requeues nothing when a due post's media has none in force and answers "evergreen post <id> was not requeued: <asset>: …". An asset with no right recorded is answered as unrecorded and does not stop publishing.
Refusals#
- A wrong invocation is refused before anything is sent: "content rights takes …; got <word>", "content rights <verb> does not take <flag>; …", "<flag> needs a value", "content rights <verb> needs <flag>" and "--perpetual takes only true; got <word>".
- Echo Web answers a bad request with "asset_url is required: the address a piece embeds the asset at", "kind must be one of licence, likeness_consent, music_rights; got <kind>", "holder is required: who holds or gave the right", "reference is required: what the right rests on, such as a licence id or a signed release", "give either expires_at (when the right ends) or perpetual: true (it does not end), not both and not neither", "expires_at must be an ISO date or time; got <value>", "recorded_by is required: an internal caller has no signed-in user, so it names who is acting" (and revoked_by), "id is required: the right to revoke, as echo-cli content rights list shows it", "id is required: the right recorded in error, as echo-cli content rights list shows it" or "right <id> was already revoked by <who> at <time>"; and not found with "no asset right has id <id>" or "no blog post has id <id>". The command prints Echo Web's sentence and exits 1.