CLI: Connections
On This Page
- 1 Connections
- 1.1 List the Connections
- 1.2 Show a Connection
- 1.3 List the Platforms
- 1.4 Show a Platform
- 1.5 Create a Connection
- 1.5.1 Example 1: Create a Box connection providing the authentication from the stdin
- 1.5.2 Example 2: Create an NFS connection providing the authentication from a file
- 1.5.3 Example 3: Create a Box connection providing the authentication from a file
- 1.5.4 Example 4: Create a OneDrive for Business connection providing the authentication from a file
- 1.5.5 Example 5: Create a Syncplicity connection providing the authentication from a file
- 1.6 Add a Connection to a Connection Pool
- 1.7 Remove a Connection from a Connection Pool
- 1.8 Delete a Connection
The CLI references “skysync.” This is expected.
Connections
In the following examples, the authentication parameters are provided within the configuration file. See the authentication section for more information.
List the Connections
parameter | description | required | default |
---|---|---|---|
platform, p | Storage platform | optional |
|
search, q | Search text | optional |
|
active | Only retrieve active connections | optional |
|
pools | Only retrieve connection pools. If this switch is not included, both connections and connection pools will be returned | optional |
|
offset | Search offset | optional | 0 |
limit | Search page size | optional | 20 |
Example 1: List all the connections
In the following example, the authentication parameters are provided within the configuration file. See the authentication section for more information.
Command
skysync-cli connections list
Example Results
ID Name Platform Enabled IsPool PoolName
5dc531df34554edd96c31272262ad950 My Computer My Computer true TestPool
d8b3254ad46c4aa4929f478dd0d3c51d TestPool My Computer true true
Example Results (JSON)
[
{
"id": "5dc531df34554edd96c31272262ad950",
"name": "My Computer",
"platform": {
"name": "My Computer",
"id": "fs"
},
"pool": {
"name": "TestPool",
"id": "d8b3254ad46c4aa4929f478dd0d3c51d"
}
},
{
"id": "d8b3254ad46c4aa4929f478dd0d3c51d",
"name": "TestPool",
"platform": {
"name": "My Computer",
"id": "fs"
},
"group": true
}
]
Example 2: List Box connections
In the following example, the authentication parameters are provided within the configuration file. See the authentication section for more information.
Command
Example 3: List active connections
In the following example, the authentication parameters are provided within the configuration file. See the authentication section for more information.
Command
Example 4: List connections with "test" in their name
In the following example, the authentication parameters are provided within the configuration file. See the authentication section for more information.
Command
Command
Example 5: List the connections skipping the first 5
In the following example, the authentication parameters are provided within the configuration file. See the authentication section for more information.
Command
Show a Connection
This command will show the details of the specified connection.
parameter | description | required | default |
---|---|---|---|
id | The ID of the connection 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
Command with Example Values
Example Results
Example Results (JSON)
If the ID entered does not correspond to an existing connection, for example, if the connection was already deleted, the expected output is the following.
Expected Results
Expected Results (JSON)
List the Platforms
The platform ID is required to create a connection. To retrieve the full list of available platforms, run the following command. In the following example, the authentication parameters are provided within the configuration file. See the authentication section for more information.
Command
Example Results
Example Results (JSON)
Show a Platform
This command will show the details of the specified platform.
parameter | description | required | default |
---|---|---|---|
id | The ID of the connection 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
Command with Example Values
Example Results
Example Results (JSON)
Create a Connection
This command provides the ability to create a connection.
parameter | description | required | default |
---|---|---|---|
platform, p | Storage platform | required |
|
name | Connection name | optional |
|
auth-input, in | Read authentication JSON from stdin | optional | false |
auth-file, file | The authentication JSON file | optional |
|
Example 1: Create a Box connection providing the authentication from the stdin
In this example, a connection to Box will be created. The command below returns a link you need to open in a Web browser. This will take you to the Box login page where you will provide the authentication information and grant SkySync access to the account. Once you grant the authorization, the new connection will exist in the Connections list.
Command with Variables
Box Login
Example 2: Create an NFS connection providing the authentication from a file
In this example, a connection to a network file system will be created providing the authentication from a JSON file. 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
Command with Example Values
Contents of NFSConnection2.json
Note that the uri has the backslashes escaped.
Example Results
Example Results (JSON)
Example 3: Create a Box connection providing the authentication from a file
In this example, a connection to Box will be created providing the authentication from a JSON file. 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
Command with Example Values
To utilize Box Authentication via a Box Service Account, follow the steps outline at Creating a Box (Service Account).
Contents of BoxConnection2.json
Example Results
Example Results (JSON)
Example 4: Create a OneDrive for Business connection providing the authentication from a file
In this example, a connection to OneDrive for Business will be created providing the authentication from a JSON file. 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
Command with Example Values
Contents of odfb-connection-1.json
The URI contains a portion of the username. Ensure you specify the correct URI to obtain expected results.
Example Contents of odfb-connection-1.json
Example Results
Example Results (JSON)
Example 5: Create a Syncplicity connection providing the authentication from a file
In this example, a connection to Syncplicity will be created providing the authentication from a JSON file. 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
Command with Examples
Contents of syncplicity-connection-1.json
Example Results
Example Results (JSON)
Add a Connection to a Connection Pool
This command assigns a connection to a connection pool. A connection can only be assigned to one pool. If the connection was previously assigned to a different pool, running this command with a different pool will cause it to be removed from the original pool.
parameter | description | required |
---|---|---|
id | ID of the connection to be assigned to a pool | required |
name | Name of new or existing connection pool | optional |
pool | ID of an existing connection pool | optional |
Command
Example 1: Assign a connection to a new or existing connection pool by name
If the named connection pool does not already exist, it will first be created.
Command with Example Values
Example 2: Assign a connection to an existing connection pool by id
If a connection pool does not exist with the specified id, an error will be thrown.
Command with Example Values
Remove a Connection from a Connection Pool
This command removes a connection from a connection pool. Connection pool information does not need to be specified. Once this command is run, the connection will not be attached to any pools.
parameter | description | required |
---|---|---|
id | ID of the connection to be removed from a connection pool | required |
Command
Command with Example Values
Delete a Connection
This command will delete the specified connection
parameter | description | required | default |
---|---|---|---|
id | The ID of the connection 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
Command with Example Values
If the ID entered does not correspond to an existing connection, for example, if the connection was already deleted, the expected output is the following.
Expected Results