elv
elv is Eluvio's command-line client for the Content Fabric. See Clients for installation instructions.
Eluvio Content Fabric command-line client.
Global options
| Option | Type | Required | Description |
|---|---|---|---|
--config | string | path to a configuration file | |
--config-url | string | content fabric configuration url | |
--confirmation-key | string | hex of an ephemeral confirmation key (with --token only) | |
--debug, -d | bool | print debug logs | |
--eth | string | url of blockchain | |
--format | bool | output result as formatted json | |
--help, -h | bool | show help and exit | |
--log-level | string | log level: debug | info | warn | error Default: error | |
--no-auth-cache | bool | disable persistent cache of authorizations | |
--passphrase, -p | string | passphrase to decrypt wallet | |
--secret, -x | string | hex encoded secret key | |
--show-steps | bool | show intermediary results (if any) after execution | |
--space | id | QSpace ID | |
--token | string | externally provided auth token. Commands requiring access to the blockchain do not support this flag | |
--token-plain | bool | run commands with a plain auth token (without blockchain transaction). Commands requiring access to the blockchain do not support this flag | |
--url | string | url of the fabric | |
--version, -v | bool | print version information and exit | |
--wallet | string | path to wallet file |
Commands
Help and Configuration
| Command | Description |
|---|---|
commands | Print all commands |
config | Output the configuration |
config generate | Generate a sample configuration file |
config get | Query the config endpoint of the fabric |
config set | Write the cli configuration to the provided file |
config show | Show the cli configuration |
Content Fabric Operations
| Command | Description |
|---|---|
content | Content management commands |
content bitcode | Bitcode related commands |
content bitcode call | Call the given bitcode function and return its result. |
content bitcode rep | Content Representation |
content bitcode set-object | Call the bitcode function 'setObject' |
content commit | Commit the finalized content hash provided to the blockchain. |
content create | Create a new content object |
content delete | Delete a version of a content object. |
content describe | Retrieve information about the given content object. |
content edit | Edit a content (same as versions/create) |
content export | Export the given content object to files. |
content finalize | Finalize the draft content object identified by the provided content write token. |
content groups | Content group commands |
content groups add | Associate the content object with the given groups. Any existing groups are retained. |
content groups get | Retrieve the groups the given content object is associated with. |
content groups remove | Remove groups from the given content object. |
content groups set | Associate the content object with the given groups. The specified groups replace any existing groups. |
content import | Import the given content object from previously exported files. |
content kms | Content kms details |
content kms set | Set the content kms |
content kms show | Retrieve content kms |
content library | Retrieve library of the given content object(s). |
content list | List finalized contents within the given content library. |
content meta | Content metadata commands |
content meta auto-update | Update the object hierarchy defined through absolute links in metadata. |
content meta delete | Delete the existing metadata of the given content object. |
content meta get | Retrieve the user-defined metadata associated with the given content object. |
content meta graph | Retrieve information about the object hierarchy defined through absolute links in metadata. |
content meta merge | Merge the provided metadata with the existing metadata of the given content object. |
content meta set | Replace the existing metadata of the given content object. |
content owner | Content owner commands |
content owner key | Content owner encryption key commands |
content owner key for-user | Encrypt content owner encryption key for another user |
content owner key get | Retrieve content owner encryption key |
content owner key remove | Remove content owner encryption key |
content owner key set | Set content owner encryption key |
content owner show | Retrieve content owner |
content part | Content part commands |
content part append | Append data or finalize part |
content part create | Create a new draft part. |
content part delete | Delete the given part. |
content part describe | Retrieve information about the given part. |
content part list-all | Retrieve information on all content parts. |
content part proof | Retrieve the proofs associated with the given part. |
content part read | Download the given part as a byte stream. |
content part read-all | Download all parts of the content into the given folder. |
content part write | Upload binary data into a new content part and finalize the part in a single call. |
content policy | Auth policy commands |
content policy check | Check the auth policy configuration of the given content object. |
content policy contract | Commands for auth policy configuration in contract metadata. |
content policy contract check | Check the auth policy from the metadata of the given content object's contract'. |
content policy contract remove | Remove the auth policy from the metadata of the given content object's contract. |
content policy contract set | Set the auth policy in the metadata of the given content object's contract. |
content policy delegate | Policy delegate commands |
content policy delegate check | Check the content for policy delegation. |
content policy delegate remove | Remove the policy delegation for the given content object. |
content policy delegate set | Set the given policy object ID as delegate on the provided content object. |
content policy eval | Auth policy evaluation commands |
content policy eval case | Auth policy sequence evaluator |
content policy eval ctx-print | Print eval context |
content policy eval rule | Auth policy rule evaluator |
content policy eval seq | Auth policy sequence evaluator |
content policy remove | Remove the auth policy from the given content object. |
content policy set | Set the given auth policy on the provided content object. |
content profile | Content profile commands |
content profile get | Retrieve content profile |
content profile set | Set the content profile |
content query-fields | Content query field commands |
content query-fields add | Add the given query fields. Any existing fields are retained. |
content query-fields get | Retrieve the query fields of the given content object. |
content query-fields remove | Remove query fields from the given content object. |
content query-fields set | Set the given query fields. They replace any existing fields. |
content signed-link | Commands for signed-links |
content signed-link block | Block signed links targeting the provided content for the given container. |
content signed-link create | Sign a link for credential-free embedding in another content. |
content signed-link disable | Disable signed links for the given content object. |
content signed-link enable | Enable signed links for the given content object. |
content signed-link settings | Show the signed links settings for the given content object. |
content signed-link unblock | Unblock signed links targeting the provided content for the given container. |
content status | Retrieve status information on the given content object. |
content struct | Retrieve content structure of the given content object. |
content tags | Content tag commands |
content tags add | Add the given tags to the content object. Any existing tags are retained. |
content tags get | Retrieve the tags of the given content object. |
content tags remove | Remove tags from the given content object. |
content tags set | Associate the content object with the given tags. The specified tags replace any existing tags. |
content token | Authorization token commands |
content token create | Create authorization token for a content |
content token create anonymous | Create an anonymous authorization token |
content token create plain | Creation of a plain signed authorization token |
content token create-ephemeral-key | Generate an ephemeral key to use for confirmation with plain or editor signed tokens |
content token decode | Decode an access token |
content token sign | Sign an access (editor-signed) token |
content unique-groups | Content unique group commands |
content unique-groups add | Associate the content object with the given unique groups. Any existing groups are retained. |
content unique-groups get | Retrieve the unique groups the given content object is associated with. |
content unique-groups remove | Remove unique groups from the given content object. |
content unique-groups set | Associate the content object with the given unique groups. The specified groups replace any existing unique groups. |
content user | User related commands |
content user permission | Retrieve permission for the given user or group on the given content |
content versions | Content versions commands |
content versions create | Create a new version of the content with the given ID or Hash |
content versions delete | Delete the given content and all of its versions. |
content versions list | List all versions of the content with the given ID. |
content versions stat | Describe the version of the content with the given hash. |
content-type | Content type management commands |
content-type create | Create a new content type object |
fjob | Creation and management of files jobs |
fjob add | Add more file operations to a files job |
fjob create | Create a files jobs |
fjob download | Download file data |
fjob finalize | Finalize files-job |
fjob force-complete | Force completion of a files job |
fjob resume | Resume files jobs |
fjob status | Retrieve the detailed status of a files job |
fjob upload | perform uploads and retrieve upload ids or their status |
fjob upload do | Perform an upload job |
fjob upload ids | Retrieve upload jobs ids |
fjob upload status | Retrieve status of an upload job |
fjob v1 | Use the now deprecated v1 api to perform files-upload |
fjob v1 create | Create an upload job |
fjob v1 status | Status an upload job |
fjob v1 upload | Perform an upload job |
group | Group management commands |
group create | create access control group |
group permission | Group permissions related commands |
group permission get | List content objects and their associated permission for the given group |
group permission set | Set group permission for the given content object. |
library | Creation and management of content libraries |
library create | Create library object in content space |
library delete | Delete library from content space |
library describe | Describe library |
library for-node | Create a library and transfers its ownership to a node |
library kms | kms utilities for library |
library kms set | Set library kms address, can be done only by a library owner |
library kms show | Show kms information of the library |
library meta | Manage library metadata |
library meta get | Retrieve library metadata |
library meta update | Update library metadata |
library token | Create authorization token for a library |
space | Space commands |
space bitcode | Publish bitcode to fabric |
space create | Create a content space |
space kms | Kms management |
space kms add | Add the locators for the kms id. Optionally set its public key if provided. |
space kms list | List the locators and public key for the provided kms id in the content space. |
space kms remove | Remove the provided locators for the kms id. Removes its public key if all the locators are removed |
space kms set | Set the KMS for the space. |
space meta | Manage metadata of content space |
space meta get | Retrieve metadata of content space |
space meta update | Update metadata of content space |
space node | Manages nodes in content space |
space node add | Add a fabric node with its api endpoints and library in content space |
space node list | List the fabric node(s) from content space |
space node listapi | List the fabric nodes through the node API |
space node remove | Remove fabric nodes from content space |
space node set | Set the nodes private or public |
Ethereum Operations
| Command | Description |
|---|---|
eth | Ethereum operations |
eth contract | Contract retrieves binary and checksum from contract address |
eth id | Compute address and node id from private key |
eth info | Show information about the address or id provided |
eth keyfile | Keystore file commands |
eth keyfile decrypt | Decrypt Keystore file |
eth keyfile import | Import a private key into the keystore, encrypting it with the given passphrase. |
eth keyfile new | Create new keyfile in keystore path provided. |
eth keyfile recrypt | Re-encrypt Keystore file |
eth kms | Retrieves id and public key of kms at specified url |
Specialized Tools
| Command | Description |
|---|---|
cloud | Cloud commands |
cloud presign | Create a pre-signed url to the given file |
files | Files Content management commands |
files download | Download a file |
files ingest | Ingest content from remote storage or cloud |
files jobs | List files jobs and status |
files jobs status | Retrieve the detailed status of a files job |
files list | List files |
files presigned | Presigned URLs files commands |
files presigned create | Create a pre-signed url to the given file |
files presigned ingest-copy | Ingest-copy content from a presigned URL |
files presigned reference | Reference content from a pre-signed URL |
files presigned resume | Resume content ingest from a pre-signed URL |
files reference | Reference content from remote storage or cloud |
files status | Upload job(s) status |
files upload | Upload content from a list of files or folders |
live | Publish new live content |
submit | Submission of content objects |
Media Related Tools
| Command | Description |
|---|---|
media | Media commands |
media drm | Retrieve and decrypt media DRM keys |
Others
| Command | Description |
|---|---|
completion | Generate completion script |
testing | Testing functions |
testing content | Testing functions for content |
testing content access | Test accessing a content already deployed in the fabric |
testing content control | Test access and control of a deployed content |
testing content deploy | Deploy a content then access and optionally control it |
testing parts | Testing functions for content parts |
testing parts rw | Upload and download parts |
tools | Miscellaneous helper commands |
tools decode | Decode the given items. |
Command reference
commands
elv commands
Print all commands in a hierarchical tree
Options
| Option | Type | Required | Description |
|---|---|---|---|
--long | bool | print commands and flags |
Examples
print all commands:
elv commands
print all commands and their flags:
elv commands --long
config
elv config
Output the cli configuration: either --sample=true or --actual=true must be specified
Subcommands
config generate
elv config generate
Generate a sample configuration file
Examples
elv config generate
config get
elv config get
Query the config endpoint of the fabric.
The command is especially useful when used together with the --config-url flag.
By default the command merges the result of the call into the cli configuration.
To see the raw result of the call use the --no-merge flag.
Options
| Option | Type | Required | Description |
|---|---|---|---|
--no-merge | bool | don't merge with the current cli config - instead show the api result |
Examples
elv config get
elv config get --config-url https://demov3.net955210.contentfabric.io/config?qspace=demov3&elvgeo=eu-west-south --no-merge
elv config get --config-url https://host-216-66-89-94.contentfabric.io?qspace=demov3&self --format
config set
elv config set
Write the cli configuration to the provided file
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
file | string | path to config file |
Examples
elv config set <file_path>
config show
elv config show
Show the cli configuration based on existing config and command line parameters or flags
Examples
elv config show
content
elv content
Content management commands
Subcommands
content bitcodecontent commitcontent createcontent deletecontent describecontent editcontent exportcontent finalizecontent groupscontent importcontent kmscontent librarycontent listcontent metacontent ownercontent partcontent policycontent profilecontent query-fieldscontent signed-linkcontent statuscontent structcontent tagscontent tokencontent unique-groupscontent usercontent versions
content bitcode
elv content bitcode
Bitcode related commands
Subcommands
content bitcode call
elv content bitcode call <content id, hash or write token> <function name> <key-value pairs> [destination file]
Call the given bitcode function and return its result.
The function name parameters are specified as key-value pairs in json
that can be specified as a json string or @filename to read it from a file.
The bitcode function will receive as first parameter the QLib ID, as second parameter the content hash, and then the function name and key-value pairs.
If the function call returns nothing, the request is HTTP answered with a 200 status code and no body
Otherwise the function is expected to return the content type as first return argument, and additional information according to the content type.
Two types are supported: application/octet-stream and application/json
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
fn-path | string | ✓ | name and path of the function to run |
params | string | ✓ | arguments of the function or body for a POST |
dest | path | path to the destination |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--finalize | bool | optionally finalize the draft (done automatically when no write token is provided) | |
--library, -l | id | library id of the content object | |
--no-edit | bool | keep content and do not create a new version of the content | |
--no-progress | bool | don't show progress during transfer | |
--post | bool | use post for calling the POST method | |
--qid, -q | id | id of the content object | |
--timeout | duration | timeout for the bitcode call Default: 30s |
Examples
elv content bitcode call tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A funcA @meta.json destination_file
elv content bitcode call tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A funcA @meta.json destination_file
content bitcode rep
elv content bitcode rep <content id, hash or write token> <function path> <args or body> [destination file]
Call to a representation of the content object by calling its associated bitcode.
The path parameter is passed to the bitcode as well as the request body parameter.
Arguments or the the request body for a POST can be specified as a string or @filename to read it from a file.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
rep-path | string | ✓ | path to the representation |
params | string | ✓ | arguments of the function or body for a POST |
dest | path | path to the destination |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--accept | string | accept header. | |
--decryption-mode | string | decryption mode: 'none' | 'reencrypt' | 'decrypt' | |
--library, -l | id | library id of the content object | |
--no-progress | bool | don't show progress during transfer | |
--post | bool | use post for calling the POST method | |
--qid, -q | id | id of the content object |
Examples
elv content bitcode rep tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A funcA/path @params.json destination_file
elv content bitcode rep tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A funcA/path "" destination_file
elv content bitcode rep tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A path @body.json destination_file --post
content bitcode set-object
elv content bitcode set-object <content id, hash or write token> <metadata>
Call the bitcode function 'setObject'
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
meta | string | ✓ | arguments of the function |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content bitcode set-object tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A @meta.json
content commit
elv content commit <content hash> [timeout]
Commit the finalized content hash provided to the blockchain.
Use flag --force to clear a pending hash.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhash | hash | ✓ | hash of the content object |
timeout | duration | timeout to wait for content published |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--force | bool | clears pending hash | |
--library, -l | id | library id of the content object |
Examples
elv content commit hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk
elv content commit hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk 30s
content create
elv content create <library id>
Create a new content object and a draft on the fabric
metadata can be specified as a json string or @filename to read it from a file
The new content can be initialized using 'copy-from': with the metadata and parts of the source content object.
If encryption is requested and the copied content is encrypted, no new encryption key are created and the new content
will use the same KMS as the source content.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
library | id | ✓ | library id to create content object |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--copy-from | hash | hash of a source content object | |
--encrypt | bool | set content encryption keys (option available only when creating draft) Default: true | |
--finalize | bool | finalize the draft immediately | |
--force-copy-from | bool | used with --copy-from to force the copy even if not owner | |
--kms-id | id | optional id of the KMS for the content | |
--meta | string | arbitrary content metadata | |
--no-draft | bool | do not create a draft on the fabric | |
--object-type | string | object-type e.g. 'space' or 'node' or 'group' | |
--qid, -q | id | optional id of the content object | |
--qtype | hash | content-type hash | |
--query-fields | json | query fields to set Default: null | |
--unique-groups | json | unique groups to set Default: null |
Examples
elv content create ilib1Bhh3pU9gLXZiNDL6PEZuEP5ri
elv content create ilib1Bhh3pU9gLXZiNDL6PEZuEP5ri --qid iq__1Bhh3pU9gLXZiNDL6PEZuEP5ri
elv content create ilib1Bhh3pU9gLXZiNDL6PEZuEP5ri --copy-from hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk --meta @meta.json --qtype hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBGA --qid iq__1Bhh3pU9gLXZiNDL6PEZuEP5ri
content delete
elv content delete <content id, hash or write token>
Delete a version of the content object in the provided library. The exact version to delete is determined from the content identifier that is provided:
content id: deletes the latest version of the content
hash: deletes the version with this content hash
write token: deletes the draft with this write token
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content delete tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A
content describe
elv content describe <content id, hash or write token>
Retrieve information about the given content object.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--details | bool | retrieve detailed information | |
--library, -l | id | library id of the content object | |
--profile | bool | retrieve profile information | |
--qid, -q | id | id of the content object | |
--refresh | bool | force retrieval of profile information without cache |
Examples
elv content describe tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A
content edit
elv content edit <content id or hash>
Edit by creating a new version of a content
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
id-or-hash | id or hash | ✓ | id or hash of the content object |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--copy-from | hash | hash of a source content object | |
--finalize | bool | finalize content after creating the version | |
--force-encrypt | bool | set content encryption keys (only effective if content was not encrypted) | |
--force-no-encrypt | bool | do not use encryption keys (only effective if content was encrypted) | |
--library, -l | id | library id of the content object | |
--meta | string | arbitrary content metadata | |
--object-type | string | object-type e.g. 'space' or 'node' or 'group' | |
--qtype | hash | content-type hash | |
--query-fields | json | query fields to set Default: null | |
--unique-groups | json | unique groups to set Default: null |
Examples
elv content edit iq__1Bhh3pU9gLXZiNDL6PEZuEP5ri --copy-from hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk --meta @meta.json --qtype hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBGA
elv content edit hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk --meta @meta.json --qtype hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBGA
elv content edit iq__1Bhh3pU9gLXZiNDL6PEZuEP5ri --copy-from hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk --meta @meta.json --qtype hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBGA
content export
elv content export <content hash>
Export the given content object from the provided content library to files.
The exported files will be added to a single directory named by the content hash within the provided directory and will include a "meta.json" metadata file and content part data files.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhash | hash | ✓ | content hash of the content object to export |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--dir | string | optional directory to export to | |
--library, -l | id | library id of the content object to export | |
--resolve | bool | resolve links in retrieved metadata |
Examples
elv content export hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk
elv content export hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk --dir /root/
content finalize
elv content finalize <content write token>
Finalize the draft content object identified by the provided content write token.
After successful finalization, the content object is addressable by its hash, but it also becomes immutable.
Subsequent modifications are nevertheless possible by creating new content versions
Use --no-commit to not also commit the content to the blockchain
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qwt | token | ✓ | write token of the content object |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--no-commit | bool | do not commit content after finalization | |
--qid, -q | id | id of the content object | |
--timeout | duration | timeout to wait for content finalized Default: 30s |
Examples
elv content finalize tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A
content groups
elv content groups
Content group commands
Subcommands
content groups add
elv content groups add <content id, hash or write token> <groups>
Add the given groups to the content object. Any existing groups are retained.
If no write token is provided a new version of the content is created and finalized at the end.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
groups | string[] | ✓ | groups to add |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--finalize | bool | optionally finalize the draft | |
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content groups add tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A iq__4KxdwRbjeVGHZEFHiveGZyKpjtBC iq__36wEYXEQZreSREF1Ao91xBjurHpW
elv content groups add hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk iq__4KxdwRbjeVGHZEFHiveGZyKpjtBC
content groups get
elv content groups get <content id, hash or write token>
Retrieve the groups the given content object is associated with.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content groups get tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A
elv content groups get hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk
content groups remove
elv content groups remove <content id, hash or write token> <groups>
Remove the given group associations from the content object. All other groups are retained.
To clear all groups, specify --all.
If no write token is provided a new version of the content is created and finalized afterward
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
groups | string[] | ✓ | groups to remove |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--all | bool | remove all groups | |
--finalize | bool | optionally finalize the draft | |
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content groups remove tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A iq__4KxdwRbjeVGHZEFHiveGZyKpjtBC iq__36wEYXEQZreSREF1Ao91xBjurHpW
elv content groups remove hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk --all
content groups set
elv content groups set <content id, hash or write token> <groups>
Associate the content object with the given groups. The new groups replace any existing groups.
If no write token is provided a new version of the content is created and finalized at the end.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
groups | string[] | ✓ | groups to set |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--finalize | bool | optionally finalize the draft | |
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content groups set tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A iq__4KxdwRbjeVGHZEFHiveGZyKpjtBC iq__36wEYXEQZreSREF1Ao91xBjurHpW iq__3Q5kBvmUSQ4Jj3GgKJquo4osckgM
elv content groups set hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk iq__4KxdwRbjeVGHZEFHiveGZyKpjtBC
content import
elv content import <library id> <content object data dir>
Import the given content object into the provided content library from a previous export.
The exported files are expected to be in the provided directory and includes a "meta.json" metadata file and content part data files.
If a content id is provided, the metadata and parts will be imported as a new version of the content id.
Otherwise, a new content id will be generated, whose first version will consist of the metadata and parts.
If an owner or KMS key is provided, the caps in the metadata will decrypted using the key and will be replaced with new caps corresponding to the current owner and KMS keys.
Otherwise, the caps in the metadata will be left as-is.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
library | id | ✓ | library id to import into |
dir | string | ✓ | directory of the content object data to import |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--copy-from | hash | optional content hash to copy from | |
--kms-key | string | optional kms private key to decrypt conk in metadata | |
--owner-key | string | optional owner private key to decrypt conk in metadata | |
--qid | id | optional content id to import as | |
--qtype | hash | optional content type | |
--timeout | duration | timeout to wait for content finalized Default: 30s |
Examples
elv content import ilib1Bhh3pU9gLXZiNDL6PEZuEP5ri /root/hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk
elv content import ilib1Bhh3pU9gLXZiNDL6PEZuEP5ri /root/hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk --qid iq__1Bhh3pU9gLXZiNDL6PEZuEP5ri
content kms
elv content kms
Content kms details
Subcommands
content kms set
elv content kms set <content id or hash> <kms_id>
Set the content kms
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | id or write token or hash of the content object |
kms-id | id | ✓ | id of the KMS for the content |
Examples
elv content kms set iq__123 ikmsmV97BEKk5yUdTDkZw5J7MfHUgKt
elv content kms set hq__1234 ikmsmV97BEKk5yUdTDkZw5J7MfHUgKt
content kms show
elv content kms show <content id or hash>
Retrieve the content kms and show his address and ID
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | id or write token or hash of the content object |
Examples
elv content kms show iq__123
elv content kms show hq__1234
content library
elv content library <content id, hash or write token>
Retrieve library of the given content objects.
Multiple objects can be specified either separated by a space or a comma
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhits | string[] | ✓ | space or comma separated list content hash or id |
Examples
elv content library iq__1Bhh3pU9gLXZiNDL6PEZuEP5ri
content list
elv content list <library id>
List finalized contents within the given content library.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
library | id | ✓ | library id of the content object |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--limit | int64 | number of contents to return Default: 100 | |
--profile | bool | retrieve profile information | |
--refresh | bool | force retrieval of profile information without cache | |
--start | int64 | index of first content to return (zero based) Default: 0 |
Examples
elv content list ilib1Bhh3pU9gLXZiNDL6PEZuEP5ri
content meta
elv content meta
Content metadata commands
Subcommands
content meta auto-updatecontent meta deletecontent meta getcontent meta graphcontent meta mergecontent meta set
content meta auto-update
elv content meta auto-update <content id, hash or write token>
Update the content object hierarchy formed by auto-update links in metadata.
Per default, only the lowest order dependency in the hierarchy is updated. Use --recursive to update the entire hierarchy recursively.
Alternatively to update only the first level of dependency, use --shallow
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--ignore-errors | bool | continue updating in case of resolution errors Default: true | |
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object | |
--recursive | bool | update all out-of-date auto-update links recursively | |
--shallow | bool | update first level of links. --recursive cannot be used when --shallow is specified | |
--timeout | duration | timeout to wait for content finalized Default: 0s | |
--version-label | string | the version label to store in the metadata of every updated content. Defaults to the current data/time if not specified. | |
--version-path | string | the metadata path where to store the version label. No version information is stored if not specified. |
Examples
Update full content object hierarchy:
elv content meta auto-update hq__2wBPuKYijShk9ER7pxzPtsNXg4ocwht2M6wpixLAmgWPMFfgtYpLcBefMidagyccZPWHi3qB7C --recursive
In addition, set a metadata key with current date/time (e.g. 2019-12-18T13:53:02.114Z) in updated content objects:
elv content meta auto-update iq__1Bhh3pU9gLXZiNDL6PEZuEP5ri --recursive --version-path /public/version
Set a metadata key with specific value in updated content objects:
elv content meta auto-update iq__1Bhh3pU9gLXZiNDL6PEZuEP5ri --recursive --version-path /public/version --version-label 2.0
Update content draft:
elv content meta auto-update tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A --recursive
content meta delete
elv content meta delete <content write token> [path]
Delete the existing metadata of the given content object.
The command deletes all metadata or a metadata subtree at the given path
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
meta-path | string | path to the metadata subtree |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--finalize | bool | optionally finalize the draft | |
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content meta delete tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A path
content meta get
elv content meta get <content id, hash or write token> [path]
Retrieve the user-defined metadata associated with the given content object.
The command retrieves all metadata or a metadata subtree at the given optional path.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
meta-path | string | path to the metadata subtree |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--accept | string | accept header to retrieve data when metadata points to a file or rep link. | |
--lib-token | bool | create a library token for resolving absolute links | |
--library, -l | id | library id of the content object | |
--link-depth | int64 | limit the depth for resolution of absolute link Default: -1 | |
--qid, -q | id | id of the content object | |
--query | string[] | jsonpath expression to filter the retrieved metadata | |
--remove | string[] | metadata paths to remove from result | |
--resolve | bool | resolve links in retrieved metadata | |
--resolve-ignore-errors | bool | when specified link resolution errors are ignored | |
--resolve-include-source | bool | annotate json metadata with 'source' property (hash or token) | |
--select | string[] | metadata paths to retrieve |
Examples
elv content meta get tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A path
content meta graph
elv content meta graph <content id, hash or write token>
Retrieve the directed, acyclic graph (DAG) of content objects defined by absolute (inter-object) links in metadata.
Per default, the full object graph is retrieved. If --auto-update is set, the graph will only include content objects
that are referenced with auto-update links. The result includes an order array that lists the content objects with
pending updates in the order needed to achieve a fully updated hierarchy.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--auto-update | bool | retrieve graph for auto-update links only | |
--ignore-errors | bool | continue processing in case of resolution errors Default: true | |
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object | |
--remove | string[] | path to metadata subtree that will be removed from the result for each content object | |
--select | string[] | path to metadata subtree that will be included in the result for each content object |
Examples
elv content meta graph hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk
content meta merge
elv content meta merge <content write token> <metadata> [path]
Merge the provided metadata with the existing metadata of the given content object.
The command merges with the full metadata tree or a subtree at the given path.
Metadata can be specified as a json string or @filename to read it from a file.
If no write token is provided a new version of the content is created and finalized afterward.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
meta | string | ✓ | metadata to set |
meta-path | string | path to the metadata subtree |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--finalize | bool | optionally finalize the draft | |
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content meta merge tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A @meta.json path
elv content meta merge hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk @meta.json path
content meta set
elv content meta set <content write token> <metadata> [path]
Replace the existing metadata of the given content object.
The command replaces all metadata or a metadata subtree at the given path.
Metadata can be specified as a json string or @filename to read it from a file
If no write token is provided a new version of the content is created and finalized afterward
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
meta | string | ✓ | metadata to set |
meta-path | string | path to the metadata subtree |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--finalize | bool | optionally finalize the draft | |
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content meta set tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A @meta.json path
elv content meta set hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk @meta.json path
content owner
elv content owner
Content owner commands
Subcommands
content owner key
elv content owner key
Content owner encryption key commands
Subcommands
content owner key for-user
elv content owner key for-user <content id or hash> <user public key>
Encrypt the owner encryption key of a content using the public key of another user
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
public-key | string | ✓ | public key of the user |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--finalize | bool | optionally finalize draft | |
--force | bool | when true overwrite existing caps | |
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content owner key for-user hq__1234 kupk2AGD
elv content owner key for-user iq__1234 kupk2AGD
elv content owner key for-user tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A kupk2AGD
content owner key get
elv content owner key get <content id or hash or write token>
Retrieve the owner encryption key of a content
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content owner key get hq__1234
elv content owner key get iq__1234
elv content owner key get tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A
content owner key remove
elv content owner key remove <content id or hash or write token>
Remove the owner encryption key of a content
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--finalize | bool | optionally finalize draft | |
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content owner key remove hq__1234
elv content owner key remove iq__1234
elv content owner key remove tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A
content owner key set
elv content owner key set <content id or hash or write token> <encryption-key>
Set the owner encryption key of a content
Please note that the encryption key is set for YOU.
For setting the encryption for another user, use the 'for-user' command.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
encryption-key | string | ✓ | content encryption to set |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--finalize | bool | optionally finalize draft | |
--force | bool | force overwriting existing user encryption key | |
--kms-public-key | string | kms public key to also also set the kms conk | |
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content owner key set hq__1234 kp__BNE5n5
elv content owner key set iq__1234 kp__BNE5n5
elv content owner key set tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A kp__BNE5n5
content owner show
elv content owner show <content id or hash>
Retrieve the content owner and show his address and ID
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | id or write token or hash of the content object |
Examples
elv content owner show iq__123
elv content owner show hq__1234
content part
elv content part
Content part commands
Subcommands
content part appendcontent part createcontent part deletecontent part describecontent part list-allcontent part proofcontent part readcontent part read-allcontent part write
content part append
elv content part append <content write token> <content part write token> [file path]
Append data to the draft part with the given part write token.
The part is finalized if no data is provided (empty request body).
The source file is read from stdin if specified as '-'.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qwt | token | ✓ | write token of the content object |
qpwt | token | ✓ | write token of the part |
path | path | path to file data |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--force-no-encrypt | bool | do not use encryption (for content with encryption keys) | |
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content part append tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A tqp_8qqAzG8spzobAXLa7n8XMtpCt9GckNgxSUXB
elv content part append tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A tqp_8qqAzG8spzobAXLa7n8XMtpCt9GckNgxSUXB ~/Pictures/images/flowers.jpg
content part create
elv content part create <content write token> [file path]
Create a new draft part.
The returned part write token can be used to for further operations on the part
A file path can optionally be provided to upload the first chunk of data.
The source file is read from stdin specified as '-'.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qwt | token | ✓ | write token of the content object |
path | path | path to file data |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--force-no-encrypt | bool | do not use encryption (for content with encryption keys) | |
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content part create tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A
elv content part create tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A ~/Pictures/images/flowers.jpg
content part delete
elv content part delete <content write token> <content part hash>
Delete the given part.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qwt | token | ✓ | write token of the content object |
qphash | hash | ✓ | hash of the part |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content part delete tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A hqp_QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk
content part describe
elv content part describe <content id, write token or hash> <content part hash>
Retrieve information about the given part.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
qphash | hash | ✓ | hash of the part |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content part describe tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A hqp_QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk
content part list-all
elv content part list-all <content id, write token or hash>
Retrieve information on all content parts.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content part list-all tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A
content part proof
elv content part proof <content id, write token or hash> <content part hash>
Retrieve the proofs associated with the given part.
Optionally, the proofs corresponding to only a given byte range can be retrieved.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
qphash | hash | ✓ | hash of the part |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--length | int64 | length of data in bytes in the part Default: -1 | |
--library, -l | id | library id of the content object | |
--offset | int64 | offset in the part Default: -1 | |
--qid, -q | id | id of the content object |
Examples
elv content part proof tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A hqp_QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk --offset 1 --length 10
content part read
elv content part read <content id, write token or hash> <content part hash> [destination path]
Download the given part as a byte stream.
The path specifies the destination path. Stdout is used if omitted or specified as '-'.
Optionally, only a given byte range can be downloaded.
Aliases: r, download
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
qphash | hash | ✓ | hash of the part |
dest | path | path to the destination |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--decryption-mode | string | decryption mode: 'none' | 'reencrypt' | 'decrypt' | |
--length | int64 | length of data in bytes in the part Default: -1 | |
--library, -l | id | library id of the content object | |
--offset | int64 | offset in the part Default: -1 | |
--qid, -q | id | id of the content object |
Examples
elv content part read tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A hqp_QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk ~/Pictures/images/flowers.jpg --offset 1 --length 10
content part read-all
elv content part read-all <content id, write token or hash> [destination path]
Download all parts of the content into the given folder.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
dest | string | path to the destination |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--decryption-mode | string | decryption mode: 'none' | 'reencrypt' | 'decrypt' | |
--library, -l | id | library id of the content object | |
--no-progress | bool | don't show progress | |
--qid, -q | id | id of the content object |
Examples
elv content part read-all tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A ~/Pictures/images
content part write
elv content part write <content write token> [path]
Upload binary data at the given path into a new content part and finalize the part in a single call.
If path denotes a folder, each file in the folder is processed as a single part.
For each file binary data is stored in one part, and the part is finalized automatically.
The source file is read from stdin if path is omitted or specified as '-'.
If you require more control over part creation (i.e. upload data with multiple requests,
resume failed uploads, etc.), use the part/append command.
Aliases: w, upload
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qwt | token | ✓ | write token of the content object |
source | path | path to the source file or folder |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--force-no-encrypt | bool | do not use encryption (for content with encryption keys) | |
--include | string | regex to select files when the source path is a folder | |
--library, -l | id | library id of the content object | |
--no-progress | bool | don't show progress | |
--qid, -q | id | id of the content object |
Examples
elv content part upload tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A ~/Pictures/images/flowers.jpg
content policy
elv content policy
Auth policy commands
Subcommands
content policy checkcontent policy contractcontent policy delegatecontent policy evalcontent policy removecontent policy set
content policy check
elv content policy check <content id, hash or write token>
Check whether the given content object has an auth policy and whether it is configured correctly.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content policy check tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A
elv content policy check hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk
content policy contract
elv content policy contract
Commands for auth policy configuration in contract metadata.
Subcommands
content policy contract check
elv content policy contract check <content id, hash or write token>
Retrieve the auth policy stored in the contract metadata of the given content object and check whether it is configured correctly.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
Examples
elv content policy contract check tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A
elv content policy contract check hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk
content policy contract remove
elv content policy contract remove <content id, hash or write token>
Remove the auth policy from the metadata of the given content object's contract.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--force-contract, -f | bool | force removing metadata in contract under key '_ELV' |
Examples
elv content policy contract remove tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A
elv content policy contract remove hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk
content policy contract set
elv content policy contract set <content id, hash or write token> <policy or delegate ID>
Set the auth policy in the metadata of the given content object's contract.
The policy can be specified:
- as the content ID of a delegate or
- as a policy in yaml format or as a reference to a file (using @file) where the policy is.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
policy | string | ✓ | delegate id or policy to set |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--data | string | an optional metadata link target for policy data | |
--desc | string | an optional policy description |
Examples
elv content policy contract set tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A iq__44XX5TjisCUioiPthxb843wVCBkN
elv content policy contract set tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A @policy.yaml
elv content policy contract set hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk '{"name":"Site-Policy","type":"ast","expr":true}'
content policy delegate
elv content policy delegate
Policy delegate commands
Subcommands
content policy delegate check
elv content policy delegate check <content id>
Check the content for policy delegation.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qid | id | ✓ | target content id |
Examples
elv content delegate check iq__1Bhh3pU9gLXZiNDL6PEZuEP5ri
content policy delegate remove
elv content policy delegate remove <content id>
Remove the policy delegation for the given content object.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qid | id | ✓ | target content id |
Examples
elv content delegate remove iq__1Bhh3pU9gLXZiNDL6PEZuEP5ri
content policy delegate set
elv content policy delegate set <content id> <policy object id>
Set the given policy object ID as delegate on the provided content object.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qid | id | ✓ | target content id |
delegate | id | ✓ | qid of policy object |
Examples
elv content delegate set iq__1Bhh3pU9gLXZiNDL6PEZuEP5ri iq__3c6n6nnb5RaFGVJonXc8J6AQRnmn'
content policy eval
elv content policy eval
Auth policy evaluation commands
Subcommands
content policy eval casecontent policy eval ctx-printcontent policy eval rulecontent policy eval seq
content policy eval case
elv content policy eval case <policy file> <sequence symbolic name>
Evaluates a policy against a sequence of actions.
The 'case' parameter is the symbolic name of a json file containing the initial
context and a sequence of calls, as provided in the 'virtual' sub directory called 'defaults'.
Use command 'eval ctx-print --list' to discover defaults contexts and sequences and their symbolic names.
Use flag --print-ctx to print the full actual context sequence in json format.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
policy | string | ✓ | path to policy file |
case | string | ✓ | symbolic name of a context sequence file |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--log-level | string | log level Default: warn | |
--print-ctx | bool | print actual eval context | |
--token | string | overrides context token data with token |
Examples
eval case policy.yaml sequence
content policy eval ctx-print
elv content policy eval ctx-print [context file]
Print eval context
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
context | string | path to a context file |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--action | string | overrides action in context/api_call | |
--blob-enc | string | overrides blob_encryption_scheme in context/api_call | |
--entry-point | bool | true when the call is an entry-point Default: true | |
--files-enc | string | overrides files_encryption_scheme in context/api_call | |
--full | bool | show the full value and for sequences expand the sequence and fill attributes | |
--list | bool | list available default contexts | |
--log-level | string | log level Default: warn | |
--meta-path | string | overrides meta_path in context/api_call | |
--print-ctx | bool | print actual eval context Default: true | |
--token | string | overrides context token data with token |
Examples
elv content policy eval ctx-print
elv content policy eval ctx-print context.json
content policy eval rule
elv content policy eval rule <policy file> [rule]
Evaluates a policy rule against a context.
The provided default context can be overwritten:
* by using flag --context with the path to a json context file
* and further refined using command flags
Use command 'ctx-print' or flag --print-ctx to obtain the full actual context in json format.
Command 'eval ctx-print --list' shows defaults contexts and sequences
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
policy | string | ✓ | path to policy file |
rule | string | policy rule to invoke |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--action | string | overrides action in context/api_call | |
--blob-enc | string | overrides blob_encryption_scheme in context/api_call | |
--context | string | path to a context file | |
--entry-point | bool | true when the call is an entry-point Default: true | |
--files-enc | string | overrides files_encryption_scheme in context/api_call | |
--log-level | string | log level Default: warn | |
--meta-path | string | overrides meta_path in context/api_call | |
--print-ctx | bool | print actual eval context | |
--token | string | overrides context token data with token |
Examples
elv content policy eval rule policy.yaml
elv content policy eval rule policy.yaml authorize
content policy eval seq
elv content policy eval seq <policy file> <sequence>
Evaluates a policy against a sequence of actions.
The 'context' parameter is a json file containing the initial context and a sequence of calls.
Some default sequences are provided in a 'virtual' sub directory called 'defaults'.
For example 'defaults/seq_frame_decrypt.json' can be used as such a sequence.
Use flag --print-ctx to print the full actual context sequence in json format.
Use command 'eval ctx-print --list' to discover defaults contexts and sequences
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
policy | string | ✓ | path to policy file |
context | string | ✓ | path to a context sequence file |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--log-level | string | log level Default: warn | |
--print-ctx | bool | print actual eval context | |
--token | string | overrides context token data with token |
Examples
eval seq policy.yaml sequence.json
content policy remove
elv content policy remove <content id, hash or write token>
Remove the policy - if set - from the given content object.
If no write token is provided a new version of the content is created and finalized afterward
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--finalize | bool | optionally finalize the draft | |
--force-contract, -f | bool | force removing metadata in contract under key '_AUTH_CONTEXT' | |
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content policy remove tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A
elv content policy remove hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk
content policy set
elv content policy set <content id, hash or write token> <policy>
Set the given auth policy on the provided content object.
The policy must be written in epl-ast YAML or JSON format. It can be specified as a string or @filename to read it from a file.
If no write token is provided a new version of the content is created and finalized at the end.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
policy | string | ✓ | policy to set |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--data | string | an optional metadata link target for policy data | |
--desc | string | an optional policy description | |
--finalize | bool | optionally finalize the draft | |
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content policy set tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A @policy.yaml
elv content policy set hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk '{"name":"Site-Policy","type":"ast","expr":true}'
elv content policy set hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk @policy.yaml --data './meta/extra_policy_data'
content profile
elv content profile
Content profile commands
Subcommands
content profile get
elv content profile get <content id, write token or hash>
Retrieve the content profile: visibility, status-code and kms-caps
Predefined profiles:
Name : visibility : status-code : kms-caps
'Owner Only' : 0 (private) : -1 (draft) : no
'Editable' : 0 (private) : -1 (draft) : yes
'Viewable' : 0 (private) : 0 (accessible): yes
'Publicly Listable' : 1 (publicly listable): 0 (accessible): yes
'Public' : 10 (fully public) : 0 (accessible): yes
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content profile get iq__123
content profile set
elv content profile set <content id, write token or hash> <profile name>
Set the content profile: visibility, status-code and kms-caps
Predefined profiles:
Name : visibility : status-code : kms-caps
'Owner Only' : 0 (private) : -1 (draft) : no
'Editable' : 0 (private) : -1 (draft) : yes
'Viewable' : 0 (private) : 0 (accessible): yes
'Publicly Listable' : 1 (publicly listable): 0 (accessible): yes
'Public' : 10 (fully public) : 0 (accessible): yes
Use flag --remove-caps to remove kms-caps when changing from a profile requiring
kms-caps to a profile not requiring kms-caps.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
profile | string | ✓ | name of the content profile |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object | |
--remove-caps | bool | set to true when changing to a profile not requiring kms-caps |
Examples
elv content profile set iq__123 public
content query-fields
elv content query-fields
Content query field commands
Subcommands
content query-fields addcontent query-fields getcontent query-fields removecontent query-fields set
content query-fields add
elv content query-fields add <content id, hash or write token> <query fields>
Add the given query fields to the content object. Any existing fields are retained.
If no write token is provided a new version of the content is created and finalized at the end.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
query-fields | json | ✓ | fields to add |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--finalize | bool | optionally finalize the draft | |
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content query-fields add tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A '{"name":"Destiny"}'
elv content query-fields add hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk '{"name":"Destiny"}'
content query-fields get
elv content query-fields get <content id, hash or write token>
Retrieve the query fields of the given content object.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content query-fields get tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A
elv content query-fields get hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk
content query-fields remove
elv content query-fields remove <content id, hash or write token> <field names>
Remove the query fields with the given field names from the content object. All other fields are retained.
To clear all query fields, specify --all.
If no write token is provided a new version of the content is created and finalized afterward
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
query-fields | string[] | ✓ | fields to remove |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--all | bool | remove all fields | |
--finalize | bool | optionally finalize the draft | |
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content query-fields remove tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A "name" "genre"
elv content query-fields remove hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk --all
content query-fields set
elv content query-fields set <content id, hash or write token> <query fields>
Set the given query fields. They replace any existing query fields.
If no write token is provided a new version of the content is created and finalized at the end.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
query-fields | json | ✓ | fields to set |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--finalize | bool | optionally finalize the draft | |
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content query-fields set tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A '{"name":"Destiny","genre":"thriller"}'
elv content query-fields set hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk '{"name":"Destiny"}'
content signed-link
elv content signed-link
Commands for signed-links
Subcommands
content signed-link blockcontent signed-link createcontent signed-link disablecontent signed-link enablecontent signed-link settingscontent signed-link unblock
content signed-link block
elv content signed-link block <qid> <container>
Add the container to the block list for signed links.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qid | id | ✓ | id of target content object |
container | id | ✓ | id of container object |
Examples
elv content signed-link block iq__3utVAszxbTdKo7Edvvu9PHvgrdB4 iq__1Bhh3pU9gLXZiNDL6PEZuEP5ri
content signed-link create
elv content signed-link create <link> <container>
Sign the given absolute link for embedding in the provided container object.
The signer must have edit rights for the link's target content. By signing the
link, the signer grants credential-free access to anyone who has access to the
link in the container content.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
target | string | ✓ | the link in JSON form |
container | id | ✓ | id of container object that will embed the signed link |
Examples
string form:
elv content signed-link create '/qfab/hq__2wBPuKYijShk9ER7pxzPtsNXg4ocwht2M6wpixLAmgWPMFfgtYpLcBefMidagyccZPWHi3qB7C/meta/path' iq__1Bhh3pU9gLXZiNDL6PEZuEP5ri
JSON format:
elv content signed-link create '{"/":"/qfab/hq__123/rep/playout/...",".":{"auto_update":{}}}' iq__1Bhh3pU9gLXZiNDL6PEZuEP5ri
content signed-link disable
elv content signed-link disable <qid>
Modify the content's contract to disable signed links.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qid | id | ✓ | id of target content object |
Examples
elv content signed-link disable iq__3utVAszxbTdKo7Edvvu9PHvgrdB4
content signed-link enable
elv content signed-link enable <qid>
Modify the content's contract to enable signed links.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qid | id | ✓ | id of target content object |
Examples
elv content signed-link enable iq__3utVAszxbTdKo7Edvvu9PHvgrdB4
content signed-link settings
elv content signed-link settings <qid>
Retrieve signed-link configuration settings for the content object
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qid | id | ✓ | id of target content object |
Examples
elv content signed-link settings iq__3utVAszxbTdKo7Edvvu9PHvgrdB4
content signed-link unblock
elv content signed-link unblock <qid> <container>
Remove the container from the block list for signed links.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qid | id | ✓ | id of target content object |
container | id | ✓ | id of container object |
Examples
elv content signed-link unblock iq__3utVAszxbTdKo7Edvvu9PHvgrdB4 iq__1Bhh3pU9gLXZiNDL6PEZuEP5ri
content status
elv content status <content id, hash or write token>
Retrieve status information on the given content object.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--details | bool | retrieve detailed status information | |
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content status hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk
content struct
elv content struct <content id, hash or write token> [path]
Retrieve the full content structure or a subset of it indicated by the provided path
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
path | string | path to a subset of the content structure |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content struct tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A system/origin
elv content struct tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A
content tags
elv content tags
Content tag commands
Subcommands
content tags add
elv content tags add <content id, hash or write token> <tags>
Add the given tags to the content object. Any existing tags are retained.
If no write token is provided a new version of the content is created and finalized at the end.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
tags | string[] | ✓ | tags to add |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--finalize | bool | optionally finalize the draft | |
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content tags add tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A tag3 tag5
elv content tags add hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk tag1
content tags get
elv content tags get <content id, hash or write token>
Retrieve the tags of the given content object.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content tags get tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A
elv content tags get hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk
content tags remove
elv content tags remove <content id, hash or write token> <tags>
Remove the given tags from the content object. All other tags are retained.
To clear all tags, specify --all.
If no write token is provided a new version of the content is created and finalized afterward
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
tags | string[] | ✓ | tags to remove |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--all | bool | remove all tags | |
--finalize | bool | optionally finalize the draft | |
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content tags remove tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A tag3 tag5
elv content tags remove hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk --all
content tags set
elv content tags set <content id, hash or write token> <tags>
Associate the content object with the given tags. The new tags replace any existing tags.
If no write token is provided a new version of the content is created and finalized at the end.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
tags | string[] | ✓ | tags to set |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--finalize | bool | optionally finalize the draft | |
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content tags set tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A tag1 tag2 tag3
elv content tags set hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk tag1
content token
elv content token
Authorization token commands
Subcommands
content token create
elv content token create <content id or hash>
Create an authorization token from a blockchain or optionally a state-channel transaction - using library id and content id
By default tokens are created off the blockchain:
- with the --reenc flag for read where re-encryption is needed
- with the --update flag to create an update token
Use '--state-channel': create a 'read' state channel token
Subcommands
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object | |
--reenc | bool | read with re-encryption Default: true | |
--state-channel | bool | use state-channel (read token) | |
--update | bool | create a token for content update (blockchain only) |
Examples
elv content token create iq__XXX --space ispcXXX --library ilibXXX
elv content token create iq__XXX --reenc
elv content token create iq__XXX --update
elv content token create iq__XXX --state-channel
elv content token create iq__XXX --state-channel --reenc
content token create anonymous
elv content token create anonymous
Create an anonymous authorization token
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library | id | library id of the content object |
Examples
elv content token create anonymous --library ilibXXX --space ispcXXX
content token create plain
elv content token create plain
Creates a plain signed authorization token without blockchain transaction
Options
| Option | Type | Required | Description |
|---|---|---|---|
--ctx | string | additional token context map | |
--ephemeral-key | string | hex of an ephemeral confirmation key | |
--expires-in | duration | validity duration of the signed token after creation (plain token only) Default: 4h0m0s | |
--grant | string | the grant type of the token |
Examples
elv content token create plain
content token create-ephemeral-key
elv content token create-ephemeral-key
Generate an ephemeral key to use for confirmation with plain (client-signed) or editor (editor-signed) tokens.
The resulting key can be used:
- with flag '--ephemeral-key' when signing a plain or editor token
- with global flag '--confirmation-key' when the signed token is used via '--token' in cli commands
The command prints the generated key, the corresponding address and public key.
With --short, it prints only the generated key.
Options
| Option | Type | Required | Description |
|---|---|---|---|
--short | bool | only print the private key |
Examples
elv content token create-ephemeral-key
content token decode
elv content token decode <authorization or full url>
Decode an access token
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
token | string | ✓ | encoded token of full url |
Examples
elv content token decode eyJxc3xx
elv content token decode https://host-38-142-50-109.test.contentfabric.io/q/hq__EKjpzqq/rep/playout/default/frames.png?authorization=eyJxc3xx&frame=0
content token sign
elv content token sign <content id, hash or write token>
Create and sign an access (editor-signed) token for the given content.
The command allows to create tokens that use policy objects previously defined via the 'content policy set' command.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--authorized-qids | id[] | ids of additional authorized contents | |
--ctx | string | additional token context map | |
--ephemeral-key | string | hex of an ephemeral confirmation key | |
--expires-in | duration | validity duration of the signed token after creation Default: 4h0m0s | |
--library, -l | id | library id of the content object | |
--policy | id | content id of the policy object | |
--qid, -q | id | id of the content object | |
--reenc | bool | provide re-encryption key | |
--subject | string | subject of the token |
Examples
elv content token sign iq__XXX
elv content token sign iq__XXX --expires-in 20h --library ilibXXX
elv content token sign iq__1234 --ctx @ctx.json --policy iq__4567
content unique-groups
elv content unique-groups
Content unique group commands
Subcommands
content unique-groups addcontent unique-groups getcontent unique-groups removecontent unique-groups set
content unique-groups add
elv content unique-groups add <content id, hash or write token> <unique groups>
Add the given unique groups to the content object. Any existing groups are retained.
If no write token is provided a new version of the content is created and finalized at the end.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
unique-groups | json | ✓ | groups to add |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--finalize | bool | optionally finalize the draft | |
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content unique-groups add tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A '{"type1":"iq__4KxdwRbjeVGHZEFHiveGZyKpjtBC","type2":"iq__36wEYXEQZreSREF1Ao91xBjurHpW"}'
elv content unique-groups add hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk '{"type1":"iq__4KxdwRbjeVGHZEFHiveGZyKpjtBC"}'
content unique-groups get
elv content unique-groups get <content id, hash or write token>
Retrieve the unique groups the given content object is associated with.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content unique-groups get tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A
elv content unique-groups get hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk
content unique-groups remove
elv content unique-groups remove <content id, hash or write token> <unique group types>
Remove the unique group associations with the given group types from the content object. All other groups are retained.
To clear all unique groups, specify --all.
If no write token is provided a new version of the content is created and finalized afterward
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
unique-groups | string[] | ✓ | groups to remove |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--all | bool | remove all groups | |
--finalize | bool | optionally finalize the draft | |
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content unique-groups remove tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A type1 type5
elv content unique-groups remove hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk --all
content unique-groups set
elv content unique-groups set <content id, hash or write token> <unique groups>
Associate the content object with the given unique groups. The new groups replace any existing unique groups.
If no write token is provided a new version of the content is created and finalized at the end.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
unique-groups | json | ✓ | groups to set |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--finalize | bool | optionally finalize the draft | |
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv content unique-groups set tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A '{"type1":"iq__4KxdwRbjeVGHZEFHiveGZyKpjtBC","type2":"iq__36wEYXEQZreSREF1Ao91xBjurHpW","type3":"iq__3Q5kBvmUSQ4Jj3GgKJquo4osckgM"}'
elv content unique-groups set hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk '{"type1":"iq__4KxdwRbjeVGHZEFHiveGZyKpjtBC"}'
content user
elv content user
User related commands
Subcommands
content user permission
elv content user permission <content id or hash> <user or group id>
Retrieve permission for the given user or group on the given content
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | id or write token or hash of the content object |
usr | id | ✓ | user or group id |
Examples
elv content user permission iq__123 iusr123
elv content user permission iq__123 igrp123
content versions
elv content versions
Content versions commands
Subcommands
content versions create
elv content versions create <content id or hash>
Create a new version of the content with the given ID or Hash
The new version will be a regular draft content object as if created with content / create
except that it will inherit all parts and metadata from the latest version of this content.
Metadata can be specified as a json string or @filename to read it from a file
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
id-or-hash | id or hash | ✓ | id or hash of the content object |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--copy-from | hash | hash of a source content object | |
--finalize | bool | finalize content after creating the version | |
--force-encrypt | bool | set content encryption keys (only effective if content was not encrypted) | |
--force-no-encrypt | bool | do not use encryption keys (only effective if content was encrypted) | |
--library, -l | id | library id of the content object | |
--meta | string | arbitrary content metadata | |
--object-type | string | object-type e.g. 'space' or 'node' or 'group' | |
--qtype | hash | content-type hash | |
--query-fields | json | query fields to set Default: null | |
--unique-groups | json | unique groups to set Default: null |
Examples
elv content versions create iq__1Bhh3pU9gLXZiNDL6PEZuEP5ri --copy-from hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk --meta @meta.json --qtype hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBGA
elv content versions create hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk --meta @meta.json --qtype hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBGA
elv content versions create iq__1Bhh3pU9gLXZiNDL6PEZuEP5ri --copy-from hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk --meta @meta.json --qtype hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBGA
content versions delete
elv content versions delete <content id>
Delete the content object and all of its versions from the library: this can be done only by the content owner.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qid | id | ✓ | id of the content object |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object |
Examples
elv content versions delete iq__1Bhh3pU9gLXZiNDL6PEZuEP5ri
content versions list
elv content versions list <content id>
List all versions of the content with the given ID.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qid | id | ✓ | id of the content object |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--details | bool | retrieve detailed information | |
--latest | bool | retrieve only latest hash | |
--library, -l | id | library id of the content object |
Examples
elv content versions list iq__1Bhh3pU9gLXZiNDL6PEZuEP5ri
content versions stat
elv content versions stat <content hash>
Describe the version of the content with the given hash.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhash | hash | ✓ | hash of the version |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--details | bool | retrieve detailed information | |
--library, -l | id | library id of the content object |
Examples
elv content versions stat hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk
content-type
elv content-type
Content type management commands
Subcommands
content-type create
elv content-type create <library id>
Create a new content type object and a draft on the fabric
metadata can be specified as a json string or @filename to read it from a file
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
library | id | ✓ | library id to create content object |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--meta | string | arbitrary content metadata | |
--publish-nowait | bool | don't wait for publish of the associated content-object | |
--timeout | duration | timeout for command execution including publication of the associated content Default: 0s |
Examples
elv content-type create ilib1Bhh3pU9gLXZiNDL6PEZuEP5ri
fjob
elv fjob
Management of files jobs to create, upload, ingest and download files.
Subcommands
fjob addfjob createfjob downloadfjob finalizefjob force-completefjob resumefjob statusfjob uploadfjob v1
fjob add
elv fjob add <write token> <files job id> <request>
Add more file operations to a files job
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qwt | token | ✓ | write token of the content object |
fjob | id | ✓ | files job id |
req | string | ✓ | files job creation request |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--qid, -q | id | optional id of the content object |
Examples
elv fjob add tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A iqfj1Bhh3pU9gLXZiNDL6PEZuEP5ri @request.json
fjob create
elv fjob create <write token> <request>
Create a files jobs
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qwt | token | ✓ | write token of the content object |
req | string | ✓ | files job creation request |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--qid, -q | id | optional id of the content object |
Examples
elv fjob create tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A @request.json
fjob download
elv fjob download <id or write token or hash> <src> <dest path>
Download file data
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | id or write token or hash of the content object |
src | string | ✓ | path of source in bundle |
dest | path | ✓ | path to the destination |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--decryption-mode | string | decryption mode: 'none' | 'reencrypt' | 'decrypt' | |
--length | int64 | length of data in bytes in the part Default: -1 | |
--library, -l | id | library id of the content object | |
--offset | int64 | offset in the part Default: 0 | |
--qid, -q | id | id of the content object |
Examples
elv fjob download hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk images/flowers.jpg ~/Pictures/images/flowers.jpg --offset 1 --length 10
elv fjob download hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk images/flowers.jpg ~/Pictures/images/flowers.jpg --offset 1 --length 10
fjob finalize
elv fjob finalize <write token>
Finalize files-job and make 'files' immutable.
Finalizing file-job is also done automatically upon content finalization
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qwt | token | ✓ | write token of the content object |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--qid, -q | id | optional id of the content object |
Examples
elv fjob finalize tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A
fjob force-complete
elv fjob force-complete <write token> [files job id]
Force completion of a files job.
Force completion may be used to force a job to completion after ingest failures.
- unresolved ingests as well as unterminated uploads or downloads are discarded, and
- files that were resolved but are not complete are deleted and
- all parts finalized.
Aliases: complete
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qwt | token | ✓ | write token of the content object |
fjob | id | files job id |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--qid, -q | id | optional id of the content object |
Examples
elv fjob force-complete tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A iqfj1Bhh3pU9gLXZiNDL6PEZuEP5ri
fjob resume
elv fjob resume <write token> <files job id> <storage>
Resume files jobs and restart failed ingests.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qwt | token | ✓ | write token of the content object |
fjob | id | ✓ | files job id |
storage | string | ✓ | key to remote storage in configuration |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--clear-resolution | bool | clear resolution errors like erroneous ingest paths | |
--library, -l | id | library id of the content object | |
--qid, -q | id | optional id of the content object |
Examples
elv fjob resume tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A iqfj1Bhh3pU9gLXZiNDL6PEZuEP5ri s3
elv fjob resume tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A iqfj1Bhh3pU9gLXZiNDL6PEZuEP5ri s3 --clear-resolution
fjob status
elv fjob status <write token> <files job id>
Retrieve the detailed status of a files job
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qwt | token | ✓ | write token of the content object |
fjob | id | ✓ | files job id |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--qid, -q | id | optional id of the content object |
Examples
elv fjob status tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A iqfj1Bhh3pU9gLXZiNDL6PEZuEP5ri
fjob upload
elv fjob upload <write token> <files job id> <file upload id> <path>
perform uploads and retrieve upload ids or their status
Subcommands
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qwt | token | ✓ | write token of the content object |
fjob | id | ✓ | files job id |
upjob | id | ✓ | upload job id |
path | path | ✓ | path to data |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--force-no-encrypt | bool | do not use encryption (for content with encryption keys) | |
--library, -l | id | library id of the content object | |
--qid, -q | id | optional id of the content object |
Examples
elv fjob upload tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A iqfj1Bhh3pU9gLXZiNDL6PEZuEP5ri iqfu1Bhh3pU9gLXZiNDL6PEZuEP5ri ~/Pictures/images/flowers.jpg
fjob upload do
elv fjob upload do <write token> <files job id> <upload job id> <path>
Perform an upload job
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qwt | token | ✓ | write token of the content object |
fjob | id | ✓ | files job id |
upjob | id | ✓ | upload job id |
path | path | ✓ | path to data |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--force-no-encrypt | bool | do not use encryption (for content with encryption keys) | |
--library, -l | id | library id of the content object | |
--qid, -q | id | optional id of the content object |
Examples
elv fjob upload do tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A iqfj1Bhh3pU9gLXZiNDL6PEZuEP5ri iqfu1Bhh3pU9gLXZiNDL6PEZuEP5ri ~/Pictures/images/flowers.jpg
fjob upload ids
elv fjob upload ids <write token> <files job id>
Retrieve upload jobs ids
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qwt | token | ✓ | write token of the content object |
fjob | id | ✓ | files job id |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--qid, -q | id | optional id of the content object |
Examples
elv fjob upload ids tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A iqfj1Bhh3pU9gLXZiNDL6PEZuEP5ri
fjob upload status
elv fjob upload status <write token> <files job id> <upload job id>
Retrieve status of an upload job
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qwt | token | ✓ | write token of the content object |
fjob | id | ✓ | files job id |
upjob | id | ✓ | upload job id |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--qid, -q | id | optional id of the content object |
Examples
elv fjob upload status tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A iqfj1Bhh3pU9gLXZiNDL6PEZuEP5ri iqfu1Bhh3pU9gLXZiNDL6PEZuEP5ri
fjob v1
elv fjob v1
Use the now deprecated v1 api to perform files-upload
Subcommands
fjob v1 create
elv fjob v1 create <write token> <request>
Create an upload job
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qwt | token | ✓ | write token of the content object |
req | string | ✓ | files upload request |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--part-size | bytesize | size of the parts to create | |
--qid, -q | id | optional id of the content object |
Examples
elv fjob v1 create tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A @request.json
fjob v1 status
elv fjob v1 status <write token> <upload job id>
Status an upload job
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qwt | token | ✓ | write token of the content object |
upjob | id | ✓ | upload job id |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--qid, -q | id | optional id of the content object |
Examples
elv fjob v1 status tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A iqfu1Bhh3pU9gLXZiNDL6PEZuEP5ri
fjob v1 upload
elv fjob v1 upload <write token> <upload job id> <path>
Perform an upload job
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qwt | token | ✓ | write token of the content object |
upjob | id | ✓ | upload job id |
src | path | ✓ | path to data |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--force-no-encrypt | bool | do not use encryption (for content with encryption keys) | |
--library, -l | id | library id of the content object | |
--qid, -q | id | optional id of the content object |
Examples
elv fjob v1 upload tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A iqfu1Bhh3pU9gLXZiNDL6PEZuEP5ri ~/Pictures/images/flowers.jpg
group
elv group
Group management commands
Subcommands
group create
elv group create
create access control group
group permission
elv group permission
Group permissions related commands
Subcommands
group permission get
elv group permission get <group id>
List content objects and their associated permission for the given group
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
group | id | ✓ | group id of the group |
Examples
elv group permission get igrp123
group permission set
elv group permission set <content id> <group id> <permission>
Set group permission to list | read | edit on the given content object.
- Allowed permissions : list | read | edit.
- Use --revoke to revoke the permission
- Can be run only by content owner.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qid | id | ✓ | content id of the content object |
group | id | ✓ | group id of the group |
permission | string | ✓ | group permission (value : list|read|edit) |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--revoke | bool | revoke the given permission for the group on the content object |
Examples
elv group permission set iq__123 igrp123 read
elv group permission set iq__123 igrp123 read --revoke
library
elv library
Creation and management of content libraries including managing groups and types.
Subcommands
library createlibrary deletelibrary describelibrary for-nodelibrary kmslibrary metalibrary token
library create
elv library create
Create library object in content space, optionally providing a kms id.
The library id might be provided via --library if already known.
When --tenant is specified, the created library is assigned to the tenant with the given id.
Options
| Option | Type | Required | Description |
|---|---|---|---|
--kms | id | kms id | |
--library, -l | id | library id | |
--private-meta | string | private metadata of the library | |
--public-meta | string | public metadata of the library | |
--publish-nowait | bool | don't wait for publish of the associated content-object | |
--tenant | id | tenant id | |
--timeout | duration | timeout for command execution including publication of the associated content Default: 30s |
Examples
elv library create
elv library create --kms ikmsmV97BEKk5yUdTDkZw5J7MfHUgKt
elv library create --library ilib1Bhh3pU9gLXZiNDL6PEZuEP5ri
library delete
elv library delete <library id>
Delete library from content space
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
library | id | ✓ | library id |
Examples
elv library delete ilib1Bhh3pU9gLXZiNDL6PEZuEP5ri
library describe
elv library describe <library id>
Retrieve library information: content id and metadata
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
library | id | ✓ | library id |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--profile | bool | retrieve profile information | |
--refresh | bool | force retrieval of profile information without cache |
Examples
elv library describe ilib1Bhh3pU9gLXZiNDL6PEZuEP5ri
library for-node
elv library for-node <node_id>
Create a library and transfers its ownership to a node.
Only the space owner can call this command.
After execution the space owner remains an editor of the library.
The library id might be provided via --library if it already exists and needs to have kms set.
The library is created with the following precedence :
[1] library id provided via the --library flag
[2] space metadata has any library associated with the node ID
[3] create a new library (requires --kms or the kms of the space will be used)
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
node | id | ✓ | node id |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--force-library | bool | with --library overwrite library already set for the node | |
--kms | id | kms id | |
--library, -l | id | library id |
Examples
elv library for-node inod3i7WewHeQkDWJ2MNnGtmCFgvw4mT --kms ikms1A3h3pU9gLXZiNDL6PEZuEP5ri
elv library for-node inod3i7WewHeQkDWJ2MNnGtmCFgvw4mT --library ilib1Bhh3pU9gLXZiNDL6PEZuEP5ri
library kms
elv library kms
kms utilities for library
Subcommands
library kms set
elv library kms set <qlibId> <kmsId>
Set library kms address, can be done only by a library owner
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
library | id | ✓ | library id |
kms | id | ✓ | kms id |
Examples
elv library kms set ilib1Bhh3pU9gLXZiNDL6PEZuEP5ri ikmsmV97BEKk5yUdTDkZw5J7MfHUgKt
library kms show
elv library kms show <qlibId>
Show kms information of the library
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
library | id | ✓ | library id |
Examples
elv library kms show ilib1Bhh3pU9gLXZiNDL6PEZuEP5ri
library meta
elv library meta
Manage library metadata
Subcommands
library meta get
elv library meta get <library id> [path]
Retrieve library metadata at the given optional path
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
library | id | ✓ | library id |
meta-path | string | path to metadata |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--key | string | key under which metadata are stored. The Fabric uses only the empty key |
Examples
elv library meta get ilib1Bhh3pU9gLXZiNDL6PEZuEP5ri
elv library meta get ilib1Bhh3pU9gLXZiNDL6PEZuEP5ri my/path
library meta update
elv library meta update <library id, metadata> [path]
Update library metadata at the given optional path
Metadata can be specified as a json string or @filename to read it from a file.
By default metadata are merged into the existing ones. Use --set to overwrite.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
library | id | ✓ | library id |
meta | string | metadata to set | |
meta-path | string | path to metadata |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--key | string | key under which metadata are stored. The Fabric uses only the empty key | |
--set | bool | overwrite existing metadata |
Examples
elv library meta update ilib1Bhh3pU9gLXZiNDL6PEZuEP5ri @meta.json
elv library meta update ilib1Bhh3pU9gLXZiNDL6PEZuEP5ri @meta.json --set
library token
elv library token <library id>
Create an authorization token for the given library based on a blockchain transaction.
Additionally to the library object a library token allows access to the public area of its contents:
- public metadata
- unencrypted parts and representations
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
library | id | ✓ | library id |
Examples
elv library token ilib1Bhh3pU9gLXZiNDL6PEZuEP5ri
space
elv space
Space commands
Subcommands
space bitcode
elv space bitcode <bitcode files>
Publish one or more bitcode files specified as arguments as individual content objects.
Create a new library if none is specified.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
bc-paths | string[] | ✓ | paths of bitcode files |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--flags | string | bitcode flags | |
--library, -l | id | library id to create content object |
Examples
elv space bitcode file1 --library ilib1Bhh3pU9gLXZiNDL6PEZuEP5ri
space create
elv space create [name]
Create a content space with an optional name
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
name | string | space name |
Examples
elv space create
elv space create space1
space kms
elv space kms
Kms management
Subcommands
space kms add
elv space kms add <KMS_id> <KMS_locators>
Add the locators for the kms id. Optionally set its public key if provided.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
kms-id | id | ✓ | id of the KMS |
locators | string[] | ✓ | comma separated list of locators to add |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--force, -f | bool | ignore url syntax error and http/https requirement | |
--pubkey | string | key ID form of KMS public key | |
--set-kms | bool | set the given KMS as the kms of the space |
Examples
elv space kms add ikms3q2bqw7nG56M9w6K5GLq66Q3nmUh "http://127.0.0.1:6545,https://127.0.0.100:6545" --pubkey kepkXXX
elv space kms add ikms3q2bqw7nG56M9w6K5GLq66Q3nmUh "http://127.0.0.1:6545,https://127.0.0.100:6545" --pubkey kepkXXX --set-kms
space kms list
elv space kms list <KMS_id> [prefix]
List the locators and public key for the provided kms id in the content space.
This command takes prefix of the locators, to filter it.
For instance "http://" can be used to filter the locators starting with this prefix.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
kms-id | id | ✓ | id of the KMS |
prefix | string | locator prefix to match |
Examples
elv space kms list ikms3q2bqw7nG56M9w6K5GLq66Q3nmUh http://
space kms remove
elv space kms remove <KMS_id> [KMS_locators]
Remove the provided locators for the kms id.
If --remove-all is used, it removes the locators and public key provided with the kms id.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
kms-id | id | ✓ | id of the KMS |
locators | string[] | comma separated list of locators to remove |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--remove-all | bool | remove all locators |
Examples
elv space kms remove ikms3q2bqw7nG56M9w6K5GLq66Q3nmUh "http://127.0.0.1:6545,https://127.0.0.100:6545"
space kms set
elv space kms set <KMS_id>
Set the KMS for the space.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
kms-id | id | ✓ | id of the KMS |
Examples
elv space kms set ikms3q2bqw7nG56M9w6K5GLq66Q3nmUh
space meta
elv space meta
Manage metadata of content space
Subcommands
space meta get
elv space meta get [path]
Retrieve space metadata at the given optional path
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
meta-path | string | path to metadata |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--key | string | key under which metadata are stored. The Fabric uses only the empty key |
Examples
elv space meta get
space meta update
elv space meta update <meta> [path]
Update metadata of content space at the given optional path.
Metadata can be specified as a json string or @filename to read it from a file.
By default metadata are merged into the existing ones. Use --set to overwrite.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
meta | string | ✓ | metadata |
meta-path | string | path to metadata |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--key | string | key under which metadata are stored. The Fabric uses only the empty key | |
--set | bool | overwrite existing metadata |
Examples
elv space meta update @my_file.json
elv space meta update @my_file.json --set
space node
elv space node
Manages nodes in content space
Subcommands
space node add
elv space node add <node addresses> <node locators>
Add a fabric node with api endpoints and library in content space.
- Nodes addresses can be any of: encoded node ID, hex encoded bytes (40 chars) or hex encoding preceded by 0x.
- Only the space owner can call this command.
- After execution, library ownership is transferred to a node and
the space owner remains an editor of the library.
- Requires library provided (--library) contain kms.
The library is created with the following precedence :
[1] library id provided via the --library flag
[2] space metadata has any library associated with the node ID
[3] create a new library (requires --kms or the kms of the space will be used)
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
node | id | ✓ | nodes id |
locators | string[] | ✓ | ip:port of locators |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--force-library | bool | with --library overwrite library already set for the node | |
--ignore-library | bool | don't create and ignore library for the node | |
--kms | id | kms id | |
--library, -l | id | library id | |
--private | bool | add node as observer (not actively participating in part storage and routing) |
Examples
# add node with default api endpoints using a DNS hostname.
# This example registers the following API endpoints:
# - fabric api: http://64.10.10.88, https://example.mydomain.com
# - eth api: http://64.10.10.88:8545, https://example.mydomain.com/eth/
# where example.mydomain.com resolves to the IP address 64.10.10.88
# - use existing library
elv space node add inod3q2bqw7nG56M9w6K5GLq66Q3nmUh example.mydomain.com --library ilib1Bhh3pU9gLXZiNDL6PEZuEP5ri
# - use library from space
elv space node add inod3q2bqw7nG56M9w6K5GLq66Q3nmUh example.mydomain.com
# - create new library
elv space node add inod3q2bqw7nG56M9w6K5GLq66Q3nmUh example.mydomain.com --kms ikmsmV97BEKk5yUdTDkZw5J7MfHUgKt
# add node with specific api endpoints. All endpoints that are to be registered must be explicitly specified.
# Endpoints for the fabric API are prefixed with "fab+"
# Endpoints for the ethereum API are prefixed with "eth+"
# This example registers the following API endpoints:
# - fabric api: http://1.1.1.1:80, https://example.mydomain.com
# - eth api: http://1.1.1.1:7007,
# - use existing library
elv space node add inod3q2bqw7nG56M9w6K5GLq66Q3nmUh fab+http://1.1.1.1:80 fab+https://example.mydomain.com eth+http://1.1.1.1:7007 --library ilib1Bhh3pU9gLXZiNDL6PEZuEP5ri
# - use library from space
elv space node add inod3q2bqw7nG56M9w6K5GLq66Q3nmUh example.mydomain.com
# - create new library
elv space node add inod3q2bqw7nG56M9w6K5GLq66Q3nmUh fab+http://1.1.1.1:80 fab+https://example.mydomain.com eth+http://1.1.1.1:7007 --kms ikmsmV97BEKk5yUdTDkZw5J7MfHUgK
space node list
elv space node list
List the fabric node(s) from content space
Options
| Option | Type | Required | Description |
|---|---|---|---|
--check-libraries | bool | when true print error if inconsistent libs are found | |
--no-libs | bool | do not retrieve node libraries |
Examples
elv space node list
elv space node list --space ispc3q2bqw7nG56M9w6K5GLq66Q3nmUh
space node listapi
elv space node listapi
List the fabric nodes through the node API
Options
| Option | Type | Required | Description |
|---|---|---|---|
--elvgeo | string | retrieve the nodes serving the given geo location | |
--proto | string | retrieve locators for the given protocol only | |
--write-token | string | retrieve the node for the given content write token |
Examples
elv space node listapi
elv space node listapi --write-token tqw__3WhUFGKoJAzvqrDWiZtkcfQHiKp4Gda4KkiwuRgX6BTFfq7hNeji2hPDW6qZxLuk7xAju4bgm8iLwK
space node remove
elv space node remove <comma separated list of node ID or addresses>
Remove list of fabric node(s) from content space.
Nodes are defined by their address which can be any of: encoded node ID, hex encoded bytes (40 chars) or hex encoding preceded by 0x.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
nodes | string[] | ✓ | nodes ids |
Examples
elv space node remove "inod3q2bqw7nG56M9w6K5GLq66Q3nmUh,inod46w6iJBvmBwct3quBxYjh4LfMQaS"
space node set
elv space node set <private|public> <comma separated list of node ID or addresses>
Set the nodes private or public.
Private nodes are not returned in /config requests and do not participate actively in part storage and routing.
Nodes are defined by their address which can be any of: encoded node ID, hex encoded bytes (40 chars) or hex encoding preceded by 0x.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
status | string | ✓ | private|public: target status of the node |
nodes | string[] | ✓ | nodes ids |
Examples
elv space node set private "inod3q2bqw7nG56M9w6K5GLq66Q3nmUh,inod46w6iJBvmBwct3quBxYjh4LfMQaS"
eth
elv eth
Ethereum operations
Subcommands
eth contract
elv eth contract <contract address in hexadecimal format>
Contract retrieves the binary code for the given contract address from ethereum and provides checksum of the binary code.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
contract | address | ✓ | contract address in hexadecimal format |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--bin | bool | provides binary of the contract | |
--bin-checksum | bool | provides SHA-256 checksum of the binary Default: true |
Examples
Retrieve binary code:
elv eth contract --bin 0x9cDBc8f380A15438D6C8B84B424a4dB01b98AfDb
Retrieve checksum of binary code:
elv eth contract --bin-checksum 0x9cDBc8f380A15438D6C8B84B424a4dB01b98AfDb
eth id
elv eth id <key>
Compute address and id from the given private key.
The private key from the current configuration is used if none is provided.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
private-key | string | ✓ | private key to use |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--node | bool | when true provide ID and public key for a node rather than for a user |
Examples
elv eth id [private-key]
eth info
elv eth info <id or addr>
Show details about the address or id provided.
It can be a contract or externally-owned account.
The cmd checks if the address/id/hash/write_token provided is
* contract - space, tenant, library, content, content-type, group.
* tokens - erc20 or erc721.
* externally-owned account - with wallet id, tenant details like tenantId,
tenant admin and content admin.
Also if it is node, kms or space-owner.
To get data from indexer, provide its config details as shown below:
In config file,
{
...
"indexer":{
"host":"",
"port":0,
"database":"",
"username":"",
"password": ""
}
}
OR
Using flags:
--indexer-database string indexer database name
--indexer-host string indexer host name
--indexer-password string indexer password
--indexer-port int indexer port number
--indexer-username string indexer user name
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
id-or-addr | string | ✓ | id or address |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--indexer-database | string | indexer database name | |
--indexer-host | string | indexer host name | |
--indexer-password | string | indexer password | |
--indexer-port | int | indexer port number Default: 0 | |
--indexer-username | string | indexer user name | |
--list-content | bool | list all contents for wallet and group | |
--list-library | bool | list all libraries for wallet and group | |
--tenant-from-library | bool | enable checking tenant info from library for wallet and group |
eth keyfile
elv eth keyfile
Keystore file commands
Subcommands
eth keyfile decrypt
elv eth keyfile decrypt <file> <password>
Decrypt an existing encrypted keystore file and provides private key
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
keyfile | string | ✓ | path to the keystore file |
password | string | ✓ | password to open the keystore file |
new-password | string | new password to reencrypt keyfile | |
scryptn | int | new scryptn for reencryption |
Examples
elv eth keyfile decrypt ~/Library/Ethereum/keystore/keyfileXYZ my-pass
eth keyfile import
elv eth keyfile import <keystore> <private-key> <password>
Import a private key into the keystore, encrypting it with the given passphrase.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
keystore | string | ✓ | keystore path |
private-key | string | ✓ | private key in hex format |
password | string | ✓ | password to encrypt keyfile |
Examples
elv eth keyfile import ~/Library/Ethereum/keystore cc5152b0ad5b65 my-pass
eth keyfile new
elv eth keyfile new <keystore> <password>
Generates a new key and stores it into the key directory, encrypting it with the given passphrase.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
keystore | string | ✓ | keystore path |
password | string | ✓ | password to encrypt new keyfile |
Examples
elv eth keyfile new ~/Library/Ethereum/keystore my-pass
eth keyfile recrypt
elv eth keyfile recrypt <file> <password> [new-password] [scryptN]
Re-encrypts (and overwrites!) an existing keystore file. Sets scrypt N parameter to 16384 by default.
Also, An optional new-password can be provided to re-encrypt the keystore file and
an optional numeric parameter can be provided to explicitly set scrypt N.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
keyfile | string | ✓ | path to the keystore file |
password | string | ✓ | password to open the keystore file |
new-password | string | new password to reencrypt keyfile | |
scryptn | int | new scryptn for reencryption |
Examples
elv eth keyfile recrypt ~/Library/Ethereum/keystore/keyfileXYZ my-pass
elv eth keyfile recrypt ~/Library/Ethereum/keystore/keyfileXYZ my-pass new-pass
eth kms
elv eth kms <kms url>
Retrieves id and public key of kms at specified url
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
kms-url | string | ✓ | url of the kms |
Examples
elv eth kms http://127.0.0.1:8545
cloud
elv cloud
Cloud commands
Subcommands
cloud presign
elv cloud presign <cloud> <file>
Create a pre-signed url for the given 'cloud' storage to the given file.
cloud: refers to a remote storage definition in the configuration. Not all storage can create pre-signed url.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
storage | string | ✓ | key to remote storage in configuration |
cloud-path | string | ✓ | path to the file |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--expires-in | duration | validity duration of the signed url after creation Default: 4h0m0s |
Examples
elv cloud presign s3 flowers.jpg
files
elv files
Files Content management commands
Subcommands
files downloadfiles ingestfiles jobsfiles listfiles presignedfiles referencefiles statusfiles upload
files download
elv files download <content id, hash or write token> <file> [<dest>]
Download a file or directory to the given destination.
If no destination is specified, download to the current directory.
Use / to download all files and directories in bundle.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
src-path | string | ✓ | path of the files to download |
dst-path | string | path to the destination file (default .) |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--decryption-mode | string | decryption mode: 'none' | 'reencrypt' | 'decrypt' Default: decrypt | |
--library, -l | id | library id of the content object | |
--progress | bool | show progress during transfer Default: true | |
--qid, -q | id | id of the content object | |
--recursive, -r | bool | recursive download of source folders Default: true | |
--storage | string | name of storage or signed url for files ingested by reference |
Examples
elv files download tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A images/flowers.jpg ~/Pictures/images/flowers.jpg --progress --recursive=false
elv files download hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk images/flowers.jpg ~/Pictures/images/flowers.jpg
files ingest
elv files ingest <content id, hash or write token> <storage> <source path> [source path..]
Ingest data from cloud objects: a single object key, a folder or a key prefix
storage: refers to the remote storage definition in the configuration
source path: can be an object key, a prefix or a folder in the cloud store, relative or absolute.
- relative to the storage access definition
- absolute must start with the same path as the storage access definition
The source path is expected to be an object key by default. Use the --source-type option if the source path is a key prefix of a folder-like path instead:
--source-type prefix
--source-type folder
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
storage | string | ✓ | key to remote storage in configuration |
source-path | string[] | ✓ | key or prefix of file object to ingest by copy |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--content-type | string | content-type (mime-type) (for keys only) | |
--dest-path | string | path to the destination folder in the files bundle (default '/') Default: / | |
--done-timeout | duration | timeout when waiting for ingest (use zero to wait without limit) Default: 0s | |
--finalize | bool | optionally finalize content after transfer (default is false when using a write token and true otherwise - i.e. when creating a new version) | |
--fjob | id | id of the upload job (if seq-index is greater than 0) | |
--force-encrypt | bool | set content encryption keys (only effective when editing a content that was not encrypted) | |
--force-no-encrypt | bool | do not use encryption keys (only effective when editing a content that was encrypted or using a draft content - with a write token) Default: true | |
--library, -l | id | library id of the content object | |
--meta | string | arbitrary metadata | |
--part-size | bytesize | size of the parts to create (leave empty to use default) | |
--qid, -q | id | id of the content object | |
--seq-complete | bool | close the request sequence | |
--seq-index | int64 | index of request (zero based) in the request sequence Default: -1 | |
--source-type | string | key | prefix | folder (default key) for source paths Default: key | |
--wait-done | bool | poll the server until ingest has completed or failed or the done-timeout limit is reached (available only if seq-complete is true) |
Examples
elv files ingest tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A s3 /bucket/Pictures/images/flowers.jpg
files jobs
elv files jobs <content write token>
Retrieve a list of the files jobs and their short status
Subcommands
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qwt | token | ✓ | write token of the content object |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of content object | |
--qid, -q | id | id of the content object |
Examples
elv files jobs tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A
files jobs status
elv files jobs status <write token> <files job id>
Retrieve the detailed status of a files job
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qwt | token | ✓ | write token of the content object |
fjob | id | ✓ | files job id |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--qid, -q | id | optional id of the content object |
Examples
elv files jobs status tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A iqfj1Bhh3pU9gLXZiNDL6PEZuEP5ri
files list
elv files list <content id, hash or write token> [path]
List files and directories in bundle.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
path | string | path of the directory or file to list |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv files list tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A
elv files tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A list /sub-dir
files presigned
elv files presigned
Files commands for ingest by copy or add reference with pre-signed URLs
Subcommands
files presigned create
elv files presigned create <cloud> <file>
Create a pre-signed url for the given 'cloud' storage to the given file.
cloud: refers to a remote storage definition in the configuration. Not all storage can create pre-signed url.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
storage | string | ✓ | key to remote storage in configuration |
cloud-path | string | ✓ | path to the file |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--expires-in | duration | validity duration of the signed url after creation Default: 4h0m0s |
Examples
elv files presigned create s3 flowers.jpg
files presigned ingest-copy
elv files presigned ingest-copy <content id, hash or write token> <pre-signed url> [path]
Ingest-copy content from a presigned URL
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
source-path | string | ✓ | signed URL of file object to ingest by copy |
dest-path | string | path to the destination folder in the files bundle (default '/') |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--content-type | string | content-type (mime-type) (for keys only) | |
--done-timeout | duration | timeout when waiting for ingest (use zero to wait without limit) Default: 0s | |
--finalize | bool | optionally finalize content after transfer (default is false when using a write token and true otherwise - i.e. when creating a new version) | |
--fjob | id | id of the upload job (only used for resuming) | |
--force-encrypt | bool | set content encryption keys (only effective when editing a content that was not encrypted) | |
--force-no-encrypt | bool | do not use encryption keys (only effective when editing a content that was encrypted or using a draft content - with a write token) Default: true | |
--library, -l | id | library id of the content object | |
--meta | string | arbitrary metadata | |
--part-size | bytesize | size of the parts to create (leave empty to use default) | |
--qid, -q | id | id of the content object | |
--wait-done | bool | poll the server until ingest has completed or failed or the done-timeout limit is reached (available only if seq-complete is true) |
Examples
elv files presigned ingest-copy tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A https://bucket.s3.eu-central-1.amazonaws.com/path?X-Amz-Algorithm=Axx /
files presigned reference
elv files presigned reference <content id, hash or write token> <pre-signed url> [path]
Reference content in cloud storage using a pre-signed URL
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
source-path | string | ✓ | signed URL of file object to reference |
dest-path | string | path to the destination folder in the files bundle (default '/') |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--content-type | string | content-type (for keys only) | |
--done-timeout | duration | timeout when waiting for ingest (use zero to wait without limit) Default: 0s | |
--finalize | bool | optionally finalize content after transfer (default is false when using a write token and true otherwise - i.e. when creating a new version) | |
--fjob | id | id of the upload job (if seq-index is greater than 0) | |
--library, -l | id | library id of the content object | |
--meta | string | arbitrary metadata | |
--qid, -q | id | id of the content object | |
--wait-done | bool | poll the server until ingest has completed or failed or the done-timeout limit is reached (available only if seq-complete is true) |
Examples
elv files presigned reference tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A https://bucket.s3.eu-central-1.amazonaws.com/path?X-Amz-Algorithm=Axx /
files presigned resume
elv files presigned resume <write token> <pre-signed url> [path]
Resume content ingest from a pre-signed URL
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qwt | token | ✓ | write token of the content object |
source-path | string | ✓ | signed URL of object |
dest-path | string | path to the destination folder in the files bundle (default '/') |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--clear-resolution | bool | clear resolution errors like erroneous ingest paths | |
--fjob | id | files job id | |
--library, -l | id | library id of the content object | |
--qid, -q | id | optional id of the content object |
Examples
elv files presigned resume tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A https://bucket.s3.eu-central-1.amazonaws.com/path?X-Amz-Algorithm=Axx /
elv files presigned resume tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A https://bucket.s3.eu-central-1.amazonaws.com/path?X-Amz-Algorithm=Axx / --fjob iqfj1Bhh3pU9gLXZiNDL6PEZuEP5ri
files reference
elv files reference <content id, hash or write token> <storage> <source path> [source path..]
Reference content in cloud storage: a single object key or a folder
storage: refers to the remote storage definition in the configuration
source path: can be an object key or a folder in the cloud store, relative or absolute.
- relative to the storage access definition
- absolute must start with the same path than the storage access definition
To specify the source path is a folder (default source-type is 'key') use:
--source-type folder
Remote storage definitions are keyed by name in the configuration. Example for a definition named 's3':
"remote_storage" : {
"s3" : {
"protocol": "s3",
"platform": "aws",
"path": "qlv-dev-eu/fabric-utests/reference/",
"storage_endpoint": {
"region": "eu-central-1"
},
"cloud_credentials": {
"access_key_id": "ACCESS_KEY",
"secret_access_key": "SECRET_KEY"
}
}
}
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
storage | string | ✓ | key to remote storage in configuration |
source-path | string[] | ✓ | key or prefix of file object to reference |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--content-type | string | content-type (for keys only) | |
--dest-path | string | path to the destination folder in the files bundle (default '/') Default: / | |
--done-timeout | duration | timeout when waiting for ingest (use zero to wait without limit) Default: 0s | |
--finalize | bool | optionally finalize content after transfer (default is false when using a write token and true otherwise - i.e. when creating a new version) | |
--fjob | id | id of the upload job (if seq-index is greater than 0) | |
--library, -l | id | library id of the content object | |
--meta | string | arbitrary metadata | |
--qid, -q | id | id of the content object | |
--seq-complete | bool | close the request sequence | |
--seq-index | int64 | index of request (zero based) in the request sequence Default: -1 | |
--source-type | string | key | prefix | folder (default key) for source paths Default: key | |
--wait-done | bool | poll the server until ingest has completed or failed or the done-timeout limit is reached (available only if seq-complete is true) |
Examples
elv files reference tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A s3 /bucket/Pictures/images/flowers.jpg
files status
elv files status <content write token> <upload-job...>
Retrieve the status of upload jobs.
Upload jobs are given by their ids in a comma separated list
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qwt | token | ✓ | write token of the content object |
ids | id[] | ✓ | ids of jobs |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of content object | |
--qid, -q | id | id of the content object |
Examples
elv files status tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A iqfu1Bhh3pU9gLXZiNDL6PEZuEP5ri,iqfuHEBfCsjmEbN453cLBTSDYbpEAkn
files upload
elv files upload <content id, hash or write token> <files...>
Add files and directories from the file system to a content object and upload their data.
* if no write token is provided a new version is created and automatically finalized after transfer.
* otherwise the draft defined by the content id and write token is used
* the draft can optionally be finalized at the end of transfer using the --finalize option.
When a new version is created or an existing draft is modified, then by default:
* encryption is used if the content has owner encryption keys
* otherwise content is uploaded and stored in clear
In these cases the --force-encrypt or --force-no-encrypt flags can be used to force enabling or disabling encryption.
Failed uploads can be resumed by using the same command line that was used to launch them at first and providing the
list of created upload jobs via the --resume flag.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
files | string[] | ✓ | path to files to upload |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--dest-path | string | destination path in the files bundle Default: / | |
--finalize | bool | optionally finalize content after transfer (default is false when using a write token and true otherwise - i.e. when creating a new version) | |
--force-encrypt | bool | set content encryption keys (only effective when editing a content that was not encrypted) | |
--force-no-encrypt | bool | do not use encryption keys (only effective when editing a content that was encrypted or using a draft content - with a write token) | |
--library, -l | id | library id of the content object | |
--no-overwrite | bool | do not overwrite files already on the object with same name and size | |
--part-size | bytesize | size of the parts to create | |
--progress | bool | show progress during transfer Default: true | |
--qid, -q | id | id of the content object | |
--resume | id[] | resume a previous incomplete upload with these upload job ids |
Examples
elv files upload tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A ~/Pictures/images/flowers.jpg --progress
elv files upload tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A ~/Pictures/images/flowers.jpg --finalize
elv files upload tq__3R3nmfrrxELVxZbfVfbMgeWMkEj834A ~/Pictures/images/flowers.jpg --no-overwrite
live
elv live
Creates a content of type 'live streaming' and returns the UDP port number of a network listener that captures the live stream data. All captured data is recorded to a secondary content object for subsequent on-demand access.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
file | string | path to file to submit |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--timeout | duration | timeout for 'start stream' Default: 30s |
submit
elv submit <file>
Submit content objects of specific types (currently 'imf' and 'video') by specifying
source files and metadata details in a TOML file. If a library or content type hash
are specified on the command line, they override TOML file values.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
file | string | ✓ | path to file to submit |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--kms | id | kms id | |
--library | id | library id to create content object | |
--qtype-hash | hash | content-type hash |
media
elv media
Media commands
Subcommands
media drm
elv media drm <content id, hash or write token>
Retrieve media DRM keys found at conventional locations.
Retrieve DRM keys encrypted with the content encryption key at:
- offerings/default/playout/drm_keys
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
qhit | string | ✓ | content hash or id or write token |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--library, -l | id | library id of the content object | |
--qid, -q | id | id of the content object |
Examples
elv media drm iq__1Bhh3pU9gLXZiNDL6PEZuEP5ri
completion
elv completion [bash|zsh|fish|powershell]
To load completions:
Bash:
# Bash 4.1+ is required
# macOS: see https://itnext.io/upgrading-bash-on-macos-7138bd1066ba
$ source <(elv completion bash)
# To load completions for each session, execute once:
# Linux:
$ elv completion bash > /etc/bash_completion.d/elv
# macOS:
$ elv completion bash > $(brew --prefix)/etc/bash_completion.d/elv
# configure bash aliases
#$ alias cli_prod='qfab_cli --config ~/.eluvio/cli/conf-prod.json'
#$ complete -o default -F __start_qfab_cli cli_prod
Zsh:
# If shell completion is not already enabled in your environment,
# you will need to enable it. You can execute the following once:
$ echo "autoload -U compinit; compinit" >> ~/.zshrc
# To load completions for each session, execute once:
$ elv completion zsh > "${fpath[1]}/_elv"
# You will need to start a new shell for this setup to take effect.
fish:
$ elv completion fish | source
# To load completions for each session, execute once:
$ elv completion fish > ~/.config/fish/completions/elv.fish
PowerShell:
PS> elv completion powershell | Out-String | Invoke-Expression
# To load completions for every new session, run:
PS> elv completion powershell > elv.ps1
# and source this file from your PowerShell profile.
Note: history must be enabled in configuration to fully benefit of completions.
testing
elv testing
Testing functions
Subcommands
testing content
elv testing content
Testing functions for content
Subcommands
testing content access
elv testing content access <options.json url> | <q_hash>
Access and download all segments for each resolution of the content, using:
- a full url to the options.json (including authorization)
- or q_hash. In this case the cli retrieves the authorization
- or qid. The cli retrieves the latest version and makes the authorization
Logs are located in file 'testing.log' in the test folder (use flag "--log-level info" for info logs).
Download times for each segment are available with info logs.
For debug logs use flag "-d" or "--log-level debug".
The execution of the command may be limited to a number of segments using flag --segments-count or
to a maximum duration using flag --run-duration or limited at runtime by hitting ^C.
The commands terminates at the earliest if both --segments-count and --run-duration are provided.
Hitting ^C multiple times terminates the execution immediately (and no result reported).
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
option-url | string | ✓ | <options.json url> | <content hash> |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--details | bool | print separate statistics for init-segments playlist and segments in addition to global statistics | |
--file-output | string | path to a file where to print output instead of terminal. In table mode this implies no color | |
--library, -l | id | library id | |
--monitor-period | duration | when non zero print periodically statistics to the terminal or to the output file Default: 0s | |
--no-progress | bool | do not show progress bar | |
--no-table-color | bool | no color when using table result | |
--output-mode | string | select the output mode: av_segments | av_merge | av_all av_segments: output segments as individual files av_merge: merge segments into mp4 av_all: output individual segments as well as merged mp4 Default: av_all | |
--preserve-output | bool | keep the original file names for HLS (DASH is unaffected) | |
--purge-after | bool | remove test folder after run | |
--purge-before | bool | purge test folder before run | |
--rep | string | filter (regex) to select representation to download (example 'video/360@1500000') | |
--run-duration | duration | total time to run. Stops at the earliest if both 'segments-count' and 'run-duration' are specified. Default: 0s | |
--segment-duration | duration | when set pauses the download for that duration Default: 0s | |
--segments-count | int | count of segments to download per resolution Default: 0 | |
--streams | string[] | comma separated filters to select streams to download (like 'hls-clear or dash-clear') | |
--table | bool | print result as table instead of json | |
--test-folder | string | test folder (created in $TMPDIR if not specified) |
Examples
elv testing content access http://localhost:8008/qlibs/ilib234/q/hq__Jbxx/rep/playout/default/options.json?authorization=eyJxx
elv testing content access http://localhost:8008/qlibs/ilib234/q/hq__Jbxx/rep/playout/default/options.json?authorization=eyJxx --streams "hls-clear,dash-clear" --rep "videovideo_1920x1080.*|audio" --segments-count 2 --output-mode av_segments
elv testing content access http://localhost:8008/qlibs/ilib234/q/hq__Jbxx/rep/playout/default/options.json?authorization=eyJxx --streams "hls-clear,dash-clear" --rep "videovideo_1920x1080.*|audio" --run-duration 2m --output-mode av_segments --monitor-period 20s --file-output testing_access.json
elv testing content access http://localhost:8008/qlibs/ilib234/q/hq__Jbxx/rep/playout/default/options.json?authorization=eyJxx --streams "hls-clear,dash-clear" --rep "videovideo_1920x1080.*|audio" --run-duration 2m --output-mode av_segments --monitor-period 20s --file-output testing_access.txt --table
elv testing content access hq__Jbxx
testing content control
elv testing content control <mezannine path> <<options.json url> | <q_hash>>
Access and download all segments for each resolution of the content, then compare the merged av files with the downloaded ones.
- mezannine path: path to the metadata.json file defining mezzanine files
- access to the content is either:
- a full url to the options.json (including authorization)
- or a content hash. In this case the cli retrieves the authorization
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
mez-path | string | ✓ | path to the json metadata |
option-url | string | ✓ | <options.json url> | <content hash> |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--cmp-audio-lenient | bool | lenient audio comparison (never fail) | |
--cmp-audio-period | int | period in seconds for audio comparison (0 for the whole file) Default: 10 | |
--cmp-video-lenient | bool | lenient video comparison (never fail) | |
--cmp-video-ssim-all | float64 | SSIM 'all' threshold Default: 0.9 | |
--cmp-video-ssim-window | int | number of frames for windowed verification Default: 5 | |
--cmp-video-ssim-yuv | float64 | YUV threshold for windowed verification Default: 0.6 | |
--library, -l | id | library id | |
--output-mode | string | select the output mode: av_segments | av_merge | av_all av_segments: output segments as individual files av_merge: merge segments into mp4 av_all: output individual segments as well as merged mp4 Default: av_all | |
--preserve-output | bool | keep the original file names for HLS (DASH is unaffected) | |
--purge-after | bool | remove test folder after run | |
--purge-before | bool | purge test folder before run | |
--rep | string | filter (regex) to select representation to download (example 'video/360@1500000') | |
--streams | string[] | comma separated filters to select streams to download (like 'hls-clear or dash-clear') | |
--test-folder | string | test folder (created in $TMPDIR if not specified) |
Examples
elv testing content control /test-assets/media/s01_e01/metadata.json http://localhost:8008/qlibs/ilib234/q/hq__Jbxx/rep/playout/default/options.json?authorization=eyJxx
elv testing content control /test-assets/media/s01_e01/metadata.json hq__Jbxx
testing content deploy
elv testing content deploy <mezannine path>
Deploy a content then access and optionally control it.
A library is created if the --library flag is not provided.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
mez-path | string | ✓ | path to the json metadata |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--cmp-audio-lenient | bool | lenient audio comparison (never fail) | |
--cmp-audio-period | int | period in seconds for audio comparison (0 for the whole file) Default: 10 | |
--cmp-video-lenient | bool | lenient video comparison (never fail) | |
--cmp-video-ssim-all | float64 | SSIM 'all' threshold Default: 0.9 | |
--cmp-video-ssim-window | int | number of frames for windowed verification Default: 5 | |
--cmp-video-ssim-yuv | float64 | YUV threshold for windowed verification Default: 0.6 | |
--kms-id | id | kms ID | |
--library, -l | id | library id | |
--output-mode | string | select the output mode: av_segments | av_merge | av_all av_segments: output segments as individual files av_merge: merge segments into mp4 av_all: output individual segments as well as merged mp4 Default: av_all | |
--preserve-output | bool | keep the original file names for HLS (DASH is unaffected) | |
--purge-after | bool | remove test folder after run | |
--purge-before | bool | purge test folder before run | |
--rep | string | filter (regex) to select representation to download (example 'video/360@1500000') | |
--skip-compare | bool | do not run comparison after download | |
--streams | string[] | comma separated filters to select streams to download (like 'hls-clear or dash-clear') | |
--test-folder | string | test folder (created in $TMPDIR if not specified) |
Examples
elv testing content deploy /test-assets/media/s01_e01/metadata.json
testing parts
elv testing parts
Testing functions for content parts
Subcommands
testing parts rw
elv testing parts rw <qid or q_hash> [qid or q_hash]...
Upload parts to each content then download all parts from all active nodes of the fabric.
Either the upload or download step can be skipped using the appropriate flag (--no-read or --no-write) but not both.
The configuration of the cli determines the publishing node.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
contents | string[] | ✓ | qid or qhash of the content objects |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--commit-message, -m | string | commit message | |
--finalize-timeout | duration | timeout to wait for content finalized Default: 30s | |
--library, -l | id | library id to create content object | |
--no-progress | bool | don't show progress' | |
--no-read | bool | skip reading parts | |
--no-write | bool | skip writing parts | |
--part-count | int | count of parts to create in each content Default: 10 | |
--part-size | bytesize | size of the parts to create Default: 32MB | |
--read-http | bool | use the http locator for reading parts | |
--read-workers | int | maximum number of reading workers Default: 20 | |
--write-workers | int | maximum number of writing workers Default: 20 |
Examples
elv testing parts rw iq__3acmABX89FnaCYasHfxtu2vSJ2HB
elv testing parts rw iq__3acmABX89FnaCYasHfxtu2vSJ2HB --library ilib2uku7Ww2Ta3xFou6wx5LC6XcuWnz --read-http --part-count 2 --part-size 1m
tools
elv tools
Miscellaneous helper commands
Subcommands
tools decode
elv tools decode <item> [item...]
Decode the given string(s), which can be one of the following: id, hash, address, auth token, URL.
When decoding an auth token that uses a blockchain transaction, the type of
the transaction is retrieved if a connection to the blockchain is available
(either by specifying --secret <secret> --config-url <url> or --config).
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
items... | string[] | ✓ | the items to decode |
Options
| Option | Type | Required | Description |
|---|---|---|---|
--id-type | string | ID type to use when decoding an address: library|content|space|node|user|kms|tenant|group |
Examples
elv tools decode hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk
elv tools decode hq__FRk4G2xbLQwVNKA132V8dw8J3NucYGXeeLmfUtEfLw3NoXBcY37xDUmS4Y61oiPgGWseTBRdEN hq__QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk