CLI: Job Categories



On This Page

 


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

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

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

parameter

description

required

parameter

description

required

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

parameter

description

type

option 1

option 2

parameter

description

type

option 1

option 2

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

parameter

description

required

parameter

description

required

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.