Workflow Execution API
Workflow executions can be accessed through this API using GET this allows for the retrieval of workflow executions and there logs.
Authentication - Use Basic Authentication for this API.
Base URL for Environment REST API
Most functions return a JSON workflow execution object. The workflow execution object has these attributes:
Attributes | Type | Description |
---|---|---|
workflowExecutionId | Long | This is the unique id of the workflow execution |
dockerImageName | String | This is the name of the docker image |
environmentId | Long | This is the unique Id of the environment |
executionStatus | String | This is the status of the execution i.e. Success, Failure, Running |
instanceId | Long | This is the unique Id of the instance |
parentWorkflowExecutionId | Long | This is the unique id of a parent execution, if one exists |
predeployWorkflowExecutionId | Long | This is the unique id of a pre-deploy execution, if one was used |
projectId | Long | This is the unique Id of the project |
projectVersionId | Long | This is the unique Id of the project version |
projectWorkflowId | Long | This is the unique Id of the project workflow |
endTime | Timestamp | This is the time the execution ended, if it has ended |
startTime | Timestamp | This is the time the execution started |
workflowRequestId | Long | This is the unique id of the workflow request |
workflowVersionId | Long | This is the unique id of the workflow version |
createdOn | Timestamp | This is the time the execution was created |
createdBy | String | This is the user who created the execution |
updatedOn | Timestamp | This is the time the execution was updated |
updatedBy | String | This is the user who updated the execution last |
version | Integer | This the version number of the execution |
workflowState | String | This is the state of the workflow |
GET
There are two implementations of GET. One will find a workflow execution with the given Id and return the JSON representation of the workflow execution. The other will find a list of workflow executions matching the parameters supplied to it.
GET by ID
This GET service will find an environment with the given Id and return the JSON representation of the object.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
workflowExecutionId | URL | Yes | This is a URL parameter for the Id which is used to find and return an environment |
Example
If we had an workflow execution in our database with an Id of 1110091 and had the following attributes
{ "updatedBy": "buildsubmitmonitor", "workflowVersionId": 908232, "updatedOn": "2022-02-18T23:19:35.488+0000", "versionNumber": 4, "createdOn": "2022-02-18T23:19:34.257+0000", "createdBy": "buildsubmitmonitor", "projectWorkflowId": 149128, "predeployWorkflowExecId": null, "workflowExecutionId": 1110091, "parentWorkflowExecutionId": null, "executionStatus": "Success", "dockerImageName": null, "endTime": "2022-02-18T23:19:35.456+0000", "workflowState": null, "startTime": "2022-02-18T23:19:35.385+0000", "workflowRequestId": 250404, "projectId": 149126, "environmentId": 16818, "instanceId": 5358, "projectVersionId": 1840060 }
When we run a GET request at the following URL
http://host:port/flexdeploy/rest/v1/workflowexecution/1110091
The GET request would return the following JSON environment object
{ "updatedBy": "buildsubmitmonitor", "workflowVersionId": 908232, "updatedOn": "2022-02-18T23:19:35.488+0000", "versionNumber": 4, "createdOn": "2022-02-18T23:19:34.257+0000", "createdBy": "buildsubmitmonitor", "projectWorkflowId": 149128, "predeployWorkflowExecId": null, "workflowExecutionId": 1110091, "parentWorkflowExecutionId": null, "executionStatus": "Success", "dockerImageName": null, "endTime": "2022-02-18T23:19:35.456+0000", "workflowState": null, "startTime": "2022-02-18T23:19:35.385+0000", "workflowRequestId": 250404, "projectId": 149126, "environmentId": 16818, "instanceId": 5358, "projectVersionId": 1840060 }
GET (Using Query Parameters)
This GET service will return a list of environments in the form of JSON objects based on the query parameters code and name. Environments are only returned if they match all of the specified query parameters. If no query parameters are given this request will return the entire list of environments.
The query parameters are not case sensitive. Searching by name=NAME is the same as searching by name=name.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
workflowRequestId | URL | No | This is a URL query parameter for the workflowRequestId which is used to search the workflow executions. |
Example
If we had a workflow execution in our database with an Id of 1110091 and had the following attributes
{ "updatedBy": "buildsubmitmonitor", "workflowVersionId": 908232, "updatedOn": "2022-02-18T23:19:35.488+0000", "versionNumber": 4, "createdOn": "2022-02-18T23:19:34.257+0000", "createdBy": "buildsubmitmonitor", "projectWorkflowId": 149128, "predeployWorkflowExecId": null, "workflowExecutionId": 1110091, "parentWorkflowExecutionId": null, "executionStatus": "Success", "dockerImageName": null, "endTime": "2022-02-18T23:19:35.456+0000", "workflowState": null, "startTime": "2022-02-18T23:19:35.385+0000", "workflowRequestId": 250404, "projectId": 149126, "environmentId": 16818, "instanceId": 5358, "projectVersionId": 1840060 }
When we run a GET request at the following URL
http://host:port/flexdeploy/rest/v1/workflowexecution?workflowRequestId=250404
The GET request would return the following JSON workflow execution object
[ { "updatedBy": "buildsubmitmonitor", "workflowVersionId": 908232, "updatedOn": "2022-02-18T23:19:35.488+0000", "versionNumber": 4, "createdOn": "2022-02-18T23:19:34.257+0000", "createdBy": "buildsubmitmonitor", "projectWorkflowId": 149128, "predeployWorkflowExecId": null, "workflowExecutionId": 1110091, "parentWorkflowExecutionId": null, "executionStatus": "Success", "dockerImageName": null, "endTime": "2022-02-18T23:19:35.456+0000", "workflowState": null, "startTime": "2022-02-18T23:19:35.385+0000", "workflowRequestId": 250404, "projectId": 149126, "environmentId": 16818, "instanceId": 5358, "projectVersionId": 1840060 }
GET Logs
This GET service will download all logs associated with this execution as a zip file.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
workflowExecutionId | URL | Yes | This is a URL parameter for the Id which is used to find and return an environment |
Result
logs.zip contains a folder named after the endpoint Id and then zero or more text files “PluginLogs_<Request_Id>_<Project_Id>.txt”
- style