Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

On This Page


The CLI references “skysync.” This is expected.

Jobs

List Jobs

parameter

description

required

default

kind

Job Kind

optional

search, q

Search text

optional

status

Search by the current job status (idle, start, running, paused)

optional

parent

Search by the parent job ID

optional

node

Search by the currently executing node address

optional

active

Only retrieve active jobs

optional

offset

Search offset

optional

0

limit

Search page size

optional

20

Example 1: List all the jobs

In the following example, the authentication parameters are provided within the configuration file.  See the authentication section for more information.  

Command

skysync-cli jobs list

Expected results

ID                               Name                          Discriminator     Kind            Enabled Status
delete_jobs                      Delete Pending Jobs                             system          true    idle
job_retention_policy             Apply Job Retention Policies                    system          true    idle
4ef88eeda7904b8e9d542439a24c232d My Job 1                                        folder_mapping  true    idle
887622dea68c4189aa69d83c376c5b50 My Job 1                      folder1           transfer        true    idle

Example results (JSON)

[
  {
    "id": "delete_jobs",
    "name": "Delete Pending Jobs",
    "discriminator": "",
    "kind": "system",
    "disabled": false,
    "status": "idle"
  },
  {
    "id": "job_retention_policy",
    "name": "Apply Job Retention Policies",
    "discriminator": "",
    "kind": "system",
    "disabled": false,
    "status": "idle"
  },
  {
    "id": "4ef88eeda7904b8e9d542439a24c232d",
    "name": "My Job 1",
    "discriminator": "",
    "kind": "folder_mapping",
    "disabled": false,
    "status: "idle"
  },
  {
    "id": "887622dea68c4189aa69d83c376c5b50",
    "name": "My Job 1",
    "discriminator": "folder1",
    "kind": "transfer",
    "disabled": false,
    "status: "idle"
  }
]


Example 2: List transfer jobs

In the following example, the authentication parameters are provided within the configuration file.  See the authentication section for more information.  

Command

skysync-cli jobs list --kind transfer

Example 3: List active jobs

In the following example, the authentication parameters are provided within the configuration file.  See the authentication section for more information.  

Command

skysync-cli jobs list --active

Example 4: List jobs 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

skysync-cli jobs list --search test

Command

skysync-cli jobs list -q "test"

Example 5: List the jobs 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

skysync-cli jobs list --offset=5

Example 6: List running jobs

In the following example, the authentication parameters are provided within the configuration file.  See the authentication section for more information.  

Command

skysync-cli jobs list "--status=start,running"

Show a Job

This command will show the details of the specified job.

parameter

description

required

default

id

The ID of the job 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

skysync-cli jobs show {{id}}

Command with example values

skysync-cli jobs show bb7d0ba7015d4c9eab58a28ef46109f5

Example results

ID      bb7d0ba7015d4c9eab58a28ef46109f5
Name    Transfer Job 1
Kind    transfer
Enabled true
Status  idle

Example results (JSON)

[
  {
    "id": "bb7d0ba7015d4c9eab58a28ef46109f5",
    "name": "Transfer Job 1",
    "kind": "transfer",
    "disabled": false,
    "status": "idle"
  }
]

If the ID entered does not correspond to an existing job, for example, if the job was already deleted, the expected output is the following.

Expected results

ID
Name
Kind
Enabled true
Status

Expected results (JSON)

null

Create a Job

This command will create a job.

parameter

description

required

default

kind

The job kind

optional

transfer

name

The job name

optional

wizard, prompt

A flag to indicate a desire to run through the new-job wizard

optional

true

auto

Schedule the job as automatic

optional

true

manual

Schedule the job as manual

optional

false

job-input, in

Read JSON job from stdin

job-file, file

The job JSON file

If both auto and manual are set to true, the job will be created to run manually.

To create a job that imports permissions or metadata or performs user-drive mapping, use the below examples in conjunction with the documentation for the permissions import, the metadata import or the user-drive mapping feature.

Example 1: Creating a job using the wizard

In this example, the command run will launch a job creation wizard that will walk you through creating a job.  The authentication parameters are provided within the configuration file.  See the authentication section for more information.  

Command

skysync-cli jobs add

The wizard will prompt for a job name, desire to customize the schedule, source platform, source connection, source path, destination platform, destination connection, and destination path.

Example wizard

This wizard will walk you through creating a new job
Do you want to continue? (Y) y

Enter the job name: [default] Wizard Created Job 1

Do you want to customize the schedule? (N)

What platform do you want for the source of the job?

(1) Box
(2) My Computer
(3) Network File System
(4) Microsoft OneDrive for Business
: 3

What connection do you want for the source of the job?

(1) Network File System (\\server1\folder1)
(2) Network File System (\\server2\folder2)
(3) Add a new Network File System connection
: 1

What is the source path? /source

What platform do you want for the destination of the job?

(1) Box
(2) My Computer
(3) Network File System
(4) Microsoft OneDrive for Business
: 3

What connection do you want for the destination of the job?

(1) Network File System (\\server1\folder1)
(2) Network File System (\\server2\folder2)
(3) Add a new Network File System connection
: 2

What is the destination path? /wizardjob1
ID      16e5f218ab4142c8b0c05158aa573d85
Name    Wizard Created Job 1
Kind    transfer
Enabled true
Status

Example 2: Creating a job providing the options from the stdin

This feature is available only with scripting such as within a PowerShell or Node script.  In this example, the the job will be created by providing the JSON contents as a parameter and the schedule will be set to manual.  The authentication parameters are provided within the configuration file.  See the authentication section for more information.  

This feature is not supported from a standard terminal such as a command line; however, piping may be utilized to pass in the json option block via Node or PowerShell. See example below.

Command with variables (PowerShell)

'{"transfer": {"source": {"connection": {"id": "{{sourceConnectionId"}, "target": {"path": "{{sourcePath}}"}}, "destination": {"connection": {"id": "{{destinationConnectionId"}, "target": {"path": "{{destinationPath}}"}}}}' | skysync-cli jobs add --manual --in 

The expected output is the same as the requesting the details of the job.

Sample expected results

ID      8b9ea3d812e24d7892d88d63acb40402
Name    :  to
Kind    transfer
Enabled true
Status

Example 3: Creating a job providing the options from a file

In this example, the the job will be created by providing the location of the JSON options file and the schedule will be set to manual.  The authentication parameters are provided within the configuration file.  See the authentication section for more information.  

Command

skysync-cli jobs add --manual --job-file=job1Options.JSON

Contents of job1Options.json with variables

{
	"transfer":
	{
		"source": 
		{
			"connection": 
			{
				"id": "{{sourceConnectionId}}"
			}, 
			"target": 
			{
				"path": "{{sourcePath}}"
			}
		},
		"destination": 
		{
			"connection": 
			{
				"id": "{{destinationConnectionId}}"
			}, 
			"target": 
			{
				"path": "{{destinationPath}}"
			}
		}
	}
}

Contents of job1Options.json with sample values

{
	"transfer":
	{
		"source": 
		{
			"connection": 
			{
				"id": "490d8c2eba054392bde988a548d88354"
			}, 
			"target": 
			{
				"path": "/source"
			}
		},
		"destination": 
		{
			"connection": 
			{
				"id": "fbc78a0fa9074d20b778e6e6fc1bd898"
			}, 
			"target": 
			{
				"path": "/destination"
			}
		}
	}
}

The expected output is the same as the requesting the details of the job.

Sample expected results

ID      8b9ea3d812e24d7892d88d63acb40402
Name    :  to
Kind    transfer
Enabled true
Status

PowerShell Example script can be found within the skysync-cli project at ~skysync-cli/examples/skysync-cli-example-create-job-01.ps1

Clone a Job

This command will clone a job and optionally change the cloned job's configuration.

parameter

description

required

default

name

The job name

optional

The name of the job being cloned

job-input, in

Read JSON job from stdin

optional

job-file, file

The job JSON file

optional

Example 1: Clone a job with a new name

In this example, the command will clone an existing job with the given ID and assign the cloned job a new name.  The authentication parameters are provided within the configuration file.  See the authentication section for more information.  

Command

skysync-cli jobs clone 713291003ecf44749166db782df4c4e5 --name "Cloned Job"

Example 2: Clone a job providing the option changes from the stdin

This feature is available only with scripting such as within a PowerShell or Node script.  In this example, the the job will be created by providing the JSON contents as a parameter and the delete_propagation policy is set to ignore_source.  The authentication parameters are provided within the configuration file.  See the authentication section for more information.  

This feature is not supported from a standard terminal such as a command line; however, piping may be utilized to pass in the json option block via Node or PowerShell. See example below.

Command with variables (PowerShell)

'{"transfer": {"delete_propagation": "ignore_source"},"name": "Cloned Job"}' | skysync-cli jobs clone 713291003ecf44749166db782df4c4e5 --in 

The expected output is the same as the requesting the details of the job.

Sample expected results

ID      8b9ea3d812e24d7892d88d63acb40402
Name    Cloned Job
Kind    transfer
Enabled true
Status

Example 3: Clone a job providing the option changes from a file

In this example, the the job will be created by providing the location of the JSON options file with the same outcome as Example 2 above.  The authentication parameters are provided within the configuration file.  See the authentication section for more information.  

Command

skysync-cli jobs clone 713291003ecf44749166db782df4c4e5 --job-file=jobOptions.json

Contents of jobOptions.json with variables

{
	"name": "Cloned Job",
	"transfer": {
		"delete_propagation": "ignore_source"
	}
}

The expected output is the same as the requesting the details of the job.

Sample expected results

ID      3b238054a02144c2bbd32b5c650ee7ae
Name    Cloned Job
Kind    transfer
Enabled true
Status

Start Job(s)

This command will start the specified job(s).  At least one job specification must be provided in order to start jobs.  If the ID is provided, that job will be started.  If any of the other parameters are provided, then those will be used to filter the entire job list and start the jobs based on the provided filtering parameters.  For more information on this feature, reference: Start/Pause multiple jobs.

parameter

description

required

default

id

The ID of the job to start

optional

all

Starts all the jobs

optional

kind

Job Kind

optional

search, q

Search text

optional

active

Only retrieve active jobs

optional

offset

Search offset

optional

0

limit

Search page size

optional

20

Example 1: Start a specific job by job ID

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

skysync-cli jobs start {{id}}

Command with example values

skysync-cli jobs start 5dc531df34554edd96c31272262ad950

Expected results

ID      5dc531df34554edd96c31272262ad950
Name    Test Transfer Job 1
Kind    transfer
Enabled true
Status  start

Expected results (JSON)

[
  {
    "id": "5dc531df34554edd96c31272262ad950",
    "name": "Test Transfer Job 1",
    "kind": "transfer",
    "disabled": false,
    "status": "start"
  }
]

If the ID entered does not correspond to an existing job, for example, if the job was already deleted, the expected output is the following.

Expected results

ID
Name
Kind
Enabled true
Status

Expected results (JSON)

null

Example 2: Starting all jobs

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

skysync-cli jobs start --all

Expected results

8 jobs started

Expected results (JSON)

[
  {
    "total_count": "8"
  }
]

Example 3: Starting a filtered list of jobs

In the following example, we'll filter the jobs list by parent job, search text, kind of job, and active state.  We'll then further filter the list by using an offset and limiting the number of jobs to start.  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

skysync-cli jobs start --parent={{parentJobID}} --offset={{offset}} --limit={{limit}} --search={{searchText}} --kind={{jobKind}} --active

Here, only jobs with the parent specified will start, and then only those with text "testjob" in their names, and are of type "transfer", and those that are active.  Finally, the first two jobs will be skipped, and only the next five jobs will be started.

Command with sample values

skysync-cli jobs start --parent=5dc531df34554edd96c31272262ad950 --offset=2 --limit=5 --search=testjob --kind=transfer --active

Expected results

5 jobs started

Expected results (JSON)

[
  {
    "total_count": "5"
  }
]

Pause Job(s)

This command will pause the specified job

parameter

description

required

default

id

The ID of the job to start

optional

all

Pause all the jobs

optional

kind

Job Kind

optional

search, q

Search text

optional

status

Search by the current job status (idle, start, running, paused)

optional

parent

Search by the parent job ID

optional

node

Search by the currently executing node address

optional

active

Only retrieve active jobs

optional

offset

Search offset

optional

0

limit

Search page size

optional

20

Example 1: Pause a specific job by job ID

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

skysync-cli jobs pause {{id}}

Command with example values

skysync-cli jobs pause 5dc531df34554edd96c31272262ad950

Expected results

ID      5dc531df34554edd96c31272262ad950
Name    Test Transfer Job 1
Kind    transfer
Enabled true
Status  paused

Expected results (JSON)

[
  {
    "id": "5dc531df34554edd96c31272262ad950",
    "name": "Test Transfer Job 1",
    "kind": "transfer",
    "disabled": false,
    "status": "paused"
  }
]

If the ID entered does not correspond to an existing job, for example, if the job was already deleted, the expected output is the following.

Expected results

ID
Name
Kind
Enabled true
Status

Expected results (JSON)

null

Example 2: Pausing all jobs

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

skysync-cli jobs pause --all

Expected results

8 jobs paused

Expected results (JSON)

[
  {
    "total_count": "8"
  }
]

Example 3: Pausing a filtered list of jobs

In the following example, we'll filter the jobs list by parent job, search text, kind of job, and active state.  We'll then further filter the list by using an offset and limiting the number of jobs to pause.  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

skysync-cli jobs pause --parent={{parentJobID}} --offset={{offset}} --limit={{limit}} --search={{searchText}} --kind={{jobKind}} --active

Here, only jobs with the parent specified will pause, and then only those with text "testjob" in their names, and are of type "transfer", and those that are active.  Finally, the first two jobs will be skipped, and only the next five jobs will be paused.

Command with sample values

skysync-cli jobs pause --parent=5dc531df34554edd96c31272262ad950 --offset=2 --limit=5 --search=testjob --kind=transfer --active

Expected results

5 jobs paused

Expected results (JSON)

[
  {
    "total_count": "5"
  }
]

Delete a Job

This command will delete the specified job

parameter

description

required

default

id

The ID of the job 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

skysync-cli jobs delete {{id}}

Command with example values

skysync-cli jobs delete 5dc531df34554edd96c31272262ad950

Expected results

The job was deleted successfully.

If the ID entered does not correspond to an existing job, for example, if the job was already deleted, the expected output is the following.

Expected results

The job could not be deleted.

The response is only available in the default format.  If JSON output is specified, no output will be provided.

Job Items

This command will produce a list of items that have been identified in relation to a job. A parameter is required when generating a job items list. If you do not use a parameter, you will receive an error: "Not enough non-option arguments: got 0, need at least 1"

parameter

description

required

default

id

The ID of the job for which to list items

optional

none

search, q

Search text

optional

offset

Search offset

optional

0

limit

Search page size

optional

20

--csv

output format of the report

optional

JSON 

In the following examples, authentication parameters are provided within the configuration file. See the authentication section for more information. 

Example 1: List job items for a specific job

The parameters within the two curly braces (including the braces) will need to be replaced with valid values.

Command with no parameters

skysync-cli jobs items {{jobID}}

Expected results

ID Source                                             Destination                                      Size Status
1  /                                                → /                                                     success

Expected results (JSON)

[
  {
    "id": 1,
    "source": {
      "name": "do-not-delete-many-files",
      "path": "/",
      "bytes": 0,
      "created_on": 1509145659,
      "modified_on": 1515528174
    },
    "source_to_destination": true,
    "destination": {
      "name": "destination",
      "path": "/",
      "bytes": 0,
      "created_on": 1515528271,
      "modified_on": 1515528271
    },
    "status": "success",
    "retried": 0,
    "processing": [
      "none"
    ],
    "transferred_on": 1515528270
  }
]

Job Folders

This command will produce a list of folders that have been identified in relation to a job.

parameter

description

required

default

id

The ID of the job for which to list items

optional

none

search, q

Search text

optional

offset

Search offset

optional

0

limit

Search page size

optional

20

In the following examples, authentication parameters are provided within the configuration file. See the authentication section for more information. 

Example 1: List all job folders

List all the job items. This command only returns the first page of 20 records and not all the folders. You can add--limit and --offset to handle pagination if needed. 

Command with no parameters

skysync-cli jobs folders

Expected results

ID  Source     Destination Size  Status
178 /        → /           161 B success
185 /folder2 → /folder2    112 B success
193 /folder1 → /folder1    16 B  success

Expected results (JSON)

[
  {
    "id": 178,
    "source": {
      "name": "do-not-delete-many-files",
      "path": "/",
      "bytes": 161,
      "created_on": 1509145659,
      "modified_on": 1523541561
    },
    "source_to_destination": true,
    "destination": {
      "name": "destination3",
      "path": "/",
      "bytes": 0,
      "created_on": 1530816748,
      "modified_on": 1530816748
    },
    "status": "success",
    "retried": 0,
    "processing": [
      "none"
    ],
    "transferred_on": 1530816748
  },
  {
    "id": 185,
    "source": {
      "name": "folder2",
      "path": "/folder2",
      "bytes": 112,
      "created_on": 1523541559,
      "modified_on": 1523541574
    },
    "source_to_destination": true,
    "destination": {
      "name": "folder2",
      "path": "/folder2",
      "bytes": 0,
      "created_on": 1523541559,
      "modified_on": 1523541574
    },
    "status": "success",
    "retried": 0,
    "processing": [
      "none"
    ],
    "transferred_on": 1530816748
  },
  {
    "id": 193,
    "source": {
      "name": "folder1",
      "path": "/folder1",
      "bytes": 16,
      "created_on": 1523541553,
      "modified_on": 1523541565
    },
    "source_to_destination": true,
    "destination": {
      "name": "folder1",
      "path": "/folder1",
      "bytes": 0,
      "created_on": 1523541553,
      "modified_on": 1523541565
    },
    "status": "success",
    "retried": 0,
    "processing": [
      "none"
    ],
    "transferred_on": 1530816748
  }
]

Example 2: List folders for a specific job

List folders for a specific job

Command with no parameters

skysync-cli jobs folders {{jobID}}

Expected results similar to the previous example.

Job Security Mappings

This command will produce a list of folders that have been identified in relation to a job.

parameter

description

required

default

id

The ID of the job for which to list security mappings

optional

none

search, q

Search text

optional

offset

Search offset

optional

0

limit

Search page size

optional

20

In the following examples, authentication parameters are provided within the configuration file. See the authentication section for more information. 

Example 1: List all job security mappings

List all the job security mappings

Command with no parameters

skysync-cli jobs security-mappings

Expected results

Source                   Destination              Resolution Message
Test User 00001          Test User 00001          email
Test User 00002          Test User 00002          email
Test User 00003          Test User 00003          email
TestBoxGroup1            TestBoxGroup1            id
TestBoxGroup2            TestBoxGroup2            id

Expected results (JSON)

[
  {
    "source": {
      "name": "Test User 00001",
      "email": "testuser00001@portalarchitects.com",
      "id": "265899621",
      "type": "account"
    },
    "destination": {
      "name": "Test User 00001",
      "email": "testuser00001@portalarchitects.com",
      "id": "265899621",
      "type": "account"
    },
    "resolution": "email",
    "id": "97f691056e824de9948f740f21fb808f"
  },
  {
    "source": {
      "name": "Test User 00002",
      "email": "testuser00002@portalarchitects.com",
      "id": "265899629",
      "type": "account"
    },
    "destination": {
      "name": "Test User 00002",
      "email": "testuser00002@portalarchitects.com",
      "id": "265899629",
      "type": "account"
    },
    "resolution": "email",
    "id": "9a37b7ef2b7a4404997d1502d5aee153"
  },
  {
    "source": {
      "name": "Test User 00003",
      "email": "testuser00003@portalarchitects.com",
      "id": "265899633",
      "type": "account"
    },
    "destination": {
      "name": "Test User 00003",
      "email": "testuser00003@portalarchitects.com",
      "id": "265899633",
      "type": "account"
    },
    "resolution": "email",
    "id": "44a6400858aa4fc9aac4dc67f60aa615"
  },
  {
    "source": {
      "name": "TestBoxGroup1",
      "id": "1485266",
      "type": "group"
    },
    "destination": {
      "name": "TestBoxGroup1",
      "id": "1485266",
      "type": "group"
    },
    "resolution": "id",
    "id": "b3e9f753979a4b13be6e1cccead26f0e"
  },
  {
    "source": {
      "name": "TestBoxGroup2",
      "id": "1485270",
      "type": "group"
    },
    "destination": {
      "name": "TestBoxGroup2",
      "id": "1485270",
      "type": "group"
    },
    "resolution": "id",
    "id": "afc2772bd44c4b3595216b4e762f1505"
  }  
]

Example 2: List security mappings for a specific job

List security mappings for a specific job

Command with no parameters

skysync-cli jobs security-mappings {{jobID}}


Expected results similar to the previous example.

Audit Job(s)

This command will produce an audit report of job executions.

parameter

description

required

default

id

The ID of the job to audit

optional

none

--execution <execution-id>

the execution instance id of a job

optional

none

--csv

output format of the report

optional

JSON 

In the following examples, authentication parameters are provided within the configuration file. See the authentication section for more information. 

Example 1: Produce an audit report for all jobs

Without parameters, the following will output an audit for all jobs. Note, that if a job did not transfer items and the resulting items block is empty, the audit command will return an empty brackets [].

Command with no parameters

skysync-cli jobs audit

Example 2: Produce an audit report for a specific job

By specifying an id parameter, the following will output an audit for a specific job.

Command with example values

skysync-cli jobs audit 5dc531df34554edd96c31272262ad950

For both commands above, you can expect output like the following:

Expected results

Level Event      RecordedOn            Reason
debug audit_item 1/18/1970, 8:37:45 AM
debug audit_item 1/18/1970, 8:37:45 AM
debug audit_item 1/18/1970, 8:37:45 AM
debug audit_item 1/18/1970, 8:37:45 AM
debug audit_item 1/18/1970, 8:37:45 AM
debug audit_item 1/18/1970, 8:37:45 AM
debug audit_item 1/18/1970, 8:37:45 AM
debug audit_item 1/18/1970, 8:37:45 AM
debug audit_item 1/18/1970, 8:37:45 AM

Example 3: Produce an audit report for a specific job in CSV format

Adding the --csv option produces an audit report in comma-delimited value (CSV) format. Without it, output is formatted as JSON.

Command with example values

skysync-cli jobs audit 5dc531df34554edd96c31272262ad950 --csv

For the above command, you can expect output like the following:

Expected results

execution_id,recorded_on,level,type,direction,reason,source_path,destination_path,bytes,version,hash,item_type
136,2018-02-05T21:17:26+00:00,debug,audit_item,->,"","/UserDrive/items-2/ADKSpring.jpg","/UserDrive/items-2/ADKSpring.jpg",5844151,288078761880,32342c62bc4f0139df792718757087155c53247a,""
136,2018-02-05T21:17:26+00:00,debug,audit_item,->,"","/UserDrive/items/ADKSpring.jpg","/UserDrive/items/ADKSpring.jpg",5844151,288079555273,32342c62bc4f0139df792718757087155c53247a,""
136,2018-02-05T21:17:27+00:00,debug,audit_item,->,"","/UserDrive/items-2/1/ADKSpring.jpg","/UserDrive/items-2/1/ADKSpring.jpg",5844151,288079706440,32342c62bc4f0139df792718757087155c53247a,""
136,2018-02-05T21:17:27+00:00,debug,audit_item,->,"","/UserDrive/items/1/ADKSpring.jpg","/UserDrive/items/1/ADKSpring.jpg",5844151,288079555451,32342c62bc4f0139df792718757087155c53247a,""
136,2018-02-05T21:17:28+00:00,debug,audit_item,->,"","/UserDrive/msaelens/2003-Aug-25-Santanonis.txt","/UserDrive/msaelens/2003-Aug-25-Santanonis.txt",185982,288078767712,3a724f4dc61d7d11ab10d389992ea934e208551d,""
136,2018-02-05T21:17:28+00:00,debug,audit_item,->,"","/UserDrive/mikes-2/ADKSpring.jpg","/UserDrive/mikes-2/ADKSpring.jpg",5844151,288079543378,32342c62bc4f0139df792718757087155c53247a,""
136,2018-02-05T21:17:28+00:00,debug,audit_item,->,"","/UserDrive/mikes/ADKSpring.jpg","/UserDrive/mikes/ADKSpring.jpg",5844151,288078641430,32342c62bc4f0139df792718757087155c53247a,""
136,2018-02-05T21:17:28+00:00,debug,audit_item,->,"","/UserDrive/mikes-2/1/ADKSpring - Copy.jpg","/UserDrive/mikes-2/1/ADKSpring - Copy.jpg",5844151,288079386224,32342c62bc4f0139df792718757087155c53247a,""
136,2018-02-05T21:17:29+00:00,debug,audit_item,->,"","/UserDrive/mikes/1/ADKSpring - Copy.jpg","/UserDrive/mikes/1/ADKSpring - Copy.jpg",5844151,288079659664,32342c62bc4f0139df792718757087155c53247a,""

Example 4: Produce an audit report for a specific execution of a specific job

Adding a --execution option produces an audit report for a specific execution of the specified job.  Note, execution_id  may not be sequential for a specific job and can be found within the response from the command: skysync-cli jobs audit

Execution option

skysync-cli jobs audit 5dc531df34554edd96c31272262ad950 --execution 13

Report Job History

This command will produce a report of job execution history

parameter

description

required

default

id

The ID of the job to report on

optional

none

--execution <execution-id>

the execution instance id of a job

optional

none

--execution last

specifies the last job execution

optional

--execution current

specifies the current job execution

optional

--csv

output format of the report

optional

JSON

In the following examples, authentication parameters are provided within the configuration file. See the authentication section for more information. 

Example 1: Produce a history report for all jobs

Without parameters, the following will output a history report for all jobs.

Command with no parameters

skysync-cli jobs history

Example 2: Produce a history report for a specific job

By specifying an id parameter, the following will output a history report for a specific job.

Command with example values

skysync-cli jobs history 5dc531df34554edd96c31272262ad950

Example 3: Produce a history report for a specific job in CSV format

Adding the --csv option produces a history report in comma-delimited value (CSV) format. Without it, output is formatted as JSON.

Command with example values

skysync-cli jobs history 5dc531df34554edd96c31272262ad950 --csv

Example 4: Produce a history report for a specific execution of a specific job

Adding a --execution option produces a history report for a specific execution of the specified job. Note, execution_id  may not be sequential for a specific job and can be found within the reponse from the command: skysync-cli jobs audit

Execution option

skysync-cli jobs history 5dc531df34554edd96c31272262ad950 --execution 13

Example 5: Produce a history report for the last execution of a specific job

Adding a --execution option with a last parameter produces a history report for the last execution of the specified job.

Execution option

skysync-cli jobs history 5dc531df34554edd96c31272262ad950 --execution last

Example 6: Produce a history report for the current execution of a specific job

Adding a --execution option with a current parameter produces a history report for the current execution of the specified job.  If the specified job is between executions, this will return null.

Execution option

skysync-cli jobs history 5dc531df34554edd96c31272262ad950 --execution current
  • No labels