JOC API

Version 2.6.5

Download RAML
JOC API
/inventory/copy
POST

Copies inventory object


Parameters in the POST body schema

Name Type Description Example Default
path string Path of the configuration item
objectType string Object type of the configuration item. Possible value are
  • "FOLDER"
  • "WORKFLOW"
  • "JOBRESOURCE"
  • "LOCK"
  • "NOTICEBOARD"
  • "FILEORDERSOURCE"
  • "WORKINGDAYSCALENDAR"
  • "NONWORKINGDAYSCALENDAR"
  • "SCHEDULE"
  • "JOBTEMPLATE"
  • "INCLUDESCRIPT"
newPath required, string New path (relative or absolute) of the inventory object. The path has to have the old path if specified
shallowCopy optional, boolean
  • Shallow Copy (this parameter is true)
    • References to existing objects are retained.
      • For objects that do not contain references, copying should be omitted, e.g. for Locks, because with Shallow Copy no copied Workflow would reference the copied Lock.
    • Therefore: Shallow Copy copies objects that contain references, currently Workflows, Schedules.
      • If a single object is copied, then a copy is always made, even for objects that do not contain references.
      • If folders are copied, then objects are not copied unless they contain references.
  • Deep Copy (this parameter is false)
    • All objects are copied, without exception.
    • All existing references to objects are updated with regard to the copied objects.
      • If, for example, a workflow references a Lock that is not itself the object of the copy operation, the previous reference is retained.
      • If, on the other hand, the referenced Lock is also copied, then the reference in the Workflow is updated.
false
suffix optional, string
  • Copied objects are given new names.
  • A suffix or prefix can be specified for objects to be copied.
    • If a suffix is specified then a prefix will be ignored
    • A leading dash is added to a suffix programmatically
    • A prefix is programmatically followed by a dash at the end
    • If suffix and prefix are empty, then a suffix="-copy<integer>" is used if necessary, where <integer> is the smallest natural number that ensures the uniqueness of the names of the copied objects.
prefix optional, string
auditLog optional, object Object that contains comment, timeSpent and ticketLink.
{
  "comment": "Operational requirement!",
  "timeSpent": 2
}
comment optional, string Field in auditLog to comment this action, e.g. the reason.
timeSpent optional, integer Field in auditLog to enter the time spent in minutes.
ticketLink optional, string Field in auditLog to enter a link to a corresponding ticket.