Workflows can be retrieved using this API using the GET service.
Include Page | ||||
---|---|---|---|---|
|
...
GET (By Id)
This GET service will return the JSON representation of a workflow given a workflow Id.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/workflows/{workflowId} |
Request
Parameter | Type | Required | Description |
---|---|---|---|
workflowId | URL | Yes | Path parameter for the workflow Id |
Response
Workflow JSON objects have the following attributes:
Attribute | Type | Description |
---|---|---|
workflowId | Long | This is the unique Id of the workflow |
workflowName | String | This is the name of the workflow. |
workflowType | String | This is the type of the workflow. Possible workflow types are:
|
isActive | Boolean | This is a Boolean that tracks whether or not the workflow is active. |
group | String | This is the group of the workflow. |
subgroup | String | This is the subgroup of the workflow. |
description | String | This is the description of the workflow. |
activeVersionId | Long | This is the id of the active version of the workflow. |
activeVersionName | String | This is version name for active version. For example, 1.1 |
properties | List<Property> | Workflow Properties, listed on the main tab of the workflow. More about the Property object is listed below. |
pluginOperations | List<PluginOperation> | List of plugin operations used in this workflow. Each plugin operation includes the operation name and plugin id. |
Property JSON objects have the following attributes:
Attribute | Type | Description |
---|---|---|
name | String | Code for the property. |
displayName | String | Display name of the property. |
listData | List<String> | List of possible values for the property. |
isActive | Boolean | Whether the property is active or not. |
dataType | String | Data type of the property. |
defaultValue | Depends | Default value for the property. |
isEncrypted | Boolean | Whether the property is encrypted or not. |
isRequired | Boolean | Whether the property is required or not. |
isMultiselect | Boolean | Whether multiple values can be inputted for this property. |
isDefaultValueExpression | Boolean | Whether the default value for this property is an expression. Otherwise, it's interpreted as plain text. |
subDataType | String | Sub data type of the property. |
description | String | Description of the property. |
scope | String | Scope of the property. Possible values are Environment Instance and Project. |
displayRows | Number | Number of display rows used in the UI input. @since 5.3.0.2 |
displayColumns | Number | Number of display columns used in the UI input. @since 5.3.0.2 |
PluginOperation JSON (represents plugin operations used by workflow) objects have following attributes:
Attribute | Type | Description |
---|---|---|
operation | String | Plugin operation name. For example, soaBuild |
pluginId | Long | Plugin Id |
Response Codes
HTTP Code | Description |
---|---|
200 | Workflow was found and returned |
400 | Bad request |
401 | Authentication failure |
403 | Authorization failure (no access to resource) |
404 | Workflow not found |
500 | Unexpected internal server error |
Example
If a workflow has an id of 12345 and a GET request was sent to http://host:port/flexdeploy/v1/rest/workflows/12345
A workflow JSON object will be returned with the following workflow information:
Code Block | ||||
---|---|---|---|---|
| ||||
{ "workflowId": 12345, "workflowName": "Run SoapUI Test", "workflowType": "TEST_DEFINITION", "description": "SoapUI execute test workflow", "group": "FlexDeploy(read only)", "subgroup": "Testing", "activeVersionId": 21598, "isActive": true, "properties": [], "pluginOperations": [ { "operation": "runSoapUILoadTest", "pluginId": 155247 } ] } |
GET (Using Query Parameters)
...
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/workflows? Append the following character sequences to the above URL to specify Query parameters. Use '&' between successive query parameters: workflowName={name} workflowType={type} group={group} subgroup={subgroup} Examples:To search by name only:http://host:port/flexdeploy/rest/v1/workflows?workflowName={name} To search by group only:http://host:port/flexdeploy/rest/v1/workflows?group={group} To search by subgroup and name:http://host:port/flexdeploy/rest/v1/workflows?subgroup={subgroup}&workflowName={name} |
Tip |
---|
The query parameters are not case sensitive. Searching by name=NAME is the same as searching by name=name. |
Request
Parameter | Required | Type | Description |
---|---|---|---|
workflowName | No | Query - String | The name of the workflow to search for. Uses contains ignore case search. |
workflowType | No | Query - String | The type of the workflow to search for. Uses equals ignore case search. Possible workflow types are:
|
group | No | Query - String | The group name to search workflows for. Uses equals ignore case search. |
subgroup | No | Query - String | The subgroup name to search workflows for. Uses equals ignore case search. |
Response
Attribute | Type | Description |
---|---|---|
workflowId | Long | This is the unique Id of the workflow |
workflowName | String | This is the name of the workflow. |
workflowType | String | This is the type of the workflow. Possible workflow types are:
|
isActive | Boolean | This is a Boolean that tracks whether or not the workflow is active. |
group | String | This is the group of the workflow. |
subgroup | String | This is the subgroup of the workflow. |
description | String | This is the description of the workflow. |
activeVersionId | Long | This is the id of the active version of the workflow. |
activeVersionName | String | This is version name for active version. For example, 1.1 |
properties | List<Property> | Workflow Properties, listed on the main tab of the workflow. More about the Property object is listed below. |
pluginOperations | List<PluginOperation> | List of plugin operations used in this workflow. Each plugin operation includes the operation name and plugin id. |
Property JSON objects have the following attributes:
Attribute | Type | Description |
---|---|---|
name | String | Code for the property. |
displayName | String | Display name of the property. |
listData | List<String> | List of possible values for the property. |
isActive | Boolean | Whether the property is active or not. |
dataType | String | Data type of the property. |
defaultValue | Depends | Default value for the property. |
isEncrypted | Boolean | Whether the property is encrypted or not. |
isRequired | Boolean | Whether the property is required or not. |
isMultiselect | Boolean | Whether multiple values can be inputted for this property. |
isDefaultValueExpression | Boolean | Whether the default value for this property is an expression. Otherwise, it's interpreted as plain text. |
subDataType | String | Sub data type of the property. |
description | String | Description of the property. |
scope | String | Scope of the property. Possible values are Environment Instance and Project. |
displayRows | Number | Number of display rows used in the UI input. @since 5.3.0.2 |
displayColumns | Number | Number of display columns used in the UI input. @since 5.3.0.2 |
PluginOperation JSON (represents plugin operations used by workflow) objects have following attributes:
Attribute | Type | Description |
---|---|---|
operation | String | Plugin operation name. For example, soaBuild |
pluginId | Long | Plugin Id |
Response Codes
HTTP Code | Description |
---|---|
200 | Search successful and results returned |
400 | Bad request |
401 | Authentication failure |
403 | Authorization failure (no access to resource) |
500 | Unexpected internal server error |
Example
...