REST API - PUT Workflow Definition

This operation imports a workflow definition.

Request

Syntax

PUT webservice/workflow HTTP/1.1 Host: host name Accept: application/xml | application/json Authtoken: authentication token Content-type: application/xml | application/json workflow_definition

where <webservice> is the root path used to route the API requests to the Web Server.

For more information, see Available Web Services for REST API.

Request Headers

Name

Description

Host

The host name of the Web Server or the Command Center used in the API request.

Accept

The format of the response. Valid values are: application/xml or application/json.

Authtoken

The authentication token received after successfully logging on. For details on receiving an authentication token, see Authentication.

Content-type

The media type contained in the request body.

Request Body

Use the workflow definition generated by the GET Workflow Definition API.

Response

Response Parameters

Parameter

Description

Element

workflowId

The system-generated ID assigned to the workflow.

Workflow_SetWorkflowResponse

workflowName

The name of the workflow.

Workflow_SetWorkflowResponse

Examples

Sample Request

PUT webservice/workflow HTTP/1.1
Host: client.mydomain.com
Accept: application/xml
 Authtoken: QSDK 38568012f4d1e8ee1841d283a47aa3ba78e124ea58354b5fc60f4dab8a63347d05cf5552484dafda3bfa4c5db84e580b1cb37bcf8e65b39f7f8549a443e6f78a2c7be3f31b3d845e24776c835e498e8e883bb40c46bd15af4f40ca94e823acedcdd4e9659e74b34a07a85c4586cd2ed914b6dce015874783ef768fda78183a4208930954a377f66eb56c8b92cexampl4s437a19317ca6ce7f3233d5a01aca35dbad93468b833f2cf71010809006a937670adce711ca8be46638e8
Content-type: application/json
{ "outputs": "<outputs />", "isHtmlDescription": false, "inputs": "<inputs><Client class=\"java.lang.String\" _list_=\"false\"></Client></inputs>", "interactive": false, "description": "", "apiMode": true, "variables": "<variables />", "revision": "Revision: 1.1.2.6", "uniqueGuid": "d4c7f7b3-682e-4b79-8e00-7924bb1e9c7e", "name": "ClientDeconfigure", "config": "<configuration />", "workflowId": 0, "schema": { "outputs": { "className": "", "type": "", "name": "outputs" }, "variables": { "className": "", "type": "", "name": "variables" }, "inputs": { "className": "", "type": "", "attribute": false, "name": "inputs", "children": [{ "hidden": false, "defaultValue": "", "displayName": "", "className": "java.lang.String", "type": "{http://www.w3.org/2001/XMLSchema}string", "listType": false, "required": true, "minimumValue": "", "inputType": "java.lang.String", "attribute": false, "documentation": "", "controlHidden": false, "readOnly": false, "searchable": false, "controlType": 0, "name": "Client", "maximumValue": "" }] }, "config": { "className": "", "type": "", "name": "configuration" } }, "Start": { "displayName": "Start", "interactive": false, "originalStyle": "", "jobMode": false, "description": "", "waitSetting": false, "continueOnFailure": false, "commented": false, "height": 36, "created": 0, "uniqueName": "Start_1", "skipAttempt": false, "name": "Start", "width": 55, "x": 45, "y": 41, "style": "image;image=/images/jgraphx/house.png", "inputs": [ "<inputs />" ], "transition": [{ "sourceX": 72, "sourceY": 59, "activity": "Execute_1", "targetY": 448, "targetX": 342, "originalStyle": "", "points": "", "x": 0, "y": 0, "transitionIndex": 0, "style": "defaultEdge", "commented": false, "status": 0, "condition": { "language": 1, "script": "/*\nThe expression should return a boolean. Use the variable name \"activity\" to refer to the previous activity object. Example:\nactivity.exitCode==0;\n*/\n" } }] }, "Activity": [{ "displayName": "Execute", "interactive": false, "originalStyle": "", "jobMode": false, "description": "", "waitSetting": false, "continueOnFailure": false, "namespaceUri": "commvault.cte.workflow.activities.cmd.operation", "commented": false, "height": 34, "created": 1459757072147, "uniqueName": "Execute_1", "skipAttempt": false, "name": "Execute", "width": 100, "x": 286, "y": 424, "style": "label;image=Execute", "inputs": [ "<inputs><inputXml class=\"java.lang.String\" _list_=\"false\">&lt;TMMsg_ReleaseLicenseReq isClientLevelOperation=\"1\"&gt;&#xD;\r\n &lt;clientEntity _type_=\"3\" clientName=\"xpath:{/workflow/inputs/Client}\" hostName=\"\"/&gt;&#xD;\r\n &lt;licenseTypes appType=\"0\" licenseName=\"\" licenseType=\"0\"/&gt;&#xD;\r\n&lt;/TMMsg_ReleaseLicenseReq&gt;</inputXml><escapeXml class=\"java.lang.Boolean\" _list_=\"false\">true</escapeXml><commandArgs class=\"java.lang.String\" _list_=\"false\" /><sessionOptions class=\"workflow.types.cmd.SessionOptions\" _list_=\"false\"><useImpersonatedAccount class=\"java.lang.Boolean\" _list_=\"false\">true</useImpersonatedAccount><tokenFile class=\"java.lang.String\" _list_=\"false\" /><token class=\"java.lang.String\" _list_=\"false\" /></sessionOptions></inputs>" ] }], "formProperties": { "css": "", "javaScript": "" }
}

Sample Response

<Workflow_SetWorkflowResponse> < workflow workflowId = "138" workflowName = "ClientDeconfigure" />
</Workflow_SetWorkflowResponse>
×

Loading...