Workflow API

Workflows can be retrieved using this API using the GET service.

Authentication - Use Basic Authentication for this API.

GET (By Id)

This GET service will return the JSON representation of a workflow given a workflow Id.

API URL

http://host:port/flexdeploy/rest/v1/workflows/{workflowId}

Request

ParameterTypeRequiredDescription
workflowIdURLYesPath parameter for the workflow Id

Response

Workflow JSON objects have the following attributes:

AttributeTypeDescription
workflowIdLongThis is the unique Id of the workflow
workflowNameStringThis is the name of the workflow.
workflowTypeStringThis is the type of the workflow.  Possible workflow types are:
  • BUILD
  • DEPLOY
  • OTHER
  • TEST
  • TEST_DEFINITION
  • UTILITY
isActiveBooleanThis is a Boolean that tracks whether or not the workflow is active.
groupStringThis is the group of the workflow.
subgroupStringThis is the subgroup of the workflow.
descriptionStringThis is the description of the workflow.
activeVersionIdLongThis is the id of the active version of the workflow.
activeVersionNameStringThis is version name for active version. For example, 1.1
propertiesList<Property>Workflow Properties, listed on the main tab of the workflow. More about the Property object is listed below.
pluginOperationsList<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:

AttributeTypeDescription
nameStringCode for the property.
displayNameStringDisplay name of the property.
listDataList<String>List of possible values for the property.
isActiveBooleanWhether the property is active or not.
dataTypeStringData type of the property.
defaultValueDependsDefault value for the property.
isEncryptedBooleanWhether the property is encrypted or not.
isRequiredBooleanWhether the property is required or not.
isMultiselectBooleanWhether multiple values can be inputted for this property.
isDefaultValueExpressionBooleanWhether the default value for this property is an expression. Otherwise, it's interpreted as plain text.
subDataTypeStringSub data type of the property.
descriptionStringDescription of the property.
scopeStringScope of the property. Possible values are Environment Instance and Project.
displayRowsNumberNumber of display rows used in the UI input. @since 5.3.0.2
displayColumnsNumberNumber 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:

AttributeTypeDescription
operationStringPlugin operation name. For example, soaBuild
pluginIdLongPlugin Id

Response Codes

HTTP CodeDescription
200Workflow was found and returned
400Bad request
401Authentication failure
403Authorization failure (no access to resource)
404Workflow not found
500Unexpected 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:

Workflow GET Return JSON
{
"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)

This GET service will find a workflow by querying based on a name, type, group, and/or subgroup and will return the JSON representations of the objects. If no query parameters are given this request will return the entire list of workflows.

API URLs

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}

The query parameters are not case sensitive. Searching by name=NAME is the same as searching by name=name.

Request

Parameter
Required
Type
Description
workflowNameNoQuery - StringThe name of the workflow to search for.  Uses contains ignore case search.
workflowTypeNoQuery - StringThe type of the workflow to search for.  Uses equals ignore case search.  Possible workflow types are:
  • BUILD
  • DEPLOY
  • OTHER
  • TEST
  • TEST_DEFINITION
  • UTILITY
groupNoQuery - StringThe group name to search workflows for.  Uses equals ignore case search.
subgroupNoQuery - StringThe subgroup name to search workflows for.  Uses equals ignore case search.

Response

AttributeTypeDescription
workflowIdLongThis is the unique Id of the workflow
workflowNameStringThis is the name of the workflow.
workflowTypeStringThis is the type of the workflow.  Possible workflow types are:
  • BUILD
  • DEPLOY
  • OTHER
  • TEST
  • TEST_DEFINITION
  • UTILITY
isActiveBooleanThis is a Boolean that tracks whether or not the workflow is active.
groupStringThis is the group of the workflow.
subgroupStringThis is the subgroup of the workflow.
descriptionStringThis is the description of the workflow.
activeVersionIdLongThis is the id of the active version of the workflow.
activeVersionNameStringThis is version name for active version. For example, 1.1
propertiesList<Property>Workflow Properties, listed on the main tab of the workflow. More about the Property object is listed below.
pluginOperationsList<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:

AttributeTypeDescription
nameStringCode for the property.
displayNameStringDisplay name of the property.
listDataList<String>List of possible values for the property.
isActiveBooleanWhether the property is active or not.
dataTypeStringData type of the property.
defaultValueDependsDefault value for the property.
isEncryptedBooleanWhether the property is encrypted or not.
isRequiredBooleanWhether the property is required or not.
isMultiselectBooleanWhether multiple values can be inputted for this property.
isDefaultValueExpressionBooleanWhether the default value for this property is an expression. Otherwise, it's interpreted as plain text.
subDataTypeStringSub data type of the property.
descriptionStringDescription of the property.
scopeStringScope of the property. Possible values are Environment Instance and Project.
displayRowsNumberNumber of display rows used in the UI input. @since 5.3.0.2
displayColumnsNumberNumber 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:

AttributeTypeDescription
operationStringPlugin operation name. For example, soaBuild
pluginIdLongPlugin Id

Response Codes

HTTP Code
Description
200Search successful and results returned
400Bad request
401Authentication failure
403Authorization failure (no access to resource)
500Unexpected internal server error

Example

If a workflow has an id of 10111 and a GET request was sent to http://host:port/flexdeploy/rest/v1/workflows?name=JMeter-runTest&type=TEST_Definition

A workflow JSON object will be returned with the following workflow information:

Workflow GET Return JSON
{
"workflowId": 10111,
"workflowName": "JMeter-runTest",
"workflowType": "TEST_DEFINITION",
"description": "JMeter execute test workflow",
"group": "FlexDeploy(read only)",
"subgroup": "Testing",
"activeVersionId": 10862,
"isActive": true,
"properties": [],
"pluginOperations": [
        {
            "operation": "runTest",
            "pluginId": 68740
        }
    ]
}