UiPath Documentation
uipath-cli
latest
false

UiPath CLI user guide

最終更新日時 2026年5月7日

uip agent file

uip agent file operates on the individual files inside a Studio Web project — the granular cousin of uip agent pull / push, which move whole .uis archives. Use file when you want to read or overwrite a specific file (for example, patch agent.json in place) without pulling and repacking the whole solution.

Every subcommand requires an active CLI session (uip login). All subcommands honor the global options (--output, --output-filter, --log-level, --log-file). Exit codes follow the standard contract.

Synopsis

uip agent file list <projectId>                                    [--login-validity <minutes>]
uip agent file get  <projectId> <fileId> [-d <path>]               [--login-validity <minutes>]
uip agent file put  <projectId> <fileId> <localPath>               [--login-validity <minutes>]
uip agent file list <projectId>                                    [--login-validity <minutes>]
uip agent file get  <projectId> <fileId> [-d <path>]               [--login-validity <minutes>]
uip agent file put  <projectId> <fileId> <localPath>               [--login-validity <minutes>]

<projectId> is a Studio Web project UUID — the inner project inside a solution, not the solution itself. Get one from the CloudProjectId field of uip agent push, from the projects[] array in uip agent list, or from SolutionStorage.json in a pushed project.

uip agent file list

List the files inside a Studio Web project as a flat tree.

引数

  • <projectId> (required) — Studio Web project UUID.

オプション

フラグ既定 (Default)目的
--login-validity <minutes>10Minimum minutes of token validity required.

uip agent file list a1b2c3d4-0000-0000-0000-000000000001
uip agent file list a1b2c3d4-0000-0000-0000-000000000001

Data shape (--output json)

{
  "Code": "AgentFileList",
  "Data": [
    {
      "Path": "Agent/agent.json",
      "Id": "a1b2c3d4-0000-0000-0000-000000000201",
      "Name": "agent.json",
      "FileType": "json",
      "IsMain": "true",
      "IsEntryPoint": "true"
    }
  ]
}
{
  "Code": "AgentFileList",
  "Data": [
    {
      "Path": "Agent/agent.json",
      "Id": "a1b2c3d4-0000-0000-0000-000000000201",
      "Name": "agent.json",
      "FileType": "json",
      "IsMain": "true",
      "IsEntryPoint": "true"
    }
  ]
}

Path is the full slash-separated path from the project root, including the nested folder names. IsMain and IsEntryPoint are stringified booleans ("true" / "false"). Empty projects return Data: { "Message": "No files found in project" }.

uip agent file get

Download a single file. Either write it to disk or base64-encode it into the response.

引数

  • <projectId> (required) — Project UUID.
  • <fileId> (required) — File UUID (from file list).

オプション

フラグ既定 (Default)目的
-d, --destination <path>(write to response)Local path to write the file to. Parent directory is created automatically.
--login-validity <minutes>10Minimum minutes of token validity required.

# Download to a specific file path
uip agent file get \
  a1b2c3d4-0000-0000-0000-000000000001 \
  a1b2c3d4-0000-0000-0000-000000000201 \
  -d ./agent.json

# Fetch without writing to disk (content is inlined base64)
uip agent file get \
  a1b2c3d4-0000-0000-0000-000000000001 \
  a1b2c3d4-0000-0000-0000-000000000201
# Download to a specific file path
uip agent file get \
  a1b2c3d4-0000-0000-0000-000000000001 \
  a1b2c3d4-0000-0000-0000-000000000201 \
  -d ./agent.json

# Fetch without writing to disk (content is inlined base64)
uip agent file get \
  a1b2c3d4-0000-0000-0000-000000000001 \
  a1b2c3d4-0000-0000-0000-000000000201

Data shape (--output json)

With -d:

{
  "Code": "AgentFileGet",
  "Data": {
    "Status": "File downloaded",
    "ProjectId": "a1b2c3d4-0000-0000-0000-000000000001",
    "FileId": "a1b2c3d4-0000-0000-0000-000000000201",
    "Output": "/abs/path/agent.json"
  }
}
{
  "Code": "AgentFileGet",
  "Data": {
    "Status": "File downloaded",
    "ProjectId": "a1b2c3d4-0000-0000-0000-000000000001",
    "FileId": "a1b2c3d4-0000-0000-0000-000000000201",
    "Output": "/abs/path/agent.json"
  }
}

Without -d (inlined):

{
  "Code": "AgentFileGet",
  "Data": {
    "Status": "File downloaded",
    "ProjectId": "…",
    "FileId": "…",
    "Content": "<base64>",
    "Encoding": "base64"
  }
}
{
  "Code": "AgentFileGet",
  "Data": {
    "Status": "File downloaded",
    "ProjectId": "…",
    "FileId": "…",
    "Content": "<base64>",
    "Encoding": "base64"
  }
}

uip agent file put

Upload/overwrite a file in a Studio Web project. The file is sent as multipart form data to PUT /api/Project/<projectId>/FileOperations/File/<fileId>.

引数

  • <projectId> (required) — Project UUID.
  • <fileId> (required) — File UUID to overwrite.
  • <localPath> (required) — Local file path to upload.

オプション

フラグ既定 (Default)目的
--login-validity <minutes>10Minimum minutes of token validity required.

uip agent file put \
  a1b2c3d4-0000-0000-0000-000000000001 \
  a1b2c3d4-0000-0000-0000-000000000201 \
  ./agent.json
uip agent file put \
  a1b2c3d4-0000-0000-0000-000000000001 \
  a1b2c3d4-0000-0000-0000-000000000201 \
  ./agent.json

Data shape (--output json)

{
  "Code": "AgentFilePut",
  "Data": {
    "Status": "File uploaded",
    "ProjectId": "a1b2c3d4-0000-0000-0000-000000000001",
    "FileId": "a1b2c3d4-0000-0000-0000-000000000201",
    "LocalPath": "/abs/path/agent.json"
  }
}
{
  "Code": "AgentFilePut",
  "Data": {
    "Status": "File uploaded",
    "ProjectId": "a1b2c3d4-0000-0000-0000-000000000001",
    "FileId": "a1b2c3d4-0000-0000-0000-000000000201",
    "LocalPath": "/abs/path/agent.json"
  }
}

参照

このページは役に立ちましたか?

接続

ヘルプ リソース サポート

学習する UiPath アカデミー

質問する UiPath フォーラム

最新情報を取得