### Install CLI from Source Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/cli Installs the CLI using the Rust cargo package manager. ```bash cargo install --locked reinfer-cli ``` -------------------------------- ### Advance a stream request examples Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/advance-a-stream Examples of how to advance a stream using different programming languages. ```bash curl -X POST 'https:///api/v1/datasets/project1/collateral/streams/dispute/advance' \ -H "Authorization: Bearer $REINFER_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "sequence_id": "qs8QcHIBAADJ1p3W2FtmBB3QiOJsCJlR" }' ``` ```javascript const request = require("request"); request.post( { url: "https:///api/v1/datasets/project1/collateral/streams/dispute/advance", headers: { Authorization: "Bearer " + process.env.REINFER_TOKEN, }, json: true, body: { sequence_id: "qs8QcHIBAADJ1p3W2FtmBB3QiOJsCJlR" }, }, function (error, response, json) { // digest response console.log(JSON.stringify(json, null, 2)); } ); ``` ```python response = requests.post( "https:///api/v1/datasets/project1/collateral/streams/dispute/advance", headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]}, json={"sequence_id": "qs8QcHIBAADJ1p3W2FtmBB3QiOJsCJlR"}, ) print(json.dumps(response.json(), indent=2, sort_keys=True)) ``` -------------------------------- ### API Request with cURL Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/using-the-api Example of a GET request to the datasets endpoint using the Authorization header. ```shell curl -X GET "https://cloud.uipath.com/{organizationName}/{tenantName}/reinfer_/api/v1/datasets" \ -H "Authorization: Bearer {access_token}" \ -H "Accept: application/json" ``` -------------------------------- ### Manage configuration contexts via CLI Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/command-reference Examples for creating, updating, and interactively configuring named contexts. ```bash # 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///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///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///reinfer_/]: https://cloud.uipath.com///reinfer_ I New context `my-context` was created ``` -------------------------------- ### Example contexts.json configuration file Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/configuring-the-cli Displays the structure of the contexts.json file, which stores the current context and defined endpoint details. ```json { "current_context": "prod", "contexts": [ { "name": "prod", "endpoint": "https://cloud.uipath.com///reinfer_/", "token": "MYSUPERSECRETTOKEN", "accept_invalid_certificates": false, "proxy": null } ] } ``` -------------------------------- ### Handle API Errors with cURL Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/using-the-api Example of a GET request using cURL that triggers a 404 error. ```bash curl -X GET 'https:///api/v1/nonexistent_page' \ -H "Authorization: Bearer $REINFER_TOKEN" ``` -------------------------------- ### Handle API Errors with Python Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/using-the-api Example of a GET request using the requests library that triggers a 404 error. ```python response = requests.get( "https:///api/v1/nonexistent_page", headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]}, ) print(json.dumps(response.json(), indent=2, sort_keys=True)) ``` -------------------------------- ### Download and Upload IXP Projects Source: https://docs.uipath.com/ixp/automation-cloud/latest/user-guide/cli Commands for exporting a project to a local zip file and importing it into a new tenant. ```bash re -c package download --file .zip ``` ```bash re -c package upload .zip ``` ```bash re -c package upload .zip --name this_is_the_new_name ``` -------------------------------- ### Handle API Errors with Node.js Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/using-the-api Example of a GET request using the request library that triggers a 404 error. ```javascript const request = require("request"); request.get( { url: "https:///api/v1/nonexistent_page", headers: { Authorization: "Bearer " + process.env.REINFER_TOKEN, }, }, function (error, response, json) { // digest response console.log(JSON.stringify(json, null, 2)); } ); ``` -------------------------------- ### View CLI configuration usage Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/command-reference Displays the general syntax for configuration commands. ```bash re config [OPTIONS] ``` -------------------------------- ### Get raw email predictions via API Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/predictions Use these examples to send raw email data for prediction. Note that this is a billable operation charged per email. ```Bash curl -X POST 'https:///api/v1/datasets///labellers//predict-raw-emails' \ -H "Authorization: Bearer $REINFER_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "documents": [ { "raw_email": { "body": { "plain": "Hi Bob,\n\nCould you send me the figures for today?\n\nThanks,\nAlice" }, "headers": { "parsed": { "Date": "Thu, 09 Jan 2020 16:34:45 +0000", "From": "alice@company.com", "Message-ID": "abcdef@company.com", "References": "<01234@company.com> <56789@company.com>", "Subject": "Figures Request", "To": "bob@organisation.org" } } }, "user_properties": { "string:City": "London" } }, { "raw_email": { "body": { "html": "Alice,Here are the figures for today.Regards,Bob" }, "headers": { "raw": "Message-ID: 012345@company.com\nDate: Thu, 09 Jan 2020 16:44:45 +0000\nSubject: Re: Figures Request\nFrom: bob@organisation.org\nTo: alice@company.com" } }, "user_properties": { "string:City": "Bucharest" } } ], "include_comments": false, "threshold": 0.25, "transform_tag": "generic_simple_markup_set_id.0.3LPWBXWR" }' ``` ```Node const request = require("request"); request.post( { url: "https:///api/v1/datasets///labellers//predict-raw-emails", headers: { Authorization: "Bearer " + process.env.REINFER_TOKEN, }, json: true, body: { documents: [ { raw_email: { body: { plain: "Hi Bob,\n\nCould you send me the figures for today?\n\nThanks,\nAlice", }, headers: { parsed: { Date: "Thu, 09 Jan 2020 16:34:45 +0000", From: "alice@company.com", "Message-ID": "abcdef@company.com", References: "<01234@company.com> <56789@company.com>", Subject: "Figures Request", To: "bob@organisation.org", }, }, }, user_properties: { "string:City": "London" }, }, { raw_email: { body: { html: "Alice,Here are the figures for today.Regards,Bob", }, headers: { raw: "Message-ID: 012345@company.com\nDate: Thu, 09 Jan 2020 16:44:45 +0000\nSubject: Re: Figures Request\nFrom: bob@organisation.org\nTo: alice@company.com", }, }, user_properties: { "string:City": "Bucharest" }, }, ], include_comments: false, threshold: 0.25, transform_tag: "generic_simple_markup_set_id.0.3LPWBXWR", }, }, function (error, response, json) { // digest response console.log(JSON.stringify(json, null, 2)); } ); ``` -------------------------------- ### GET /api/v1/datasets///streams Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/api-reference Get all streams. ```APIDOC ## GET /api/v1/datasets///streams ### Description Get all streams. ### Method GET ### Endpoint /api/v1/datasets///streams ### Parameters #### Path Parameters - **project** (string) - Required - The project identifier. - **dataset_name** (string) - Required - The name of the dataset. ``` -------------------------------- ### GET /api/v1/datasets///streams/ Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/api-reference Get a stream by name. ```APIDOC ## GET /api/v1/datasets///streams/ ### Description Get a stream by name. ### Method GET ### Endpoint /api/v1/datasets///streams/ ### Parameters #### Path Parameters - **project** (string) - Required - The project identifier. - **dataset_name** (string) - Required - The name of the dataset. - **stream_name** (string) - Required - The name of the stream. ``` -------------------------------- ### Run Exchange Sync App with Docker Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/self-hosted-ews-integration Starts the appliance using standard configuration parameters. Ensure the API endpoint is updated to match your specific tenant. ```bash EWS_CONFIG_DIR="location_of_your_self-hosted_appliance_config_directory" REINFER_API_TOKEN="YOUR API TOKEN" TAG=latest sudo docker run \ -v $EWS_CONFIG_DIR:/mnt/config \ --env REINFER_EWS_CONFIG=/mnt/config/config.json \ --env REINFER_API_TOKEN=$REINFER_API_TOKEN \ eu.gcr.io/reinfer-gcr/ews:$TAG reinfer-ews \ --reinfer-api-endpoint https://cloud.uipath.com/YourOrganizationName/TenantName/reinfer_/api \ &> ews_$(date -Iseconds).log ``` -------------------------------- ### GET /api/v1/datasets///streams//results Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/api-reference Get results from a stream. ```APIDOC ## GET /api/v1/datasets///streams//results ### Description Get results from a stream. ### Method GET ### Endpoint /api/v1/datasets///streams//results ### Parameters #### Path Parameters - **project** (string) - Required - The project identifier. - **dataset_name** (string) - Required - The name of the dataset. - **stream_name** (string) - Required - The name of the stream. ``` -------------------------------- ### Access CLI Help Documentation Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/cli Displays help information for the CLI, specific commands, or subcommands. ```bash $ re --help $ re --help $ re --help ``` -------------------------------- ### Retrieve attachment content by reference Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/attachments Use these examples to fetch binary attachment data. Requires the 'View sources' permission and a valid bearer token. ```bash curl "https:///api/v1/attachments/CjQSEIExTHEqtdntoxz2WtbZDNEiIIVqcP1Sfx2L4epyRQDasa1RSODvheQ3bvLhj3L-_81G" \ -H "Authorization: Bearer $COMMUNICATIONS_MINING_TOKEN" ``` ```python response = requests.get( "https:///api/v1/attachments/CjQSEIExTHEqtdntoxz2WtbZDNEiIIVqcP1Sfx2L4epyRQDasa1RSODvheQ3bvLhj3L-_81G", headers={ "Authorization": "Bearer " + os.environ["COMMUNICATIONS_MINING_TOKEN"] }, ) print(response.content) ``` -------------------------------- ### GET /api/v1/datasets///labellers//validation Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/api-reference Get model statistics. ```APIDOC ## GET /api/v1/datasets///labellers//validation ### Description Get model statistics. ### Method GET ### Endpoint /api/v1/datasets///labellers//validation ### Parameters #### Path Parameters - **project** (string) - Required - The project identifier. - **dataset_name** (string) - Required - The name of the dataset. - **version** (string) - Required - The labeller version. ``` -------------------------------- ### Get a source by project and name Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/sources-api Retrieves source details using the project and source name. Requires the View sources permission. ```Bash curl -X GET 'https:///api/v1/sources//example' \ -H "Authorization: Bearer $REINFER_TOKEN" ``` ```Node const request = require("request"); request.get( { url: "https:///api/v1/sources//example", headers: { Authorization: "Bearer " + process.env.REINFER_TOKEN, }, }, function (error, response, json) { // digest response console.log(JSON.stringify(json, null, 2)); } ); ``` ```Python response = requests.get( "https:///api/v1/sources//example", headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]}, ) print(json.dumps(response.json(), indent=2, sort_keys=True)) ``` -------------------------------- ### PUT /api/v1/sources// Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/api-reference Create a source. ```APIDOC ## PUT /api/v1/sources// ### Description Create a source. ### Method PUT ### Endpoint /api/v1/sources// ### Parameters #### Path Parameters - **project** (string) - Required - The project identifier. - **source_name** (string) - Required - The name of the source. ``` -------------------------------- ### GET /api/v1/datasets Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/api-reference Retrieve metadata about all accessible datasets. ```APIDOC ## GET /api/v1/datasets ### Description Retrieve metadata about all accessible datasets. ### Method GET ### Endpoint /api/v1/datasets ``` -------------------------------- ### Get projects command Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/command-reference Lists available projects, with an optional filter for a specific dataset. ```bash re get projects [dataset] ``` -------------------------------- ### List sources and transform tags via CLI Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/email-transform-tags Use this command to view all configured sources and their associated transform tags. ```bash re get sources ``` -------------------------------- ### GET /api/v1/sources Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/api-reference Retrieve metadata about all accessible sources. ```APIDOC ## GET /api/v1/sources ### Description Retrieve metadata about all accessible sources. ### Method GET ### Endpoint /api/v1/sources ``` -------------------------------- ### GET /api/v1/attachments/ Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/api-reference Retrieve attachment content by reference. ```APIDOC ## GET /api/v1/attachments/ ### Description Retrieve attachment content by reference. ### Method GET ### Endpoint /api/v1/attachments/ ### Parameters #### Path Parameters - **attachment_reference** (string) - Required - The reference identifier of the attachment. ``` -------------------------------- ### Create a context with flags Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/configuring-the-cli Use command-line flags to define context parameters during creation. ```bash ➜ re config add --name acme-dev --endpoint https://cloud.uipath.com///reinfer_/ I A new context `acme-dev` will be created. * Enter API token [none]: MYSUPERSECRETTOKEN I Default context set to `acme-dev` I New context `acme-dev` was created. ``` -------------------------------- ### GET /api/v1/datasets/ Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/api-reference Retrieve metadata about all datasets in a project. ```APIDOC ## GET /api/v1/datasets/ ### Description Retrieve metadata about all datasets in a project. ### Method GET ### Endpoint /api/v1/datasets/ ### Parameters #### Path Parameters - **project** (string) - Required - The project identifier. ``` -------------------------------- ### View Detailed CLI Help Output Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/cli Displays the full help menu for the reinfer-cli tool, including flags, options, and available subcommands. ```text $ re --help reinfer-cli 0.11.0 re is the command line interface to reinfer clusters USAGE: re [FLAGS] [OPTIONS] FLAGS: -h, --help Prints help information -V, --version Prints version information -v, --verbose Enable more verbose logging OPTIONS: -k, --accept-invalid-certificates --config-file Path to the configuration file. Typically defaults to ~/.config/reinfer on Linux -c, --context Specify what context to use. Overrides the current context, if any --endpoint Specify what endpoint to use. Overrides the one from the current context, if any -o, --output Output format. One of: json, table [default: table] --proxy URL for an HTTP proxy that will be used for all requests if specified --token Specify what API token to use. Overrides the one from the current context, if any SUBCOMMANDS: completion Output shell completion code for the specified shell (bash or zsh) config Manage reinfer authentication and endpoint contexts create Create new resources delete Delete a resource get Display resources and export comments to the local filesystem help Prints this message or the help of the given subcommand(s) update Update existing resources ``` -------------------------------- ### Retrieve a dataset by name Source: https://docs.uipath.com/ixp/automation-cloud/latest/cm-user-guide/datasets-api Examples for fetching a specific dataset using different programming languages. ```Bash curl -X GET 'https:///api/v1/datasets//example' \ -H "Authorization: Bearer $REINFER_TOKEN" ``` ```Node const request = require("request"); request.get( { url: "https:///api/v1/datasets//example", headers: { Authorization: "Bearer " + process.env.REINFER_TOKEN, }, }, function (error, response, json) { // digest response console.log(JSON.stringify(json, null, 2)); } ); ``` ```Python response = requests.get( "https:///api/v1/datasets//example", headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]}, ) print(json.dumps(response.json(), indent=2, sort_keys=True)) ```