CLI: Profiles

Learn how to use the CLI to manage profiles.


Overview

Profiles let you define reusable configurations that streamline command execution. Profiles store settings such as authentication credentials, connection details, and operational preferences, reducing repetitive input. This page explains how to create, manage, and apply profiles to simplify CLI workflows.

SkySync References

The CLI references SkySync. This is expected. 

 

List Profiles

Parameter Description Required Default

search

q

Search text Optional  
offset Search offset Optional 0
limit Search page size Optional 20

List All Profiles

Command

skysync-cli profiles list

Example Results

ID                               Name
40387f13ad504f998074a8b47a48168c Profile 1
9d06d20692f0469ba74b556827a9df2c Profile 2

Example JSON Results

[
  {
    "id": "40387f13ad504f998074a8b47a48168c",
    "name": "Profile 1"
  },
  {
    "id": "9d06d20692f0469ba74b556827a9df2c",
    "name": "Profile 2"
  }
]

List Profiles Based on Text

The following examples list profiles that include the text “Profile 1” in the name. 

Command

skysync-cli profiles list --search "Profile 1"

or

skysync-cli profiles list -q "Profile 1"

List Profiles Using an Offset and Limit

An offset allows you to skip profiles and start listing at a certain number. The limit determines the number of profiles that will be returned. The following example skips the first two profiles and shows three results. 

Command

skysync-cli profiles list --offset=2 --limit=3

Show a Profile

This command will show the details of the specified profile. The parameters within the two curly braces (including the braces) will need to be replaced with valid values.

Parameter Description Required
id The ID of the profile for which details will be shown Required

Command With Variables

skysync-cli profiles show {{id}}

Command With Example Values

skysync-cli profiles show 5bc0c7dfbbea43f1bddf0e4bdde2a598

Example Results

ID            5bc0c7dfbbea43f1bddf0e4bdde2a598
Name          Example Profile
Description   An example pofile
Instructions  Example profiles instructions...do things
Job Templates Example job template
Client ID     f1e3033ba64f41309544f34848783c1d
Client Secret q6KjGOxUT1xyi33IHIQ7zg1t7VI8PrRy2A2HchL8IH0=

Example JSON Results

[
  {
    "id": "5bc0c7dfbbea43f1bddf0e4bdde2a598",
    "name": "Example Profile",
    "description": "An example pofile",
    "instructions": "Example profiles instructions...do things",
    "job_templates": [
      {
        "name": "Example job template",
        "id": "382d78ab17784b6bb14844ba1ea819bc"
      }
    ],
    "applications": [
      {
        "client_id": "f1e3033ba64f41309544f34848783c1d",
        "client_secret": "q6KjGOxUT1xyi33IHIQ7zg1t7VI8PrRy2A2HchL8IH0="
      }
    ]
  }
]

Expected Result for Invalid ID

If the entered ID does not correspond to an existing profile (for example, because the profile has been deleted), the expected output is as follows.

ID
Name
Description
Instructions
Job Templates
Client ID
Client Secret

Expected JSON Results for Invalid ID

null

Download a Profile Installation Package

This command downloads an Installation Package for a Profile. By default, the installation package is an appSettings.json file, but it can also include the installer if configured on the server. In the following examples, the authentication parameters are provided within the configuration file. See the CLI: Authentication page for more information. The parameters within the two curly braces (including the braces) need to be replaced with valid values.

Parameter Description Required Default
id The ID of the profile for which the installation package will be downloaded Required  
targetDirectory Relative or absolute path to save the downloaded installation package Optional (current directory)

Download Profile Package to the Default Directory

Command With Variables

skysync-cli profiles download {{id}}

Command With Example Values

skysync-cli profiles download 795661735f764045beeade3e94e7c04a

Example Results

File saved to C:\Git\PA\skysync-cli\appSettings.json

Download Profile Package to a Specified Directory

Command With Variables

skysync-cli profiles download {{id}} --targetDirectory={{targetDirectory}}

Command With Example Values

skysync-cli profiles download 795661735f764045beeade3e94e7c04a --targetDirectory=C:\S4\Test

Example Results

File saved to C:\S4\Test\appSettings.json

Create a Profile

This command will create a profile.

Parameter Description Required
name The name of the profile Required
description Profile description Optional
instructions Profile instructions Optional
templates A comma separated list of the job templates to associate to this new profile.  Both the ID and kind of the job template must be specified (ie. 123456:transfer) Optional

Create a Simple Profile

Command With Variables

skysync-cli profiles add {{name}}

Command With Example Values

skysync-cli profiles add "Example profile 1"

Example Results

ID            5bc0c7dfbbea43f1bddf0e4bdde2a598
Name          Example Profile 1

Example JSON Results

[
  {
    "id": "5bc0c7dfbbea43f1bddf0e4bdde2a598",
    "name": "Example Profile"
  }
]

Creating a Profile

Command With Variables

skysync-cli profiles add {{name}} --description {{profile description}} --instructions {{profile instructions}} --templates {{profile templates}}

Command With Example Values

skysync-cli profiles add "Example Profile 1" --description "An example pofile" --instructions "Example profiles instructions...do things" --templates 382d78ab17784b6bb14844ba1ea819bc

Example Results

ID            5bc0c7dfbbea43f1bddf0e4bdde2a598
Name          Example Profile 1

Example JSON Results

[
  {
    "id": "5bc0c7dfbbea43f1bddf0e4bdde2a598",
    "name": "Example Profile"
  }
]

Delete a Profile

This command will delete the specified profile.

Parameter Description Required
id The ID of the profile to be deleted Required

Command With Variables

skysync-cli profiles delete {{id}}

Command With Example Values

skysync-cli profiles delete 5bc0c7dfbbea43f1bddf0e4bdde2a598

Expected Results

The profile was deleted successfully.

Expected Results for Invalid ID

If the ID entered does not correspond to an existing profile (because the profile has already been deleted), the expected output is as follows.

The profile could not be deleted.