Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Anchor
Top
Top

...

AttributesTypeDescription
taskIdLongThe task id of the scheduled task.
statusStringThe status of the scheduled task.
scheduleDateStringThis is the scheduled date to run the scheduled task.
environmentIdLongThe environment Id of the scheduled task.
requestTypeStringThe request type of the scheduled task. The request type can be a step, gate, application, or project request.
flexFieldsList<FlexField>The list of flex fields for the scheduled task.
notesStringNotes added when running or canceling the scheduled task.

Each scheduled task can be one of four different types: Step, Gate, Application, and Project.

...

AttributesTypeDescription
snapshotIdLongThe snapshot id of the step scheduled task.
pipelineNameStringThe pipeline name of the step scheduled task.
environmentNameStringThe environment name of the step scheduled task.
stepNameStringThe step name of the step scheduled task.
releaseNameStringThe release name of the step scheduled task.
releaseIdLongThe release Id of the step scheduled task. 
snapshotNameStringThe snapshot name of the step scheduled task.
pipelineStageStepExecIdLongThe pipeline stage step execution Id of the step scheduled task.
notesStringNotes added when running or canceling the scheduled task.

Gate Scheduled Task

AttributesTypeDescription
snapshotIdLongThe snapshot id of the gate scheduled task.
pipelineNameStringThe pipeline name of the gate scheduled task.
environmentNameStringThe environment name of the gate scheduled task.
gateNameStringThe gate name of the gate scheduled task.
releaseNameStringThe release name of the gate scheduled task.
releaseIdLongThe release Id of the gate scheduled task. 
snapshotNameStringThe snapshot name of the gate scheduled task.
pipelineStageGateExecIdLongThe pipeline stage gate execution Id of the gate scheduled task.
notesStringNotes added when running or canceling the scheduled task.

Application Scheduled Task

AttributesTypeDescription
applicationIdLongThe application Id of the application scheduled task.
applicationNameStringThe application name of the application scheduled task.
folderVersionNameStringThe folder version name of the application scheduled task.
folderRequestIdLong

The folder request Id of the application scheduled task.

...

notes
AttributesTypeDescription
StringNotes added when running or canceling the scheduled task.

Project Scheduled Task

AttributesTypeDescription
projectIdLongThe project Id of the project scheduled task.
projectNameStringThe project name of the project scheduled task.
projectVersionNameStringThe project version name of the project scheduled task.
workflowRequestIdLongThe workflow request Id of the project scheduled task.
notesStringNotes added when running or canceling the scheduled task.

Back to Top

...

GET

GET by TaskId

...

Code Block
themeEclipse
titleScheduled Task - 10000
{
   "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 GET request at the following URL

...

Code Block
themeEclipse
titleScheduled Task - 10000
{
   "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
}

Back to Top

...

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
titleAPI URLs

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

...

Parameter

Type

Required

Description

workflowRequestIdURLNoThis is a URL query parameter for the workflow request Id which is used to search the scheduled tasks.
folderRequestIdURLNoThis is a URL query parameter for the folder request Id which is used to search the scheduled tasks.
pipelineStageGateExecIdURLNoThis is a URL query parameter for the pipeline stage gate execution Id which is used to search the scheduled tasks.
pipelineStageStepExecIdURLNoThis is a URL query parameter for the pipeline stage step execution Id which is used to search the scheduled tasks.
projectIdURLNoThis is a URL query parameter for the project Id which is used to search the scheduled tasks.
applicationIdURLNoThis is a URL query parameter for the application Id which is used to search the scheduled tasks.
environmentIdURLNoThis is a URL query parameter for the environment Id which is used to search the scheduled tasks.
notesURL

Example

...

NoThis is a URL query parameter for notes added to the task when running or canceling it.

Example

If we had a scheduled task in our database with the following attributes

Code Block
themeEclipse
titlescheduled Task
{
   "projectVersionName": "1.0.11",
   "projectName": "Scheduled Tasks Project",
   "workflowRequestId": 656423,
   "projectId": 10002,
   "scheduledDate": "2099-03-16 22:17:52.0",
   "taskId": 14332,
   "requestType": "Project",
   "flexFields": [],
   "environmentId": 77954,
   "status": "PENDING",
   "notes": null
}

When we run a GET request at the following URL

...

Code Block
themeEclipse
titleApproval Task
{
   "projectVersionName": "1.0.11",
   "projectName": "Scheduled Tasks Project",
   "workflowRequestId": 656423,
   "projectId": 10002,
   "scheduledDate": "2099-03-16 22:17:52.0",
   "taskId": 14332,
   "requestType": "Project",
   "flexFields": [],
   "environmentId": 77954,
   "status": "PENDING",
   "notes": null
}

Back to Top

...

Run Now By TaskId

...

AttributesTypeRequiredDescription
IdLongYesThe Id of the scheduled task you wish to run
notesStringNoThis is a URL query parameter to add notes to the task when running it.

Example

If we had a scheduled task in our database with the following attributes

...

Parameter

Type

Required

Description

workflowRequestIdURLNoThis is a URL query parameter for the workflow request Id which is used to search the scheduled tasks.
folderRequestIdURLNoThis is a URL query parameter for the folder request Id which is used to search the scheduled tasks.
pipelineStageGateExecIdURLNoThis is a URL query parameter for the pipeline stage gate execution Id which is used to search the scheduled tasks.
pipelineStageStepExecIdURLNoThis is a URL query parameter for the pipeline stage step execution Id which is used to search the scheduled tasks.
projectIdURLNoThis is a URL query parameter for the project Id which is used to search the scheduled tasks.
applicationIdURLNoThis is a URL query parameter for the application Id which is used to search the scheduled tasks.
environmentIdURLNoThis is a URL query parameter for the environment Id which is used to search the scheduled tasks.
notesURLNoThis is a URL query parameter to add notes to the task when running it.

...

Code Block
themeEclipse
titleApproval Task
{
   "projectVersionName": "1.0.11",
   "projectName": "Scheduled Tasks Project",
   "workflowRequestId": 656423,
   "projectId": 10002,
   "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?projectid=10002&notes=Approved+by+George

The PUT request would run the scheduled task and return the following JSON scheduled task object

Code Block
themeEclipse
titleApproval Task
{
   "projectVersionName": "1.0.11",
   "projectName": "Scheduled Tasks Project",
   "workflowRequestId": 656423,
   "projectId": 10002,
   "scheduledDate": "2099-03-16 22:17:52.0",
   "taskId": 14332,
   "requestType": "Project",
   "flexFields": [],
   "environmentId": 77954,
   "status": "APPROVED",
   "notes": "Approved by George"
}

Back to Top

...

Cancel By TaskId

...

AttributesTypeRequiredDescription
IdLongYesThe Id of the scheduled task you wish to cancel
notesStringNoThis is a URL query parameter to add notes to the task when canceling it.

Example

If we had a scheduled task in our database with the following attributes

Code Block
themeEclipse
titleApproval Task
{
   "projectVersionName": "1.0.11",
   "projectName": "Scheduled Tasks Project",
   "workflowRequestId": 656423,
   "projectId": 10002,
   "scheduledDate": "2099-03-16 22:17:52.0",
   "taskId": 14332,
   "requestType": "Project",
   "flexFields": [],
   "environmentId": 77954,
   "status": 77954"PENDING",
   "statusnotes": "PENDING"null
}

When we run a PUT request at the following URL

http://host:port/flexdeploy/rest/tasks/scheduled/cancel/14332?notes=

The PUT request would cancel the scheduled task and return the following JSON scheduled task object

Code Block
themeEclipse
titleApproval Task
{
   "projectVersionName": "1.0.11",
   "projectName": "Scheduled Tasks Project",
   "workflowRequestId": 656423,
   "projectId": 10002,
   "scheduledDate": "2099-03-16 22:17:52.0",
   "taskId": 14332,
   "requestType": "Project",
   "flexFields": [],
   "environmentId": 77954,
   "status": "REJECTED",
   "notes": null
}

Back to Top

...

Cancel using Query Parameters

...

Parameter

Type

Required

Description

workflowRequestIdURLNoThis is a URL query parameter for the workflow request Id which is used to search the scheduled tasks.
folderRequestIdURLNoThis is a URL query parameter for the folder request Id which is used to search the scheduled tasks.
pipelineStageGateExecIdURLNoThis is a URL query parameter for the pipeline stage gate execution Id which is used to search the scheduled tasks.
pipelineStageStepExecIdURLNoThis is a URL query parameter for the pipeline stage step execution Id which is used to search the scheduled tasks.
projectIdURLNoThis is a URL query parameter for the project Id which is used to search the scheduled tasks.
applicationIdURLNoThis is a URL query parameter for the application Id which is used to search the scheduled tasks.
environmentIdURLNoThis is a URL query parameter for the environment Id which is used to search the scheduled tasks.
notesURLNoThis is a URL query parameter to add notes to the task when canceling it.


Example


If we had a scheduled task in our database with the following attributes

Code Block
themeEclipse
titleApproval Task
{
   "projectVersionName": "1.0.11",
   "projectName": "Scheduled Tasks Project",
   "workflowRequestId": 656423,
   "projectId": 10002,
   "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

...

Code Block
themeEclipse
titleApproval Task
{
   "projectVersionName": "1.0.11",
   "projectName": "Scheduled Tasks Project",
   "workflowRequestId": 656423,
   "projectId": 10002,
   "scheduledDate": "2099-03-16 22:17:52.0",
   "taskId": 14332,
   "requestType": "Project",
   "flexFields": [],
   "environmentId": 77954,
   "status": "REJECTED",
   "notes": null
}

Back to Top

...