Clone Workflow
This endpoint allows you to create a new workflow by cloning from an existing workflow. If the workflow you are cloning from uses any databases, and you are cloning it to a different group than the original was in, any required databases will be recreated in the target group (database structure only – no data will be copied).
Database Cloning: When cloning workflows across groups, database structures are recreated but no data is copied. Only the database schema and field definitions are replicated.
POST Parameters
| Parameter | Required | Value | Description |
|---|---|---|---|
api_key | {key} | An API key that has access to the resource you want to query for | |
workflow_id | {integer} | The Workflow ID you wish to clone from | |
workflow_name | {unicode} | The name of the new workflow to be created | |
group_id | {integer} | The group where you want to place the new workflow (if left blank will be put in the root group of the API key) | |
input_account | {ASCII} | An optional field allowing the override of the default randomly generated email address (the prefix before the @ only) | |
db_links | {string} | Accepts either 1 to create new database structures and a workflow with links (default), or 0 to create a workflow without database-linked rules. |
Response Information
| Element | Description |
|---|---|
<status> | A status code in response to the operation. |
<message> | Additional information about the operation – human readable. |
<workflow> | This element contains all of the further sub-elements with information about the workflow that has just been created. |
<workflow_id> | The unique ID of the workflow. |
<workflow_name> | The name of the workflow. |
<workflow_email> | The input email address that accepts documents for the workflow. |
<workflow_file_transfer> | The combined connection string used to access the file transfer server in the format username:password@server. |
<source_workflow_id> | The ID of the workflow from which this workflow was copied or cloned. |
<database> | Empty element indicating no database structure is returned in this response. |
Sample Request
POST https://api-app.xtracta.com/v1/workflow/clone HTTP/1.1 api_key=123&workflow_id=456789&workflow_name=Example_workflow&input_account=example1
Sample Response
<?xml version="1.0" encoding="UTF-8"?>
<workflow_response>
<status>200</status>
<message>The request has been successfully processed</message>
<workflow>
<workflow_id>123</workflow_id>
<workflow_name>Example Workflow</workflow_name>
<workflow_email>exampleuser@test.example.com</workflow_email>
<workflow_file_transfer>exampleuser:examplePass123@ftp.example.com</workflow_file_transfer>
<source_workflow_id>100</source_workflow_id>
</workflow>
<database/>
</workflow_response>
Schema Definition
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:simpleType name="ConfidenceType">
<xs:union>
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="100"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value=""/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
<xs:complexType name="WorkflowType">
<xs:sequence>
<xs:element name="workflow_id" type="xs:positiveInteger" minOccurs="0"/>
<xs:element name="workflow_name" type="xs:string"/>
<xs:element name="workflow_email" type="xs:string"/>
<xs:element name="workflow_file_transfer" type="xs:string"/>
<xs:element name="source_workflow_id" type="xs:nonNegativeInteger"/>
</xs:sequence>
</xs:complexType>
<xs:element name="workflow_response">
<xs:complexType>
<xs:sequence>
<xs:element name="status" type="xs:positiveInteger"/>
<xs:element name="message" type="xs:string"/>
<xs:element name="workflow" type="WorkflowType"/>
<xs:element name="database" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>