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

Version 1 Next »



Overview

There are a number of parameters within a job that can only be set when the job is first created (i.e. source/destination connections and paths). The ability to duplicate a job allows you to copy a job and override parameters of the "new" job.

REST API

Jobs can be duplicated through the REST API. The request can optionally include a JSON body that overrides the parameters within the source job. The request must include an appropriate Authorization header with a valid access token. An example request and response is found below.

POST <server-url>/v1/jobs/<job_id>/clone

Content-Type: application/json

Example Clone Job

This example clone job will change the values for lock propagation, permissions, version preservation, and the schedule.

{
    "name": "Clone Job",
    "transfer": {
    "transfer_type": "copy",
      "lock_propagation": "ignore",
      "permissions": {
    		"policy": "none",
    		"links": true,
    		"failures": "none"
      },
      "versioning": {
    		"preserve": "native",
    		"select": "all"
      }
    },
    "schedule": {
        "mode": "manual"
    }
}

Delete or Disable Original Job

When cloning a job, you want to ensure you either delete the original job or at least remove the job schedule so you do not encounter transfer conflicts. 

DELETE {{url}}v1/jobs/{{original_job_id}}

Deleted jobs are still available in the database and can be queried; the job history is NOT deleted. DryvIQ simply sets the flag to delete so it will be removed from REST API responses. 

When you delete a job, DryvIQ will flag it and there is a check every 5 seconds or so on each node which cancels the job if it is running.

Modify Job Schedule

PATCH {{url}}v1/jobs/{{original_job_id}}

{
    "kind": "transfer",
    "transfer_type": "copy",
    "schedule": {
        "mode": "manual"
    }
}

  • No labels