Approval Scheduled Tasks can be accessed through this API using GET. This API can also approve run and reject approval cancel scheduled tasks based on task id and other parameters.
Each function returns a JSON approval scheduled task object. The approval scheduled task object has these attributes:
Attributes | Type | Description |
---|
taskId | Long | The task id of the approval scheduled task. |
status | String | The status of the approval the scheduled task. |
scheduleDate | String | This is the scheduled date to run the scheduled task. |
environmentId | Long | The environment Id of the approval scheduled task. |
requestType | String | The request type of the approval scheduled task. The request type can be a releasestep, gate, application, or project request. |
flexFields | List<FlexField> | The list of flex fields for the approval scheduled task. |
requestorPath | String | The requestor path of the approval task. |
Each approval task can be one of three different types: ReleaseEach scheduled task can be one of four different types: Step, Stage, Application, and Project.
...
Step Scheduled Task
Attributes | Type | Description |
---|
snapshotId | Long | The snapshot id of the release approval step scheduled task. |
pipelineName | String | The pipeline name of the release approval step scheduled task. |
environmentName | String | The environment name of the release approval the step scheduled task. |
gateNamestepName | String | The gate step name of the release approval step scheduled task. |
releaseName | String | The release name of the release approval step scheduled task. |
releaseDefinitionIdreleaseId | Long | The release definition Id of the release approval step scheduled task. |
releaseSnapshotsnapshotName | String | The release snapshot name of the release approval step scheduled task. |
externalIdpipelineStageStepExecId | StringLong | The external pipeline stage step execution Id of the release approval task. If the release approval task is not an external approval this will be null. |
externalSystemId | String | The external System Id of the release approval task. If the release approval task is not an external approval this will be null. |
externalSystemType | String | The external System type of the release approval task. If the release approval task is not an external approval this will be null. |
pipelineStageGateExecId | Long | The pipeline stage execution Id of the release approval task. |
Application Approval Task
...
The pipeline stage execution Id of the release approval task.
Project Approval Task
Attributes | Type | Description |
---|
snapshotId | Long | The snapshot id of the release approval task. |
pipelineName | String | The pipeline name of the release approval task. |
environmentName | String | The environment name of the release approval task. |
gateName | String | The gate name of the release approval task. |
releaseName | String | The release name of the release approval task. |
releaseDefinitionId | Long | The release definition Id of the release approval task. |
releaseSnapshot | String | The release snapshot of the release approval task. |
externalId | String | The external Id of the release approval task. If the release approval task is not an external approval this will be null. |
externalSystemId | String | The external System Id of the release approval task. If the release approval task is not an external approval this will be null. |
externalSystemType | String | The external System type of the release approval task. If the release approval task is not an external approval this will be null. |
pipelineStageGateExecId | Long | The pipeline stage execution Id of the release approval step scheduled task. |
Gate Scheduled Task
Attributes | Type | Description |
---|
snapshotId | Long | The snapshot id of the gate scheduled task. |
pipelineName | String | The pipeline name of the gate scheduled task. |
environmentName | String | The environment name of the gate scheduled task. |
gateName | String | The gate name of the gate scheduled task. |
releaseName | String | The release name of the gate scheduled task. |
releaseId | Long | The release Id of the gate scheduled task. |
snapshotName | String | The snapshot name of the gate scheduled task. |
pipelineStageGateExecId | Long | The pipeline stage gate execution Id of the gate scheduled task. |
Application Scheduled Task
Attributes | Type | Description |
---|
applicationId | Long | The application Id of the application scheduled task. |
applicationName | String | The application name of the application scheduled task. |
folderVersionName | String | The folder version name of the application scheduled task. |
folderRequestId | Long | The folder request Id of the application scheduled task. |
Project Scheduled Task
Attributes | Type | Description |
---|
projectId | Long | The project Id of the project scheduled task. |
projectName | String | The project name of the project scheduled task. |
projectVersionName | String | The project version name of the project scheduled task. |
workflowRequestId | Long | The workflow request Id of the project scheduled task. |
Back to Top
...
GET
GET by TaskId
This GET service will find an approval a scheduled task with the given task Id and return the JSON representation of the object.
Parameters
Parameter | Type | Required | Description |
---|
Id | URL | Yes | This is a URL parameter for the Id which is used to find and return an approval a scheduled task. |
Example
If we had an application a scheduled task in our database with an Id of 10000 and had the following attributes
Code Block |
---|
theme | Eclipse |
---|
title | Approval Scheduled Task - 10000 |
---|
|
{
"projectNameprojectVersionName": "Project 1.0.11",
"projectVersionNameprojectName": "1.0.21Scheduled Tasks Project",
"workflowRequestId": 11701656423,
"projectId": 10002576267,
"taskIdscheduledDate": 10000 "2099-03-16 22:17:52.0",
"statustaskId": "PENDING"14332,
"environmentIdrequestType": 16109"Project",
"flexFields": [],
"requestType": "Project"environmentId": 77954,
"requestorPathstatus": "FlexDeploy / Application 1PENDING"
} |
When we run a GET request at the following URL
http://host:port/flexdeploy/rest/tasks/approvalscheduled/10000
The GET request would return the following JSON approval scheduled task object
Code Block |
---|
theme | Eclipse |
---|
title | Approval Scheduled Task - 10000 |
---|
|
{
"projectNameprojectVersionName": "Project 1.0.11",
"projectVersionNameprojectName": "1.0.21Scheduled Tasks Project",
"workflowRequestId": 11701656423,
"projectId": 10002576267,
"taskIdscheduledDate": 10000"2099-03-16 22:17:52.0",
"statustaskId": "PENDING"14332,
"environmentIdrequestType": 16109"Project",
"flexFields": [],
"requestTypeenvironmentId": "Project"77954,
"requestorPathstatus": "FlexDeploy / Application 1PENDING"
} |
Back to Top
...
GET (Using Query Parameters)
This GET service will return a list of approval scheduled tasks in the form of JSON objects based on a query parameter for the display name. Approval 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 approval scheduled tasks.
Info |
---|
|
http://host:port/flexdeploy/rest/tasks/approvalscheduled? Append the following character sequences to the above URL to specify Query parameters.workflowrequestid workflowRequestId = {workflowRequestId} foldererquestid folderRequestId = {folderRequestId} pipelinestageexecid pipelineStageGateExecId = {pipelineStageExecIdpipelineStageGateExecId} projectid pipelineStageStepExecId = {projectIdpipelineStageStepExecId} applicationid projectId = {applicationIdprojectId} environmentid applicationId = {environmentIdapplicationId} externalId = {externalId} externalSystemType = {externalSystemType} externalSystemId environmentId = {externalSystemIdenvironmentId} Examples:To return all of the approval scheduled tasks:http://host:port/flexdeploy/rest/tasks/approvalscheduled To search by project Id only:http://host:port/flexdeploy/rest/tasks/approvalscheduled?projectid=11001 |
Tip |
---|
The query parameters are not case sensitive. Searching by name=EXAMPLE is the same as searching by name=example. |
Parameters
Parameter | Type | Required | Description |
---|
workflowrequestidworkflowRequestId | URL | No | This is a URL query parameter for the workflow |
request Id which is used to search the approval tasks.foldererquestid | URL | No | This is a URL query parameter for the folder request Id which is used to search the approval tasks. |
pipelinestageexecid | URL | No | This is a URL query parameter for the pipeline stage execution request Id which is used to search the |
approval projectidfolderRequestId | URL | No | This is a URL query parameter for the |
project folder request Id which is used to search the |
approval applicationidpipelineStageGateExecId | URL | No | This is a URL query parameter for the |
application pipeline stage gate execution Id which is used to search the |
approval environmentidpipelineStageStepExecId | URL | No | This is a URL query parameter for the |
environment pipeline stage step execution Id which is used to search the |
approval externalIdprojectId | URL | No | This is a URL query |
paramter external project Id which is used to search the |
approval externalSystemTypeapplicationId | URL | No | This is a URL query parameter for the |
external system type application Id which is used to search the |
approval externalSystemIdNo No | This is a URL query parameter for the |
external system environment Id which is used to |
seach approval Example
If we had an approval a scheduled task in our database with the following attributes
Code Block |
---|
theme | Eclipse |
---|
title | Approval scheduled Task |
---|
|
[
{
"projectNameprojectVersionName": "Project 1.0.11",
"projectVersionNameprojectName": "1.0.21Scheduled Tasks Project",
"workflowRequestId": 11701656423,
"projectId": 10002,
"taskIdscheduledDate": 11702 "2099-03-16 22:17:52.0",
"statustaskId": "PENDING"14332,
"environmentIdrequestType": 16109"Project",
"flexFields": [],
"requestTypeenvironmentId": "Project"77954,
"requestorPath": "FlexDeploy / Application 1status": "PENDING"
}
] |
When we run a GET request at the following URL
http://host:port/flexdeploy/rest/tasks/approvalscheduled?projectid=10002
The GET request would return the following JSON approval scheduled task object
Code Block |
---|
theme | Eclipse |
---|
title | Approval Task |
---|
|
[
{
"projectNameprojectVersionName": "Project 1.0.11",
"projectVersionNameprojectName": "1.0.21Scheduled Tasks Project",
"workflowRequestId": 11701656423,
"projectId": 10002,
"projectId": 10002"scheduledDate": "2099-03-16 22:17:52.0",
"taskId": 1170214332,
"statusrequestType": "PENDINGProject",
"environmentId": 16109,
"flexFields": [],
"requestTypeenvironmentId": "Project"77954,
"requestorPathstatus": "FlexDeploy / Application 1PENDING"
}
] |
Back to Top
...
Run Now By TaskId
This PUT service will approve an approval run a scheduled task with the given Id.
Parameters
Attributes | Type | Required | Description |
---|
Id | Long | Yes | The Id that is used to approve an approval run a scheduled task with the same approval scheduled task Id. |
Example
If we had an approval a scheduled task in our database with the following attributes
Code Block |
---|
theme | Eclipse |
---|
title | Approval Task |
---|
|
{
"projectNameprojectVersionName": "Project 1.0.11",
"projectVersionNameprojectName": "1.0.21Scheduled Tasks Project",
"workflowRequestId": 11701656423,
"projectId": 10002576267,
"taskIdscheduledDate": 11702 "2099-03-16 22:17:52.0",
"statustaskId": "PENDING"14332,
"environmentIdrequestType": 16109"Project",
"flexFields": [],
"requestTypeenvironmentId": "Project"77954,
"requestorPath": "FlexDeploy / Application 1status": "PENDING"
} |
When we run a PUT request at the following URL
http://host:port/flexdeploy/rest/tasks/approvalscheduled/approverunnow/1170214332
The PUT request would approve run the approval scheduled task and return the following JSON approval scheduled task object
Code Block |
---|
theme | Eclipse |
---|
title | Approval Task |
---|
|
{
"projectNameprojectVersionName": "Project 1.0.11",
"projectVersionNameprojectName": "1.0.21Scheduled Tasks Project",
"workflowRequestId": 11701656423,
"projectId": 10002576267,
"taskIdscheduledDate": 11702"2099-03-16 22:17:52.0",
"statustaskId": "APPROVED"14332,
"environmentIdrequestType": 16109"Project",
"flexFields": [],
"requestTypeenvironmentId": "Project"77954,
"requestorPathstatus": "FlexDeploy / Application 1APPROVED"
} |
Back to Top
...
Run Now using Query Parameters
This PUT service will approve an approval run a scheduled task with the given attributes.
Info |
---|
|
http://host:port/flexdeploy/rest/tasks/approvalscheduled/approverunnow? Append the following character sequences to the above URL to specify Query parameters.workflowrequestid workflowRequestId = {workflowRequestId} foldererquestid folderRequestId = {folderRequestId} pipelinestageexecid pipelineStageGateExecId = {pipelineStageExecIdpipelineStageGateExecId} projectid pipelineStageStepExecId = {projectIdpipelineStageStepExecId} applicationid projectId = {applicationIdprojectId} environmentid applicationId = {environmentIdapplicationId} externalId = {externalId} externalSystemType environmentId = {externalSystemTypeenvironmentId} |
Info |
---|
|
Only one approval scheduled task can be approved ran at a time. If more than one task matches the query parameters an exception will be thrown. |
Parameters
...
Parameter
...
Type
...
Required
...
Description
...
Parameters
Parameter | Type | Required | Description |
---|
workflowRequestId | URL | No | This is a URL query parameter for the |
pipeline stage execution workflow request Id which is used to search the |
approval projectidfolderRequestId | URL | No | This is a URL query parameter for the |
project folder request Id which is used to search the |
approval applicationidpipelineStageGateExecId | URL | No | This is a URL query parameter for the |
application pipeline stage gate execution Id which is used to search the |
approval environmentidpipelineStageStepExecId | URL | No | This is a URL query parameter for the |
environment pipeline stage step execution Id which is used to search the |
approval externalId projectId | URL | No | This is a URL query parameter for the |
external project Id which is used to search the |
approval externalSystemTypeapplicationId | URL | No | This is a URL query parameter for the |
external application Id which is used to search the |
approval externalSystemId environmentId | URL | No | This is a URL query parameter for the |
external environment Id which is used to search |
the approval Example
If we had
...
a scheduled task in our database with the following attributes
Code Block |
---|
theme | Eclipse |
---|
title | Approval Task |
---|
|
{
"projectNameprojectVersionName": "Project 1.0.11",
"projectVersionNameprojectName": "1.0.21Scheduled Tasks Project",
"workflowRequestId": 11701656423,
"projectId": 10002,
"taskIdscheduledDate": 11702 "2099-03-16 22:17:52.0",
"statustaskId": "PENDING"14332,
"environmentIdrequestType": 16109"Project",
"flexFields": [],
"requestTypeenvironmentId": "Project"77954,
"requestorPathstatus": "FlexDeploy / Application 1PENDING"
} |
When we run a PUT request at the following URL
http://host:port/flexdeploy/rest/tasks/approvalscheduled/approverunnow?projectid=10002
The PUT request would approve run the approval scheduled task and return the following JSON approval scheduled task object
Code Block |
---|
theme | Eclipse |
---|
title | Approval Task |
---|
|
{
"projectNameprojectVersionName": "Project 1.0.11",
"projectVersionNameprojectName": "1.0.21Scheduled Tasks Project",
"workflowRequestId": 11701,
"projectId": 10002656423,
"projectId": 10002,
"scheduledDate": "2099-03-16 22:17:52.0",
"taskId": 1170214332,
"statusrequestType": "APPROVEDProject",
"environmentId": 16109,
"flexFields": [],
"requestTypeenvironmentId": "Project"77954,
"requestorPathstatus": "FlexDeploy / Application 1APPROVED"
} |
Back to Top
...
Cancel By TaskId
This PUT service will reject an approval a scheduled task with the given Id.
Parameters
Attributes | Type | Required | Description |
---|
Id | Long | Yes | The Id that is used to approve an approval cancel a scheduled task with the same approval task Id. |
Example
If we had an approval a scheduled task in our database with the following attributes
Code Block |
---|
theme | Eclipse |
---|
title | Approval Task |
---|
|
{
"projectNameprojectVersionName": "Project 1.0.11",
"projectVersionNameprojectName": "1.0.21Scheduled Tasks Project",
"workflowRequestId": 11701656423,
"projectId": 10002,
"taskIdscheduledDate": 11702 "2099-03-16 22:17:52.0",
"statustaskId": "PENDING"14332,
"environmentIdrequestType": 16109"Project",
"flexFields": [],
"requestTypeenvironmentId": "Project"77954,
"requestorPath": "FlexDeploy / Application 1status": "PENDING"
} |
When we run a PUT request at the following URL
http://host:port/flexdeploy/rest/tasks/approvalscheduled/rejectcancel/1170214332
The PUT request would reject cancel the approval scheduled task and return the following JSON approval scheduled task object
Code Block |
---|
theme | Eclipse |
---|
title | Approval Task |
---|
|
{
"projectNameprojectVersionName": "Project 1.0.11",
"projectVersionNameprojectName": "1.0.21Scheduled Tasks Project",
"workflowRequestId": 11701656423,
"projectId": 1000210002,
"scheduledDate": "2099-03-16 22:17:52.0",
"taskId": 1170214332,
"statusrequestType": "REJECTEDProject",
"environmentId": 16109,
"flexFields": [],
"requestTypeenvironmentId": "Project"77954,
"requestorPathstatus": "FlexDeploy / Application 1REJECTED"
} |
Back to Top
...
Cancel using Query Parameters
This PUT service will approve an approval cancel a scheduled task with the given attributes.
Info |
---|
|
http://host:port/flexdeploy/rest/tasks/approvalscheduled/rejectcancel? Append the following character sequences to the above URL to specify Query parameters.workflowrequestid workflowRequestId = {workflowRequestId} foldererquestid folderRequestId = {folderRequestId} pipelineStageGateExecId = {pipelineStageGateExecId} pipelinestageexecid pipelineStageStepExecId = {pipelineStageExecIdpipelineStageStepExecId} projectid projectId = {projectId} applicationid applicationId = {applicationId} environmentid environmentId = {environmentId} |
Info |
---|
|
Only one approval scheduled task can be rejected canceled at a time. If more than one task matches the query parameters an exception will be thrown. |
Parameters
Parameter | Type | Required | Description |
---|
workflowrequestidworkflowRequestId | URL | No | This is a URL query parameter for the workflow request Id which is used to search the |
approval foldererquestid | URL | No | This is a URL query parameter for the folder request Id which is used to search the approval tasks. |
pipelinestageexecid | URL | No | This is a URL query parameter for the pipeline stage execution Id which is used to search the approval tasks. |
projectidfolderRequestId | URL | No | This is a URL query parameter for the |
project folder request Id which is used to search the |
approval applicationidpipelineStageGateExecId | URL | No | This is a URL query parameter for the |
application pipeline stage gate execution Id which is used to search the |
approval environmentidpipelineStageStepExecId | URL | No | This is a URL query parameter for the |
environment pipeline stage step execution Id which is used to search the |
approval externalIdURL URL | No | This is a URL query parameter for the |
external project Id which is used to search the |
approval externalSystemTypeapplicationId | URL | No | This is a URL query |
paramater external application Id which is used to search the |
approval externalSystemIdURL URL | No | This is a URL query parameter for the |
external environment Id which is used to search the |
approval
Example
If we had an approval a scheduled task in our database with the following attributes
Code Block |
---|
theme | Eclipse |
---|
title | Approval Task |
---|
|
{
"projectNameprojectVersionName": "Project 1.0.11",
"projectVersionNameprojectName": "1.0.21Scheduled Tasks Project",
"workflowRequestId": 11701656423,
"projectId": 10002,
"taskIdscheduledDate": 11702 "2099-03-16 22:17:52.0",
"statustaskId": "PENDING"14332,
"environmentIdrequestType": 16109"Project",
"flexFields": [],
"requestTypeenvironmentId": "Project"77954,
"requestorPathstatus": "FlexDeploy / Application 1PENDING"
} |
When we run a PUT request at the following URL
http://host:port/flexdeploy/rest/tasks/approvalscheduled/rejectcancel?projectid=10002
The PUT request would reject cancel the approval scheduled task and return the following JSON approval scheduled task object
Code Block |
---|
theme | Eclipse |
---|
title | Approval Task |
---|
|
{
"projectNameprojectVersionName": "Project 1.0.11",
"projectVersionNameprojectName": "1.0.21Scheduled Tasks Project",
"workflowRequestId": 11701656423,
"projectId": 10002,
"taskIdscheduledDate": 11702 "2099-03-16 22:17:52.0",
"statustaskId": "REJECTED"14332,
"environmentIdrequestType": 16109"Project",
"flexFields": [],
"requestTypeenvironmentId": "Project"77954,
"requestorPathstatus": "FlexDeploy / Application 1REJECTED"
} |
Back to Top
...