...
align | center |
---|
...
On This Page
Table of Contents |
---|
...
Managing Remote Sites
In the following example, the authentication parameters are provided within the configuration file. See the authentication section for more information.
List the Remote Sites
Getting the list of remote sites is the first step in managing the sites.
parameter | description | required | default |
---|---|---|---|
connected | Only retrieve connected sites | optional | |
search, q | Search text | optional | |
active | Only retrieve active sites | optional | |
offset | Search offset | optional | 0 |
limit | Search page size | optional | 20 |
Example 1: List all the remote sties
In the following example, the authentication parameters are provided within the configuration file. See the authentication section for more information.
Command
Code Block |
---|
skysync-cli sites list |
Example results
Code Block |
---|
ID Name Connected IP Address Enabled
a23c94ed9edd46ae85da4401aeecdf3e remote site 1 true xxx.xxx.xxx.xxx true |
Example results (JSON)
Code Block |
---|
[
{
"id": "a23c94ed9edd46ae85da4401aeecdf3e",
"name": "remote site 1",
"connected": true,
"ip_address": "xxx.xxx.xxx.xxx",
"disabled": false,
"status_updated_on": 1506620840
}
]
|
Example 2: List connected remote sties
In the following example, the authentication parameters are provided within the configuration file. See the authentication section for more information.
Command
Code Block |
---|
skysync-cli sites list --connected |
Example 3: List disconnected remote sties
In the following example, the authentication parameters are provided within the configuration file. See the authentication section for more information.
Command
Code Block |
---|
skysync-cli sites list --connected=false |
Example 4: List sites 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
Code Block |
---|
skysync-cli sites list --search test |
Example 5: List the sites 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
Code Block |
---|
skysync-cli sites list --offset=5 |
Show a Remote Site
This command will show the details of the specified remote site.
parameter | description | required | default |
---|---|---|---|
id | The ID of the remote site 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
Code Block |
---|
skysync-cli sites show {{id}} |
Command with example values
Code Block |
---|
skysync-cli sites show 5dc531df34554edd96c31272262ad950 |
Example results
Code Block |
---|
ID a23c94ed9edd46ae85da4401aeecdf3e
Name remote site 1
Connected true
IP Address xxx.xxx.xxx.xxx
Enabled true |
Example results (JSON)
Code Block |
---|
[
{
"id": "a23c94ed9edd46ae85da4401aeecdf3e",
"name": "remote site 1",
"connected": true,
"ip_address": "xxx.xxx.xxx.xxx",
"disabled": false,
"status_updated_on": 1506620840
}
] |
Example results (JSON)
Code Block |
---|
[
{
"id": "5dc531df34554edd96c31272262ad950",
"name": "My Computer",
"platform": {
"name": "My Computer",
"id": "fs"
}
}
] |
If the ID entered does not correspond to an existing site, for example, if the site was already deleted, the expected output is the following.
Expected results
Code Block |
---|
ID
Name
Connected false
IP Address
Enabled true |
Expected results (JSON)
Code Block |
---|
null |
Download a Remote Site Installation Package
This command downloads an Installation Package for a Remote Site. 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 |
---|---|---|---|
id | The ID of the remote site 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 remote site package to default directory
Command with variables
Code Block |
---|
skysync-cli sites download {{id}} |
Command with example values
Code Block |
---|
skysync-cli sites download 795661735f764045beeade3e94e7c04a |
Example results
Code Block |
---|
File saved to C:\Git\PA\skysync-cli\appSettings.json |
Example 2: Download remote site package to specified directory
Command with variables
Code Block |
---|
skysync-cli sites download {{id}} --targetDirectory={{targetDirectory}} |
Command with example values
Code Block |
---|
skysync-cli sites download 795661735f764045beeade3e94e7c04a --targetDirectory=C:\S4\Test |
Example results
Code Block |
---|
File saved to C:\S4\Test\appSettings.json |
Create a Remote Site
This command provides the ability to create a remote site. 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
Code Block |
---|
skysync-cli sites add {{siteName}} |
Command with sample values
Code Block |
---|
skysync-cli sites add "remote site name 1" |
Sample expected results
Code Block |
---|
ID 1d3e7e9be7534b9ab0392370bacd6322
Name remote site name 1
Connected false
IP Address
Enabled true |
Delete a Remote Site
This command provides the ability to remove a remote site. 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.
Example with variables
Code Block |
---|
skysync-cli sites delete {{siteId}} |
Example with sample values
Code Block |
---|
skysync-cli sites delete 1d3e7e9be7534b9ab0392370bacd6322 |
Expected results
Code Block |
---|
The site was deleted successfully. |
If the ID entered does not correspond to an existing site, for example, if the site was already deleted, the expected output is the following.
Expected results
Code Block |
---|
The site could not be deleted. |
Info |
---|
The response is only available in the default format. If JSON output is specified, no output will be provided. |
Manage a Remote Site
The commands to support the management of a remote site follow the same format as the commands used to manage the management server with one additional parameter to specify the site being managed.
parameter | description | required | default |
---|---|---|---|
site | The ID of the site being managed | required for the management of a specific site |
Example 1: Listing the connections for a remote site
In this example, the connections for the remote site are listed. 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
Code Block |
---|
skysync-cli connections list --site {{siteId}} |
Command with sample values
Code Block |
---|
skysync-cli connections list --site a23c94ed9edd46ae85da4401aeecdf3e |
See the connections section for the expected results.
Supported Features
The following features are supported for remote sites