CLI: Job Categories
On This Page
- 1 Job Categories
- 1.1 List Job Categories
- 1.1.1 Example
- 1.2 Show a Job Category
- 1.2.1 Example
- 1.3 Create a Job Category
- 1.3.1 Example with parameters
- 1.4 Delete a Job Category
- 1.4.1 Example
- 1.1 List Job Categories
The CLI references “skysync.” This is expected.
Job Categories
In the following examples, the authentication parameters are provided within the configuration file. See the authentication section for more information.
List Job Categories
search, q | Search text | optional |
|
offset | Search offset | optional | 0 |
limit | Search page size | optional | 20 |
Example
Command
1
skysync-cli job-categories list
Example results
1
2
3
ID Name
-1 Default
1 Maintenance
Example results (JSON)
1
2
3
4
5
6
7
8
9
10
[
{
"id": -1,
"name": "Default"
},
{
"id": 1,
"name": "Maintenance"
}
]
Show a Job Category
id | ID of the job category to be shown | required |
Example
In the following example, the authentication parameters are provided within the configuration file. See the authentication section for more information.
Command with variables
1
skysync-cli job-categories show {{id}}
Command with example values
1
skysync-cli job-categories show 1
Example results
1
2
ID 1
Name Maintenance
Example results (JSON)
1
2
3
4
5
6
[
{
"id": 1,
"name": "Maintenance"
}
]
Create a Job Category
name | Job category name | string | required |
|
Example with parameters
command with variables
1
skysync-cli job-categories add {{name}}
Command with example values
1
skysync-cli job-categories add 'HR Department'
Expected result
1
2
ID 2
Name HR Deparment
Expected result (JSON)
1
2
3
4
5
6
[
{
"id": 2,
"name": "HR Department"
}
]
Delete a Job Category
id | ID of the job category to be deleted | required |
Example
In the following example, the authentication parameters are provided within the configuration file. See the authentication section for more information.
Command with variables
1
skysync-cli job-categories delete {{id}}
Command with example values
1
skysync-cli job-categories delete 2
Expected result
1
The job category was deleted successfully.
Error result
1
The job category could not be deleted.