UiPath Documentation
uipath-cli
latest
false
UiPath CLI user guide

uip api-workflow validate

Syntax and options for `uip api-workflow validate`, which checks an API Workflow JSON file's structure before packaging or running it.

uip api-workflow validate checks an API Workflow JSON file's structure — task shapes, expressions, and metadata — against schema, without executing it. Use it as a fast pre-flight check before run or pack.

For File to Base64 and Base64 to File activities, validation also checks that the task's script calls $helpers.file.fileToBase64(...) or $helpers.file.base64ToFile(...) with that exact name. Any other spelling is reported as an error, because the run would fail with "is not a function".

Validation also reports the following:

  • A workflow-level output.as or input.from is an error. A run ignores both fields: a workflow returns data only from a Response activity, and the first activity receives the raw workflow input. A workflow-level input.schema or output.schema and a task-level output.as are valid.
  • A <name>#Retry task, which Studio Web writes for an HTTP Request with its Retry section on, is checked as one activity. It is an error when its try does not hold exactly one call task, or when its catch has a do or no retry.
  • retry.when and retry.exceptWhen accept a runtime expression string, for example ${ $error.status >= 500 }, or an error filter object.
  • A retry policy with fields that Studio Web does not keep on its next save produces a warning. The fields still apply at run time.

Synopsis​

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

Options​

FlagDescription
--verboseEnable verbose logging, including a stack trace if validation itself throws.

Examples​

uip api-workflow validate ./workflow.json
uip api-workflow validate ./workflow.json
uip api-workflow validate ./workflow.json --verbose
uip api-workflow validate ./workflow.json --verbose

Data shape (--output json)​

{
  "Code": "ApiwfValidate",
  "Data": {
    "File": "/abs/path/to/workflow.json",
    "Status": "Valid"
  }
}
{
  "Code": "ApiwfValidate",
  "Data": {
    "File": "/abs/path/to/workflow.json",
    "Status": "Valid"
  }
}

When validation passes with warnings, Data adds a Warnings field summarizing the count and each warning's path and message. When validation fails (errors present), the command exits non-zero and reports a Failure result whose Instructions field lists every issue found, each tagged [error] or [warning] with its JSON path.

See also​

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

Was this page helpful?

Connect

Need help? Support(opens in new window)

Want to learn? UiPath Academy(opens in new window)

Have questions? UiPath Forum(opens in new window)

Stay updated