Anchor | ||||
---|---|---|---|---|
|
...
GET (Using Query Parameters)
This GET service will return a list of scheduled tasks in the form of JSON objects based on a query parameter for the display name. Scheduled tasks are only returned if they contain the specified parameter. If no query parameters are given this request will return the entire list of scheduled tasks.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/tasks/scheduled? Append the following character sequences to the above URL to specify Query parameters.workflowRequestId = {workflowRequestId} folderRequestId = {folderRequestId} pipelineStageGateExecId = {pipelineStageGateExecId} pipelineStageStepExecId = {pipelineStageStepExecId} projectId = {projectId} applicationId = {applicationId} environmentId = {environmentId} Examples:To return all of the scheduled tasks:http://host:port/flexdeploy/rest/tasks/scheduled To search by project Id only:http://host:port/flexdeploy/rest/tasks/scheduled?projectid=11001 |
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "projectVersionName": "1.0.11", "projectName": "Scheduled Tasks Project", "workflowRequestId": 656423, "projectId": 576267, "scheduledDate": "2099-03-16 22:17:52.0", "taskId": 14332, "requestType": "Project", "flexFields": [], "environmentId": 77954, "status": "PENDING", "notes": null } |
When we run a PUT request at the following URL
http://host:port/flexdeploy/rest/tasks/scheduled/runnow/14332?notes=Approved+by+George
The PUT request would run the scheduled task and return the following JSON scheduled task object
Code Block | ||||
---|---|---|---|---|
| ||||
{ "projectVersionName": "1.0.11", "projectName": "Scheduled Tasks Project", "workflowRequestId": 656423, "projectId": 576267, "scheduledDate": "2099-03-16 22:17:52.0", "taskId": 14332, "requestType": "Project", "flexFields": [], "environmentId": 77954, "status": "APPROVED", "notes": "Approved by George" } |
...
Run Now using Query Parameters
...
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/tasks/scheduled/runnow? Append the following character sequences to the above URL to specify Query parameters.workflowRequestId = {workflowRequestId} folderRequestId = {folderRequestId} pipelineStageGateExecId = {pipelineStageGateExecId} pipelineStageStepExecId = {pipelineStageStepExecId} projectId = {projectId} applicationId = {applicationId} environmentId = {environmentId} notes = {comment to add to the task. Only applicable for stage gate and step tasks} |
Info | ||
---|---|---|
| ||
Only one scheduled task can be ran run at a time. If more than one task matches the query parameters an exception will be thrown. |
...
Parameter | Type | Required | Description |
---|---|---|---|
workflowRequestId | URL | No | This is a URL query parameter for the workflow request Id which is used to search the scheduled tasks. |
folderRequestId | URL | No | This is a URL query parameter for the folder request Id which is used to search the scheduled tasks. |
pipelineStageGateExecId | URL | No | This is a URL query parameter for the pipeline stage gate execution Id which is used to search the scheduled tasks. |
pipelineStageStepExecId | URL | No | This is a URL query parameter for the pipeline stage step execution Id which is used to search the scheduled tasks. |
projectId | URL | No | This is a URL query parameter for the project Id which is used to search the scheduled tasks. |
applicationId | URL | No | This is a URL query parameter for the application Id which is used to search the scheduled tasks. |
environmentId | URL | No | This is a URL query parameter for the environment Id which is used to search the scheduled tasks. |
notes | URL | No | This is a URL query parameter to add to the task when running it. |
Example
If we had a scheduled task in our database with the following attributes
...