Versions Compared

Key

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

Anchor
Top
Top

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.

Info
titleBase URL for Approval Scheduled Tasks REST API

http://host:port/flexdeploy/rest/tasks/approvalscheduled

Table of Contents
maxLevel2

Each function returns a JSON approval scheduled task object. The approval scheduled task object has these attributes:

AttributesTypeDescription
taskIdLongThe task id of the approval scheduled task.
statusStringThe status of the approval the scheduled task.
scheduleDateStringThis is the scheduled date to run the scheduled task.
environmentIdLongThe environment Id of the approval scheduled task.
requestTypeStringThe request type of the approval scheduled task. The request type can be a releasestep, gate, application, or project request.
flexFieldsList<FlexField>The list of flex fields for the approval scheduled task.
requestorPathStringThe 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

AttributesTypeDescription
snapshotIdLongThe snapshot id of the release approval step scheduled task.
pipelineNameStringThe pipeline name of the release approval step scheduled task.
environmentNameStringThe environment name of the release approval the step scheduled task.
gateNamestepNameStringThe gate step name of the release approval step scheduled task.
releaseNameStringThe release name of the release approval step scheduled task.
releaseDefinitionIdreleaseIdLongThe release definition Id of the release approval step scheduled task. 
releaseSnapshotsnapshotNameStringThe release snapshot name of the release approval step scheduled task.
externalIdpipelineStageStepExecIdStringLongThe 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.
externalSystemIdStringThe external System Id of the release approval task. If the release approval task is not an external approval this will be null.
externalSystemTypeStringThe external System type of the release approval task. If the release approval task is not an external approval this will be null.
pipelineStageGateExecIdLongThe 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

AttributesTypeDescription
snapshotIdLongThe snapshot id of the release approval task.
pipelineNameStringThe pipeline name of the release approval task.
environmentNameStringThe environment name of the release approval task.
gateNameStringThe gate name of the release approval task.
releaseNameStringThe release name of the release approval task.
releaseDefinitionIdLongThe release definition Id of the release approval task. 
releaseSnapshotStringThe release snapshot of the release approval task.
externalIdStringThe external Id of the release approval task. If the release approval task is not an external approval this will be null.
externalSystemIdStringThe external System Id of the release approval task. If the release approval task is not an external approval this will be null.
externalSystemTypeStringThe external System type of the release approval task. If the release approval task is not an external approval this will be null.
pipelineStageGateExecIdLongThe pipeline stage execution Id of the release approval step 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.

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.

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.

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. 

Info
titleAPI URL

http://host:port/flexdeploy/rest/tasks/approvalscheduled/{Id}

Parameters

Parameter

Type

Required

Description

Id

URLYesThis 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
themeEclipse
titleApproval 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
themeEclipse
titleApproval 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
titleAPI URLs

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

workflowrequestid
workflowRequestIdURLNoThis is a URL query parameter for the workflow
request Id which is used to search the approval tasks.foldererquestidURLNoThis is a URL query parameter for the folder request Id which is used to search the approval tasks.pipelinestageexecidURLNoThis is a URL query parameter for the pipeline stage execution
request Id which is used to search the
approval
scheduled tasks.
projectid
folderRequestIdURLNoThis is a URL query parameter for the
project
folder request Id which is used to search the
approval
scheduled tasks.
applicationid
pipelineStageGateExecIdURLNoThis is a URL query parameter for the
application
pipeline stage gate execution Id which is used to search the
approval
scheduled tasks.
environmentid
pipelineStageStepExecIdURLNoThis is a URL query parameter for the
environment
pipeline stage step execution Id which is used to search the
approval
scheduled tasks.
externalId
projectIdURLNoThis is a URL query
paramter
parameter for the
external
project Id which is used to search the
approval
scheduled tasks.
externalSystemType
applicationIdURLNoThis is a URL query parameter for the
external system type
application Id which is used to search the
approval
scheduled tasks.
externalSystemId
environmentIdURL
No 
NoThis is a URL query parameter for the
external system
environment Id which is used to
seach
search the
approval
scheduled tasks.

Example

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

Code Block
themeEclipse
titleApproval 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
themeEclipse
titleApproval 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.

Info
titleAPI URL

http://host:port/flexdeploy/rest/tasks/approvalscheduled/approverunnow/{Id}

Parameters

AttributesTypeRequiredDescription
IdLongYesThe 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
themeEclipse
titleApproval 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
themeEclipse
titleApproval 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
titleAPI URLs

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
titleReturned Tasks

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

...

be thrown.

Parameters

Parameter

Type

Required

Description

workflowRequestIdURLNoThis is a URL query parameter for the
pipeline stage execution
workflow request Id which is used to search the
approval
scheduled tasks.
projectid
folderRequestIdURLNoThis is a URL query parameter for the
project
folder request Id which is used to search the
approval
scheduled tasks.
applicationid
pipelineStageGateExecIdURLNoThis is a URL query parameter for the
application
pipeline stage gate execution Id which is used to search the
approval
scheduled tasks.
environmentid
pipelineStageStepExecIdURLNoThis is a URL query parameter for the
environment
pipeline stage step execution Id which is used to search the
approval
scheduled tasks.
externalId 
projectIdURLNoThis is a URL query parameter for the
external
project Id which is used to search the
approval
scheduled tasks.
externalSystemType
applicationIdURLNoThis is a URL query parameter for the
external
application Id which is used to search the
approval
scheduled tasks.
externalSystemId 
environmentIdURLNoThis is a URL query parameter for the
external
environment Id which is used to search
the approval
the scheduled tasks.

Example
If we had

...

a scheduled task in our database with the following attributes

Code Block
themeEclipse
titleApproval 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
themeEclipse
titleApproval 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.

Info
titleAPI URL

http://host:port/flexdeploy/rest/tasks/approvalscheduled/rejectcancel/{Id}

Parameters

AttributesTypeRequiredDescription
IdLongYesThe 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
themeEclipse
titleApproval 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
themeEclipse
titleApproval 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
titleAPI URLs

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
titleReturned Tasks

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

workflowrequestid
workflowRequestIdURLNoThis is a URL query parameter for the workflow request Id which is used to search the
approval
scheduled tasks.
foldererquestidURLNoThis is a URL query parameter for the folder request Id which is used to search the approval tasks.pipelinestageexecidURLNoThis is a URL query parameter for the pipeline stage execution Id which is used to search the approval tasks.projectid
folderRequestIdURLNoThis is a URL query parameter for the
project
folder request Id which is used to search the
approval
scheduled tasks.
applicationid
pipelineStageGateExecIdURLNoThis is a URL query parameter for the
application
pipeline stage gate execution Id which is used to search the
approval
scheduled tasks.
environmentid
pipelineStageStepExecIdURLNoThis is a URL query parameter for the
environment
pipeline stage step execution Id which is used to search the
approval
scheduled tasks.
externalId
projectId
URL 
URLNoThis is a URL query parameter for the
external
project Id which is used to search the
approval
scheduled tasks.
externalSystemType
applicationIdURLNoThis is a URL query
paramater
parameter for the
external
application Id which is used to search the
approval
scheduled tasks.
externalSystemId
environmentId
URL 
URLNoThis is a URL query parameter for the
external
environment Id which is used to search the
approval
scheduled tasks.


Example


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

Code Block
themeEclipse
titleApproval 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
themeEclipse
titleApproval 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

...