UiPath Documentation
ixp
latest
false
Communications Mining user guide

Command reference

Reference for all Communications Mining CLI commands, including subcommands for managing named contexts, sources, and datasets.

re config​

Operations for managing named contexts are scoped under re config command. These include subcommands to create, read, update, delete contexts, as well as setting a default named context and utilities.

Usage​

re config [OPTIONS] <SUBCOMMAND>
re config [OPTIONS] <SUBCOMMAND>

Subcommands

COMMANDDESCRIPTION
re config addCreate or modify a named context in the configuration file
re config currentDisplay the current context in use
re config deleteDelete the specified context from the reinfer configuration file
re config get-tokenPrint the token for a given context or the current one if unspecified
re config lsList all the available contexts in the configuration file
re config useSet the default context to use when none is specified for a command

To view the available subcommands or help with a given subcommand

re config help
re config help

re config add​

Create or modify a named context in the configuration file

Usage​

re config add [FLAGS] [OPTIONS]
re config add [FLAGS] [OPTIONS]

Options

NAMEDESCRIPTION
-n, --name <name>The name of the context that will be created or updated
-e, --endpoint <endpoint>The Communications Mining™ cluster endpoint that will be used for this context
-t, --token <token>The Communications Mining API token that will be used for this context
--proxy <proxy>URL for an HTTP proxy that will be used for all requests if specified
-k, --accept-invalid-certificatesWhether to accept invalid TLS certificates. You should never have to use this, you running a Communications Mining cluster locally for development

Examples​

# Add a new context called `acme`. The cli will interactively ask to provide an API token.
re config add --name acme --endpoint https://cloud.uipath.com/<org>/<tenant>/reinfer_

# Using `--name` with a context that already exists will modify it instead.# For example, the next command changes the endpoint of the `acme` context.
re config add --name acme --endpoint https://cloud.uipath.com/<org>/<tenant>/reinfer_

# Create a context specifying all information as arguments.
re config add -n staging -e https://localhost:9443 -k -t MYTOKEN

# If options are not provided, the cli will interactively prompt user to enter them
re config add
# Standard output:
* Context name: my-context
I A new context `my-context` will be created
* Enter API token [none]: SECRETTOKEN
W Be careful, API tokens are stored in cleartext in /home/marius/.config/reinfer/contexts.json
* Endpoint [https://cloud.uipath.com/<org>/<tenant>/reinfer_/]: https://cloud.uipath.com/<org>/<tenant>/reinfer_
I New context `my-context` was created
# Add a new context called `acme`. The cli will interactively ask to provide an API token.
re config add --name acme --endpoint https://cloud.uipath.com/<org>/<tenant>/reinfer_

# Using `--name` with a context that already exists will modify it instead.# For example, the next command changes the endpoint of the `acme` context.
re config add --name acme --endpoint https://cloud.uipath.com/<org>/<tenant>/reinfer_

# Create a context specifying all information as arguments.
re config add -n staging -e https://localhost:9443 -k -t MYTOKEN

# If options are not provided, the cli will interactively prompt user to enter them
re config add
# Standard output:
* Context name: my-context
I A new context `my-context` will be created
* Enter API token [none]: SECRETTOKEN
W Be careful, API tokens are stored in cleartext in /home/marius/.config/reinfer/contexts.json
* Endpoint [https://cloud.uipath.com/<org>/<tenant>/reinfer_/]: https://cloud.uipath.com/<org>/<tenant>/reinfer_
I New context `my-context` was created

re config current​

Print the current context in use to standard output

Usage​

re config current
re config current

Examples​

# Print the currently used context to stdout
re config current

# Save the current context to an environment variable
export REINFER_CONTEXT=`re config current`
# Print the currently used context to stdout
re config current

# Save the current context to an environment variable
export REINFER_CONTEXT=`re config current`

re config delete​

Delete the specified context from the reinfer configuration file

Usage​

re config delete [names]...
re config delete [names]...

Examples​

# Delete context acme
re config delete acme

# Delete multiple contexts
re config delete acme other-context
# Delete context acme
re config delete acme

# Delete multiple contexts
re config delete acme other-context

re config get-token​

Print the API token for a given context or the current one if unspecified to standard output

Usage​​

re config get-token [name]
re config get-token [name]

Examples​

# Print the API token for the current context to stdout
re config get-token

# Save the API token for the current context in an environment variable
export REINFER_TOKEN=`re config get-token`

# Same, but get the API token for a specific context (acme)
export REINFER_TOKEN=`re config get-token`
# Print the API token for the current context to stdout
re config get-token

# Save the API token for the current context in an environment variable
export REINFER_TOKEN=`re config get-token`

# Same, but get the API token for a specific context (acme)
export REINFER_TOKEN=`re config get-token`

re config ls​

List all the available contexts in the configuration file

Usage​

re config ls [OPTIONS]
re config ls [OPTIONS]

Options

OPTIONDESCRIPTION
--tokensShow API tokens (by default tokens are hidden)

re config use​

Set what context to use by default when running a command

Usage​

re config use <name>
re config use <name>

Options

OPTIONDESCRIPTION
<name>The name of the context to make the new default

re create​

Subcommands for creating new resources

Usage​

re create [OPTIONS] <SUBCOMMAND>
re create [OPTIONS] <SUBCOMMAND>

Subcommands

SUBCOMMANDDESCRIPTION
re create annotationsCreate or update annotations
re create bucketCreate a new bucket
re create commentsCreate or update comments
re create datasetCreate a new dataset
re create emailsCreate or update emails
re create projectCreate a new project
re create sourceCreate a new source
re create stream-exceptionCreate a new stream exception
re create userCreate a new user
Note: No welcome email will be sent.

Options

OPTIONDESCRIPTION
-h, --helpPrints help information
-V, --versionPrints version information

To check the available subcommands or help with a given subcommand

re create help
re create help

re get​

Print resources to standard output, including exporting comments in bulk to the local filesystem.

re get [OPTIONS] <SUBCOMMAND>
re get [OPTIONS] <SUBCOMMAND>

Subcommands

SUBCOMMANDDESCRIPTION
re get bucketsList the available buckets
re get commentGet a single comment from a source
re get commentsDownload all comments from a source
re get current-userGet the user associated with the API token in use
re get datasetsList the available datasets
re get emailsDownload emails from a bucket
re get projectsList the available projects
re get sourcesList the available sources
re get stream-commentsFetch comments from a stream
re get streamsList the available streams for a dataset
re get usersList the available users

To check the available subcommands or help with a given subcommand

re get help
re get help

Options

OPTIONDESCRIPTION
-h, --helpPrints help information
-V, --versionPrints version information

re get buckets​

List the available buckets.

Usage​
re get buckets [bucket-name]
re get buckets [bucket-name]

re get comment​

Get a single comment from a source.

Usage​
re get comment [OPTIONS] --source <source> <comment-id>
re get comment [OPTIONS] --source <source> <comment-id>
OPTIONDESCRIPTION
--source <source>(Required) Source name or id
-f, --file <path>Path where to write comments as JSON. If not specified, stdout will be used
<comment-id>Comment id

re get comments​

Download many comments from a source

re get comments [FLAGS] [OPTIONS] <source>
re get comments [FLAGS] [OPTIONS] <source>

Options

OPTIONDESCRIPTION
<source>(Required) Source name or id
-d, --dataset <dataset>Dataset name or id
-f, --file <path>Path where to write comments as JSON. If not specified, stdout will be used.
--no-progressDon't display a progress bar (only applicable when --file is used)
--from-timestamp <from-timestamp>Starting timestamp for comments to retrieve (inclusive)
--predictions <include-predictions>Save predicted labels and general fields for each comment
--reviewed-only <reviewed-only>Only download reviewed comments
--to-timestamp <to-timestamp>Ending timestamp for comments to retrieve (inclusive)

re get current-user​

Get the user associated with the API token in use

Usage​
re get current-user
re get current-user

re get datasets​

List the available datasets

Usage​
re get datasets [dataset]
re get datasets [dataset]

Options

OPTIONDESCRIPTION
<dataset>If specified, only list this dataset (name or id)

re get projects​

List the available projects

Usage​
re get projects [dataset]
re get projects [dataset]

Options

OPTIONDESCRIPTION
<dataset>If specified, only list this dataset (name or id)

re get sources​

List the available sources

Usage​
re get sources [source]
re get sources [source]

Options

OPTIONDESCRIPTION
<source>If specified, only list this dataset (name or id)

re get stream-comments​

Fetch comments from a stream

Usage​
re get stream-comments [FLAGS] [OPTIONS] --stream <stream>
re get stream-comments [FLAGS] [OPTIONS] --stream <stream>

Options

OPTIONDESCRIPTION
--stream <stream>(Required) The full stream name <owner>/<dataset>/<stream>
--individual-advanceIf set, the command will acknowledge each comment in turn, rather than full batches
--listen <listen>If set, the command will run forever polling every N seconds and advancing the stream
--size <size>The max number of comments to return per batch [default: 16]

re get streams​

List the available streams for a dataset

Usage​
re get streams --dataset <dataset>
re get streams --dataset <dataset>

Options

OPTIONDESCRIPTION
-d, --dataset <dataset>(Required) The dataset name or id

re get users​

List the available users

Usage​
re get users [OPTIONS]
re get users [OPTIONS]

Options

OPTIONDESCRIPTION
-u, --user <user>Use to retrieve a single user with the provided id

re delete​

Subcommands for deleting resources

Usage​

re delete <SUBCOMMAND>
re delete <SUBCOMMAND>

Subcommands

SUBCOMMANDDESCRIPTION
re delete bucketDelete a bucket
re delete bulkDelete comments in a source in a given time range. With no time range, covers every comment in the source, subject to --include-annotated
re delete bulk-emailsDelete all emails in a bucket in a given time range. With no time range, deletes every email in the bucket
re delete commentsDelete comments by id in a source
re delete datasetDelete a dataset
re delete emailsDelete emails by id in a bucket
re delete helpPrints this message or the help of the given subcommand(s)
re delete keyed-sync-statesDelete the keyed sync states for a bucket and mailbox
re delete projectDelete a project
re delete sourceDelete a source
re delete userDelete a user

Flags

FLAGSDESCRIPTION
-h, --helpPrints help information
-V, --versionPrints version information

To check the available subcommands or help with a given subcommand

re delete help
re delete help

re prune​

Back up and then delete data older than a cutoff across whole datasets.

For a walkthrough of a prune run, its backup layout, and how to restore from it, see Batch delete.

Usage​

re prune [FLAGS] [OPTIONS] --backup-dir <backup-dir> --datasets <datasets> --older-than-days <older-than-days>
re prune [FLAGS] [OPTIONS] --backup-dir <backup-dir> --datasets <datasets> --older-than-days <older-than-days>

Options

OPTIONDESCRIPTION
--datasets <datasets>(Required) Datasets in scope (comma-separated full names <project>/<dataset>, or ids). Every source and bucket referenced by these datasets is pruned
--older-than-days <older-than-days>(Required) Delete data older than this many days (cutoff = now - N days). 0 selects everything up to now
--backup-dir <backup-dir>(Required) Directory under which a timestamped, write-once backup folder is created
--mailbox <mailbox>Restrict deletion to a single mailbox. Emails are filtered on the exact name; comments are matched case-insensitively. Does not narrow the annotation backup

Flags

FLAGSDESCRIPTION
--include-annotatedAlso delete comments that are annotated. By default a comment is kept if it is reviewed in one of the datasets you listed
--dry-runBack up and report what would be deleted, without verifying the backup or deleting anything
-y, --yesSkip the confirmation prompt. Required for non-interactive use, unless --dry-run is set
--no-progressDon't display progress bars
-h, --helpPrints help information
-V, --versionPrints version information

Examples​

# Report what a two-year retention policy would delete, without deleting anything.
re prune --datasets my-project/my-dataset --older-than-days 730 --backup-dir /secure/cm-backups --dry-run

# Apply it across two datasets, keeping annotated comments.
re prune --datasets my-project/my-dataset,my-project/my-other-dataset --older-than-days 730 --backup-dir /secure/cm-backups

# Prune only the data synced from one mailbox, without a confirmation prompt.
re prune --datasets my-project/my-dataset --older-than-days 365 --mailbox team-inbox@example.com --backup-dir /secure/cm-backups -y
# Report what a two-year retention policy would delete, without deleting anything.
re prune --datasets my-project/my-dataset --older-than-days 730 --backup-dir /secure/cm-backups --dry-run

# Apply it across two datasets, keeping annotated comments.
re prune --datasets my-project/my-dataset,my-project/my-other-dataset --older-than-days 730 --backup-dir /secure/cm-backups

# Prune only the data synced from one mailbox, without a confirmation prompt.
re prune --datasets my-project/my-dataset --older-than-days 365 --mailbox [email protected] --backup-dir /secure/cm-backups -y

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated