CLI: Users and Groups
On This Page
- 1 Overview
- 2 Permissions
- 3 Roles
- 3.1 List the Roles
- 3.2 Show a Role
- 3.3 Create a Role
- 4 Groups
- 4.1 List the Groups
- 4.2 Show a Group
- 4.3 Create a Group
- 5 Users
- 5.1 List the Users
- 5.2 Show a User
- 5.2.1 Command with example values
- 5.2.2 Example results
- 5.2.3 Example results (JSON)
- 5.3 Create a User
- 5.4 Delete a User
- 6 Password Administration
The CLI references “skysync.” This is expected.
Overview
This portion of the CLI exposes the ability to manage users, groups, and roles. For more information about access controls, visit the access control documentation.
Permissions
List the Permissions
The permissions are listed out by the category to which they belong.
parameter | description | required | default |
---|---|---|---|
search | Retrieve permissions that match the search criteria | optional |
|
Example 1: List all the permission categories and permissions
In the following example, the authentication parameters are provided within the configuration file. See the authentication section for more information.
Command
skysync-cli permissions list
Example results
ID Category Name
4f363d230da046108b00a4586ce75055 Connections List Connections, Manage Connections, Read Content, Write/Delete Content
a2f88280c80c475a908d44ea752c0d94 Jobs List Jobs, Manage Jobs, Control Jobs (i.e. Start/Stop/Pause), Manage Templates, List Remote Sites, Manage Remote Sites, Invoke Remote Sites, Establish Remote Sites
ab70847b71c042b1bae66461f5dda04c Security List Users and Groups, Manage Users and Groups, Manage Access Rights
Example results (JSON)
[
{
"id": "4f363d230da046108b00a4586ce75055",
"name": "Connections",
"permissions": [
{
"name": "List Connections",
"id": "47c6cd5954f041df8d79e1972cc1ce3b"
},
{
"name": "Manage Connections",
"id": "294eee9539354739b194da1a879bc163"
},
{
"name": "Read Content",
"id": "0a92ab0e02414a51b03497490df76ada"
},
{
"name": "Write/Delete Content",
"id": "989d1df3d6af47afadb0a74e42efc92c"
}
]
},
{
"id": "a2f88280c80c475a908d44ea752c0d94",
"name": "Jobs",
"permissions": [
{
"name": "List Jobs",
"id": "bbd25a404cdc4e01baabd0b79394cbd8"
},
{
"name": "Manage Jobs",
"id": "d9507ec76bf7414aa8a74a0c88c32a48"
},
{
"name": "Control Jobs (i.e. Start/Stop/Pause)",
"id": "3560a25976504967bcd48a7e668a07a8"
},
{
"name": "Manage Templates",
"id": "86b29346112b48528f8e4aeed0137262"
},
{
"name": "List Remote Sites",
"id": "ffee260e389a42f7b23ce75b46b79e2e"
},
{
"name": "Manage Remote Sites",
"id": "5e97f402d6b14a599eeba998d5d63044"
},
{
"name": "Invoke Remote Sites",
"id": "64ce9e42a7ac402086bf229c346bc533"
},
{
"name": "Establish Remote Sites",
"id": "1f0d640960f949bda50f1eed7a7fa9ba"
}
]
},
{
"id": "ab70847b71c042b1bae66461f5dda04c",
"name": "Security",
"permissions": [
{
"name": "List Users and Groups",
"id": "915fb2c972a3479ab3272b62507b7300"
},
{
"name": "Manage Users and Groups",
"id": "e7e4f17053fa41489dfb026d18d6bc40"
},
{
"name": "Manage Access Rights",
"id": "5a16a060c35d467882c007979926bdfe"
}
]
}
]
Example 2: List permissions with the "manage" in the name
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 Permission Category
This command will show the details of the specified permission category.
parameter | description | required | default |
---|---|---|---|
id | The ID of the permission category for which details will be shown | required |
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)
Roles
List the Roles
parameter | description | required | default |
---|---|---|---|
search | Retrieve roles that match the search criteria | optional |
|
offset | Search offset | optional | 0 |
limit | Search page size | optional | 20 |
Example 1: List all the roles
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)
Example 2: List roles with "administrator" in the name
In the following example, the authentication parameters are provided within the configuration file. See the authentication section for more information.
Command
Example 3: List the roles 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
Example 4: List only 5 roles
In the following example, the authentication parameters are provided within the configuration file. See the authentication section for more information.
Command
Show a Role
This command will show the details of the specified role.
parameter | description | required | default |
---|---|---|---|
id | The ID of the role for which details will be shown | required |
|
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 role, for example, if the ID is mistyped, the expected output is the following.
Expected results
Expected results (JSON)
Create a Role
This command provides the ability to create a role.
parameter | description | required | default |
---|---|---|---|
name | Name of the role | required |
|
permissions | A comma separated list of the IDs of the permissions (not permission categories) that belong to this role |
|
|
Example 1: Create a new role
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 sample values
Example results
Example results (JSON)
Example 2: Create a new role with permissions
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 sample values
Groups
List the Groups
parameter | description | required | default |
---|---|---|---|
parent | Retrieve groups that belong to this parent group | optional |
|
search, q | Retrieve groups that match the search criteria | optional |
|
offset | Search offset | optional | 0 |
limit | Search page size | optional | 20 |
Example 1: List all the groups
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)
Example 2: List groups with the "Tenant 1" in the name
In the following example, the authentication parameters are provided within the configuration file. See the authentication section for more information.
Command
Example 3: List the groups 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
Example 3: List the groups belonging to a specified parent group
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
Show a Group
This command will show the details of the specified group.
parameter | description | required | default |
---|---|---|---|
id | The ID of the group for which details will be shown | required |
|
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 group, for example, if the ID is mistyped, the expected output is the following.
Expected results
Expected results (JSON)
Create a Group
This command provides the ability to create a group.
parameter | description | required | default |
---|---|---|---|
name | Name of the group | required |
|
parent | The ID of the parent ownership group |
|
|
Example 1: Create a new group
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)
Example 2: Create a new group with a parent
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)
Users
List the Users
parameter | description | required | default |
---|---|---|---|
active | Only retrieve active users | optional |
|
search, q | Retrieve the users that match the search criteria | optional |
|
offset | Search offset | optional | 0 |
limit | Search page size | optional | 20 |
Example 1: List all the users
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)
Example 2: List users with an email address of "test@example.com"
In the following example, the authentication parameters are provided within the configuration file. See the authentication section for more information.
Command
Example 3: List users by status
Users can be retrieved based on a given status. The status can be either "active" or "disabled." The example below shows retrieving all active users. The authentication parameters are provided within the configuration file. See the authentication section for more information.
Command
Example 4: List the users 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 User
This command will show the details of the specified user.
parameter | description | required | default |
---|---|---|---|
id | The ID of the user for which details will be shown | required |
|
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 user, for example, if the user was already deleted, the expected output is the following.
Expected results
Expected results (JSON)
Create a User
This command provides the ability to create a user.
parameter | description | required | default |
---|---|---|---|
new-user-username | Login username for the new user | required |
|
new-user-password | Password for the new user | required |
|
new-user-email | The e-mail address for the new user | optional |
|
new-user-display-name | The display name for the new user | optional |
|
new-user-group | The ID of the group to which the new user will belong | optional |
|
new-user-roles | A comma separated list of the IDs of the roles to which the new user will belong | optional |
|
Example 1: Create a new user
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)
Delete a User
This command will delete the specified user
parameter | description | required | default |
---|---|---|---|
id | The ID of the user to be deleted | required |
|
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 user was already deleted, the expected output is the following.
Expected results
The response is only available in the default format. If JSON output is specified, no output will be provided.
Password Administration
Click here for more information about this feature.
Changing the Current User's Password
This command will change the current user's password
parameter | description | required | default |
---|---|---|---|
old-password | The original password for the current user | required |
|
new-password | The new password for the current user | required |
|
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
Sample expected results
Sample expected results (JSON)
Resetting a Users Password
This command will reset the specified user's password
parameter | description | required | default |
---|---|---|---|
id | The ID for the user for which the password is being reset | required |
|
new-password | The new password for the current user | required |
|
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
Sample expected results
Sample expected results (JSON)