Add Workflow from Template

This endpoint allows you to create a new workflow based on a workflow template. If the workflow template is using any database templates, then these databases will be recreated in the group in which you are creating the new workflow in. If that group has databases with the same names, then these will be used instead.

Information Circle

Template-based Creation: Templates provide pre-configured workflow structures including field definitions, validation rules, and database connections. This is the recommended way to create new workflows with consistent settings.

POST Parameters

ParameterRequiredValueDescription
api_key{key}An API key that has access to the resource you want to query for
workflow_template_id{integer}The Workflow template you wish to create 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

ElementDescription
<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_username>The username to connect to the file transfer server with (note the same username, password and server address work with all supported file transfer types including FTP/FTPS/SFTP).
<workflow_file_transfer_password>The password to connect to the file transfer server with (note the same username, password and server address work with all supported file transfer types including FTP/FTPS/SFTP).
<workflow_file_transfer_server>The FQDN of the file transfer server (note the same username, password and server address work with all supported file transfer types including FTP/FTPS/SFTP).
<source_workflow_id>The ID of the workflow from which this workflow was copied or cloned.
<database>Contains the metadata for a database associated with the workflow.
<database_id>The unique ID of the associated database.
<database_name>The name of the associated database.
<column>Represents a single column in the associated database.
<column_id>The unique ID of the column.
<column_name>The name of the column.

Sample Request

POST https://api-app.xtracta.com/v1/workflow/clone HTTP/1.1
api_key=123&workflow_template_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 workflow and database were successfully updated.</message>
  <workflow>
    <workflow_id>1002</workflow_id>
    <workflow_name>Updated Sample Workflow</workflow_name>
    <workflow_email>sampleuser123@example.com</workflow_email>
    <workflow_file_transfer>sampleuser123:samplePass456@ftp.example.com</workflow_file_transfer>
    <source_workflow_id>999</source_workflow_id>
  </workflow>
  <database>
    <database_id>3001</database_id>
    <database_name>Updated Sample Database</database_name>
    <column>
      <column_id>101</column_id>
      <column_name>CustomerName</column_name>
    </column>
    <column>
      <column_id>102</column_id>
      <column_name>CustomerEmail</column_name>
    </column>
    <column>
      <column_id>103</column_id>
      <column_name>OrderID</column_name>
    </column>
    <column>
      <column_id>104</column_id>
      <column_name>OrderDate</column_name>
    </column>
  </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>