UiPath Documentation
uipath-cli
latest
false
UiPath CLI user guide

uip api-workflow run

Syntax and options for `uip api-workflow run`, which executes an API Workflow JSON file locally using the bundled Serverless Workflow executor.

uip api-workflow run executes an API Workflow JSON file locally using the bundled Serverless Workflow executor. Input arguments are passed as JSON. By default, the executor loads UiPath credentials from the uip login session so the workflow can reach connectors and cloud-backed services; pass --no-auth to skip credential loading and run in a local-only mode.

Synopsis

uip api-workflow run <file> [options]
uip api-workflow run <file> [options]
  • <file> — path to the workflow JSON file.

Options

FlagDescription
-i, --input-arguments <json>Input arguments as a JSON string, for example '{"name": "World"}'.
--input-file <name=path>Upload a local file and pass it as the file (JobAttachment) input <name>. Repeatable for multiple files. Needs a signed-in session.
--output-dir <dir>Download every file (JobAttachment) reference in the workflow output into <dir>; each downloaded reference gains a LocalPath. Needs a signed-in session.
--folder-key <guid>Orchestrator folder key for the attachments this run creates (uploaded inputs and files written by the File to Base64 / Base64 to File activities).
--no-authSkip credential loading. The workflow runs in a local-only mode with no access to connectors or cloud-backed services (also disables --input-file/--output-dir).

Examples

# Run with an inline input object
uip api-workflow run ./workflow.json \
    --input-arguments '{"name":"World"}'

# Run without loading credentials (offline / local-only)
uip api-workflow run ./workflow.json --no-auth

# Extract just the output payload
uip api-workflow run ./workflow.json \
    --input-arguments '{"name":"World"}' \
    --output-filter 'Data.Output'

# Upload a local file as a file (JobAttachment) input, and download any file
# outputs the workflow produces
uip api-workflow run ./workflow.json \
    --input-file document=./invoice.pdf \
    --output-dir ./out
# Run with an inline input object
uip api-workflow run ./workflow.json \
    --input-arguments '{"name":"World"}'

# Run without loading credentials (offline / local-only)
uip api-workflow run ./workflow.json --no-auth

# Extract just the output payload
uip api-workflow run ./workflow.json \
    --input-arguments '{"name":"World"}' \
    --output-filter 'Data.Output'

# Upload a local file as a file (JobAttachment) input, and download any file
# outputs the workflow produces
uip api-workflow run ./workflow.json \
    --input-file document=./invoice.pdf \
    --output-dir ./out

Data shape (--output json)

{
  "Code": "WorkflowRun",
  "Data": {
    "Status": "Completed",
    "Output": {
      "greeting": "Hello, World!"
    }
  }
}
{
  "Code": "WorkflowRun",
  "Data": {
    "Status": "Completed",
    "Output": {
      "greeting": "Hello, World!"
    }
  }
}

Status reflects the executor's terminal state (Completed, Faulted, etc.). A faulted run exits non-zero per the standard exit codes.

When the workflow output includes a file (JobAttachment) reference and --output-dir is set, the shape instead centers on the downloaded file:

{
  "Code": "WorkflowRun",
  "Data": {
    "Encoded": {
      "Id": "6f1c0d2e-8a1b-4c3d-9e0f-123456789abc",
      "FullName": "invoice.base64",
      "MimeType": "text/plain",
      "LocalPath": "/abs/path/out/invoice.base64"
    }
  }
}
{
  "Code": "WorkflowRun",
  "Data": {
    "Encoded": {
      "Id": "6f1c0d2e-8a1b-4c3d-9e0f-123456789abc",
      "FullName": "invoice.base64",
      "MimeType": "text/plain",
      "LocalPath": "/abs/path/out/invoice.base64"
    }
  }
}

LocalPath is only populated when --output-dir is set — without it, the reference is returned without a local file.

See also

  • Synopsis
  • Options
  • Examples
  • Data shape (--output json)
  • Related
  • See also

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated