REST API - GET Workflow Definition
This operation returns the workflow definition, such as the inputs, activities, and transitions.
Request
Syntax
GET <webservice>/Workflow/{workflowID}/definition HTTP/1.1
Host: <host name>
Accept: {application/xml | application/json}
Authtoken: <authentication token>
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 Parameters
Name |
Description |
Required |
workflowId |
The workflow ID for the workflow. If the workflow ID is not known, use the GET Workflow API to retrieve it. |
Yes |
Request Headers
Name |
Description |
Host |
The host name of the Web Server or Web Console 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. |
Response
Response Parameters
Parameter |
Description |
Element |
description |
The description of the workflow. |
|
uniqueGuid |
The GUID of the workflow. |
|
name |
The name of the workflow. |
|
outputs |
The parameters in the outputs block are details about the workflow outputs. |
schema |
variables |
The parameters in the variables block are details about the workflow variables. |
schema |
inputs |
The parameters in the input block are details about the workflow inputs. |
schema |
Start |
The parameters in the Start block are details about the Start activity. |
|
transition |
The parameters in the transition block are details about the transitions used to connect activities. |
|
displayName |
The name of the activity included in the workflow. |
Activity |
interactive |
Defines whether or not the activity is interactive. Valid values are true and false. |
Activity |
uniqueName |
The unique name of the activity included in the workflow. An activity can be used multiple times in a workflow. |
Activity |
inputs |
The inputs for the activity. |
Activity |
Examples
Sample Request
GET <webservice>/Workflow/80/definition HTTP/1.1
Host: client.mydomain.com
Accept: application/json
Authtoken: QSDK 38568012f4d1e8ee1841d283a47aa3ba78e124ea58354b5fc6
0f4dab8a63347d05cf5552484dafda3bfa4c5db84e580b1cb37bcf8e65b39f7f
8549a443e6f78a2c7be3f31b3d845e24776c835e498e8e883bb40c46bd15af4f
40ca94e823acedcdd4e9659e74b34a07a85c4586cd2ed914b6dce015874783ef7
68fda78183a4208930954a377f66eb56c8b92cexampl4s437a19317ca6ce7f323
3d5a01aca35dbad93468b833f2cf71010809006a937670adce711ca8be46638e8
Sample Response
{
"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\"><TMMsg_ReleaseLicenseReq isClientLevelOperation=\"1\">
\r\n <clientEntity _type_=\"3\" clientName=\"xpath:{/workflow/inputs/Client}\" hostName=\"\"/>
\r\n <licenseTypes appType=\"0\" licenseName=\"\" licenseType=\"0\"/>
\r\n</TMMsg_ReleaseLicenseReq></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": ""
}
}
Last modified: 5/24/2018 7:01:24 PM