Metadata Commands

Manage tags, collections, related content, and custom properties on assets using the Nomad Media CLI.

Metadata Commands

These commands manage tags, collections, related content links, and custom properties on assets.

All commands accept assets by --id, --url (bucket::object-key), or --object-key (requires default bucket to be set with set-default-bucket).

Tag Commands

list-asset-tags

Lists all tags on an asset.

Options:

  • --id: Asset ID.
  • --url: Nomad Media URL (bucket::object-key).
  • --object-key: Object-key (requires default bucket).

add-asset-tag

Adds a tag to an asset. Provide either --tag-id or --tag-name. If --tag-id is provided, --tag-name is ignored.

Options:

  • --id: Asset ID.
  • --url: Nomad Media URL (bucket::object-key).
  • --object-key: Object-key (requires default bucket).
  • --tag-id: ID of an existing tag.
  • --tag-name: Name of the tag. If a new tag is created, the new tag ID is returned.

remove-tag

Removes a tag from an asset.

Options:

  • --id: Asset ID.
  • --url: Nomad Media URL (bucket::object-key).
  • --object-key: Object-key (requires default bucket).
  • --tag-id (required): ID of the tag to remove.

Collection Commands

list-asset-collections

Lists all collections an asset belongs to.

Options:

  • --id: Asset ID.
  • --url: Nomad Media URL (bucket::object-key).
  • --object-key: Object-key (requires default bucket).

add-asset-collection

Adds an asset to a collection. Provide either --collection-id or --collection-name. If --collection-id is provided, --collection-name is ignored.

Options:

  • --id: Asset ID.
  • --url: Nomad Media URL (bucket::object-key).
  • --object-key: Object-key (requires default bucket).
  • --collection-id: ID of an existing collection.
  • --collection-name: Name of the collection. If a new collection is created, the new collection ID is returned.

remove-asset-collection

Removes an asset from a collection.

Options:

  • --id (required): Asset ID.
  • --url: Nomad Media URL (bucket::object-key).
  • --object-key: Object-key (requires default bucket).
  • --collection-id (required): ID of the collection.

Related Content Commands

list-asset-related-content

Lists all related content records for an asset.

Options:

  • --id: Asset ID.
  • --url: Nomad Media URL (bucket::object-key).
  • --object-key: Object-key (requires default bucket).

add-asset-related-content

Links related content to an asset.

Options:

  • --id (required): Asset ID.
  • --url: Nomad Media URL (bucket::object-key).
  • --object-key: Object-key (requires default bucket).
  • --related-content-id: ID of the related content.

remove-asset-related-content

Removes a related content link from an asset.

Options:

  • --id (required): Asset ID.
  • --url: Nomad Media URL (bucket::object-key).
  • --object-key: Object-key (requires default bucket).
  • --related-content-id (required): ID of the related content to remove.

Properties Commands

add-asset-properties

Adds or updates custom metadata properties on an asset. To remove a property, set its key to null in the JSON.

Options:

  • --id (required): Asset ID.
  • --name (optional): Display name of the asset.
  • --date (optional): Display date of the asset.
  • --properties (optional): Custom properties in JSON format. Example: ''{key: value}''