# Deploying assets to Orchestrator

> * Create a CSV file that contains the assets that you want to deploy to Orchestrator.

## Prerequisites

* Create a CSV file that contains the assets that you want to deploy to Orchestrator.

  The CSV file must have the following three columns: `name`, `type`, `value`, and `description`.
* Run the CLI `exe` (for Windows) or `dll` (for Linux) file.
* Add the required Orchestrator [API access application scopes](https://docs.uipath.com/cicd-integrations/standalone/2024.10/user-guide/executing-uipath-cli-tasks).

For more information about the CSV file, check the example in the following table.

| name | type | value | description |
| --- | --- | --- | --- |
| asset_1_name | text | "i have a comment" | asset_1_description |
| asset_2_name | integer | `1` | asset_2_description |
| asset_3_name | bool | `false` | asset_3_description |
| asset_4_name | credential | username:password | asset_4_description |

To deploy assets to Orchestrator, take the following steps:

1. Run the `asset` task, using `uipcli asset`. You can notice a list of the available sub-tasks.
2. Specify the required parameters and run the `deploy` sub-task.
   The following table describes the required parameters.

 <colgroup>
  <col/>
  <col/>
 </colgroup>
 
  
     Parameter  
     Description  
  
 
 
  
    <code>-u</code> , or <code>--username</code> ( Required if you use Basic Authentication , through a username and a password) 
     The username used for authenticating to Orchestrator. You must pair it with the corresponding password.  
  
  
    <code>-p</code> , or <code>--password</code> ( Required if you use Basic Authentication , through a username and a password) 
     The password used for authenticating to Orchestrator. You must pair it with the corresponding username.  
  
  
    <code>-t</code> , or <code>--token</code> ( Required if you use  token-based authentication  ) 
     The OAuth2 refresh token used for authenticating to Orchestrator. You must pair it with the Account Name and Client ID .  
  
  
    <code>-a</code> , or <code>--accountName</code> ( Required if you use  token-based authentication  ) 
     The Orchestrator CloudRPA account name. You must pair it with the OAuth2 refresh token and Client ID .  
  
  
    <code>-A</code> , or <code>--accountForApp</code> 
     The Orchestrator CloudRPA account name(organization name). You must pair it with the Application ID , Application Secret , and Application scope for external application.  
  
  
    <code>-I</code> , or <code>--applicationId</code> ( Required if you use  external application authentication  ) 
     The external Application Id. You must pair it with the Application Account , Application Secret , and Application scope .  
  
  
    <code>-S</code> , or <code>--applicationSecret</code> ( Required if you use  external application authentication  ) 
     The external Application Secret. You must pair it with the Application Account , Application ID , and Application scope .  
  
  
    <code>--applicationScope</code> ( Required if you use  external application authentication  ) 
     The list of application scopes, separated by single spaces. You must pair it with the Application Account , Application ID , and Application Secret for external application.  
  
  
    <code>-o</code> , or <code>--organizationUnit</code> 
     The name of the Orchestrator folder (organization unit).  To input subfolders make sure to input both the parent folder name and the name of the subfolder. For instance, use <code>AccountingTeam\TeamJohn</code> . 
  
  
    <code>-l</code> , or <code>--language</code> 
     The language used in the Orchestrator user interface.  
  
  
    <code>--traceLevel</code> 
     Display the trace of the events.  
  
  
    <code>--identityUrl</code> ( Required for PaaS or MSI deployments) 
     The URL of your identity server.  
  
  
    <code>--help</code> 
     Displays the parameters and examples for this command.  
  
  
    <code>--version</code> 
     Display version information.  
  
  
    <code>Assets File (pos. 0)</code> ( Required ) 
    The name of the CSV file that contains the assets you want to delete. 
  
  
    <code>Orchestrator URL (pos.1)</code> ( Required ) 
    The URL of the Orchestrator instance. 
  
  
    <code>Orchestrator Tenant (pos.2)</code> ( Required ) for SaaP deployments.  ( Optional ) for PaaS deployments.  
    The tenant of the Orchestrator instance, where you want to manage your assets. 
  
 

## Usage

```
uipcli asset deploy <assets_file> <orchestrator_url> <orchestrator_tenant> [-u <orchestrator_user> -p <orchestrator_pass>] [-t <auth_token> -a <account_name>] [-A <organization_name> -I <application_id> -S <application_secret> --applicationScope <application_scope>] [-o <folder_name>] [-l <language>] [--traceLevel <None|Critical|Error|Warning|Information|Verbose>] [--identityUrl <identity_url>]
```

## Minimal command examples

* `uipcli asset deploy "C:\userprofile\assets.csv" "https://orch-23-10-paas.cloudapp.azure.com/" "TenantName" -u "orchestratorUsername"
  -p "********" -o "FolderName" --traceLevel "Information"`
* `uipcli asset deploy "C:\userprofile\assets.csv" "https://orch-23-10-paas.cloudapp.azure.com/" "TenantName" -I "76000552-3e4f-4590-9317-cdb420001f1d"
  -S "********" --applicationScope "OR.Folders OR.BackgroundTasks OR.TestSets OR.TestSetExecutions OR.TestSetSchedules OR.Settings.Read
  OR.Robots.Read OR.Machines.Read OR.Execution OR.Assets OR.Users.Read OR.Jobs OR.Monitoring" --identityUrl "https://orch-23-10-paas.cloudapp.azure.com/identity"
  -o "FolderName" --traceLevel "Information"`
* `uipcli asset deploy "C:\userprofile\assets.csv" "https://automation-suite.base.url.com/" "TenantName" -A "organizationName"
  -I "3f6239b9-e0e8-465e-a429-d9ffd1d9e57a" -S "********" --applicationScope "OR.Folders OR.BackgroundTasks OR.TestSets OR.TestSetExecutions
  OR.TestSetSchedules OR.Settings.Read OR.Robots.Read OR.Machines.Read OR.Execution OR.Assets OR.Users.Read OR.Jobs OR.Monitoring"
  -o "FolderName" --traceLevel "Information`
* `uipcli asset deploy "C:\userprofile\assets.csv" "https://cloud.uipath.com/" "TenantName" -A "organizationName" -I "becc663c-8f1e-409a-a75f-c00330d80bc8"
  -S "********" --applicationScope "OR.Folders OR.BackgroundTasks OR.TestSets OR.TestSetExecutions OR.TestSetSchedules OR.Settings.Read
  OR.Robots.Read OR.Machines.Read OR.Execution OR.Assets OR.Users.Read OR.Jobs OR.Monitoring" -o "FolderName" --traceLevel "Information"`
