CLI: Profiles



On This Page

 


The CLI references “skysync.” This is expected.

Profiles

List Profiles

parameter

description

required

default

parameter

description

required

default

search, q

Search text

optional

 

offset

Search offset

optional

0

limit

Search page size

optional

20

Example 1: List all the profiles

In the following example, the authentication parameters are provided within the configuration file.  See the authentication section for more information.  

Command

1 skysync-cli profiles list

Example results

1 2 3 ID Name 40387f13ad504f998074a8b47a48168c Profile 1 9d06d20692f0469ba74b556827a9df2c Profile 2

Example results (JSON)

1 2 3 4 5 6 7 8 9 10 [ { "id": "40387f13ad504f998074a8b47a48168c", "name": "Profile 1" }, { "id": "9d06d20692f0469ba74b556827a9df2c", "name": "Profile 2" } ]

 

Example 2: List profiles with "Profile 1" in their name

In the following example, the authentication parameters are provided within the configuration file.  See the authentication section for more information.  

Command

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

Command

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

 

Example 3: List the profiles skipping the first 2 and showing 3 results

In the following example, the authentication parameters are provided within the configuration file.  See the authentication section for more information.  

Command

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

 

Show a Profile

This command will show the details of the specified profile.

parameter

description

required

default

parameter

description

required

default

id

The ID of the profile for which details will be shown

required

 

In the following example, the authentication parameters are provided within the configuration file.  See the authentication section for more information.  The parameters within the two curly braces (including the braces) will need to be replaced with valid values.

Command with variables

1 skysync-cli profiles show {{id}}

Command with example values

1 skysync-cli profiles show 5bc0c7dfbbea43f1bddf0e4bdde2a598

Example results

1 2 3 4 5 6 7 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 results (JSON)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [ { "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=" } ] } ]


If the ID entered does not correspond to an existing profile, for example, if the profile was already deleted, the expected output is the following.

Expected results

1 2 3 4 5 6 7 ID Name Description Instructions Job Templates Client ID Client Secret

Expected results (JSON)

1 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

parameter

description

required

default

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)

In the following examples, the authentication parameters are provided within the configuration file.  See the authentication section for more information.  The parameters within the two curly braces (including the braces) need to be replaced with valid values.

Example 1: Download profile package to default directory

Command with variables

1 skysync-cli profiles download {{id}}

Command with example values

1 skysync-cli profiles download 795661735f764045beeade3e94e7c04a

Example results

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

 

Example 2: Download profile package to specified directory

Command with variables

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

Command with example values

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

Example results

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

 

Create a Profile

This command will create a profile.

parameter

description

required

default

parameter

description

required

default

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

 

Example 1: Creating a simple profile

In the following example, the authentication parameters are provided within the configuration file.  See the authentication section for more information.  The parameters within the two curly braces (including the braces) will need to be replaced with valid values.

Command with variables

1 skysync-cli profiles add {{name}}

Command with example values

1 skysync-cli profiles add "Example profile 1"

Example results

1 2 ID 5bc0c7dfbbea43f1bddf0e4bdde2a598 Name Example Profile 1

Example results (JSON)

1 2 3 4 5 6 [ { "id": "5bc0c7dfbbea43f1bddf0e4bdde2a598", "name": "Example Profile" } ]

 

Example 1: Creating a profile

In the following example, the authentication parameters are provided within the configuration file.  See the authentication section for more information.  The parameters within the two curly braces (including the braces) will need to be replaced with valid values.

Command with variables

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

Command with example values

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

Example results

1 2 ID 5bc0c7dfbbea43f1bddf0e4bdde2a598 Name Example Profile 1

Example results (JSON)

1 2 3 4 5 6 [ { "id": "5bc0c7dfbbea43f1bddf0e4bdde2a598", "name": "Example Profile" } ]

 

Delete a Profile

This command will delete the specified profile

parameter

description

required

default

parameter

description

required

default

id

The ID of the profile to be deleted

required

 

In the following example, the authentication parameters are provided within the configuration file.  See the authentication section for more information.  The parameters within the two curly braces (including the braces) will need to be replaced with valid values.

Command with variables

1 command with variables

Command with example values

1 skysync-cli profiles delete 5bc0c7dfbbea43f1bddf0e4bdde2a598

Expected results

1 The profile was deleted successfully.

If the ID entered does not correspond to an existing profile, for example, if the profile was already deleted, the expected output is the following.

Expected results

1 The profile could not be deleted.