Anchor
...
Each approval task can be one of three different types: Release, Application, and Project.
Release Approval Task
...
Application Approval Task
...
The pipeline stage execution Id of the release approval task.
Project Approval Task
...
Include Page |
---|
...
title | Base URL for Approval Tasks REST API |
---|
...
http://host:port/flexdeploy/rest/tasks/approval
Table of Contents | ||
---|---|---|
|
Each function returns a JSON approval task object. The approval task object has these attributes:
...
|
Table of Contents | ||
---|---|---|
|
GET
GET by TaskId
This GET service will find an approval task with the given task Id and return the JSON representation of the object.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/tasks/approval/{Id} |
...
Request
Parameter | Type | Required | Description |
---|---|---|---|
Id | URL | Yes | This is a URL parameter for the Id which is used to find and return an approval task. |
Include Page | ||||
---|---|---|---|---|
|
Example
If we had an application approval task in our database with an Id of 10000 and had the following attributes
Code Block | ||||
---|---|---|---|---|
| ||||
{ "projectName": "Project 1", "projectVersionName": "1.0.21", "workflowRequestId": 11701, "projectId": 10002, "taskId": 10000, "status": "PENDING", "environmentId": 16109, "flexFields": [], "requestType": "Project", "requestorPath": "FlexDeploy / Application 1", "notes": null } |
When we run a GET request at the following URL
http://host:port/flexdeploy/rest/v1/tasks/approval/10000
The GET request would return the following JSON approval task object
Code Block | ||||
---|---|---|---|---|
| ||||
{ "projectName": "Project 1", "projectVersionName": "1.0.21", "workflowRequestId": 11701, "projectId": 10002, "taskId": 10000, "status": "PENDING", "environmentId": 16109, "flexFields": [], "requestType": "Project", "requestorPath": "FlexDeploy / Application 1", } |
...
"notes": null
} |
GET (Using Query Parameters)
This GET service will return a list of approval tasks in the form of JSON objects based on a query parameter for the display name. Approval 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 tasks.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/tasks/approval? Append the following character sequences to the above URL to specify Query parameters.workflowrequestid workflowRequestId = {workflowRequestId} foldererquestid folderRequestId = {folderRequestId} pipelinestageexecid pipelineStageExecId = {pipelineStageExecId} projectid projectId = {projectId} applicationid applicationId = {applicationId} environmentid environmentId = {environmentId} externalId = {externalId} externalSystemType = {externalSystemType} externalSystemId = {externalSystemId} notes = {notes}* Examples:To return all of the approval tasks:http://host:port/flexdeploy/rest/v1/tasks/approval To search by project Id only:http://host:port/flexdeploy/rest/v1/tasks/approval?projectid=11001 |
...
Tip |
---|
The query parameters are not case sensitive. Searching by name=EXAMPLE is the same as searching by name=example. *notes are used to add a note, not search by a note. |
...
Request
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 folderRequestId | URL | No | This is a URL query parameter for the folder request Id which is used to search the approval tasks. |
pipelinestageexecidpipelineStageExecId | URL | No | This is a URL query parameter for the pipeline stage execution Id which is used to search the approval tasks. |
projectidprojectId | URL | No | This is a URL query parameter for the project Id which is used to search the approval tasks. |
applicationidapplicationId | URL | No | This is a URL query parameter for the application Id which is used to search the approval tasks. |
environmentidenvironmentId | URL | No | This is a URL query parameter for the environment Id which is used to search the approval tasks. |
externalId | URL | No | This is a URL query paramter for the external Id which is used to search the approval tasks. |
externalSystemType | URL | No | This is a URL query parameter for the external system type which is used to search the approval tasks. |
externalSystemId | URL | No | This is a URL query parameter for the external system Id which is used to seach the approval tasks.the approval tasks. |
notes | URL | No | Notes entered when approving or rejecting the task |
Include Page | ||||
---|---|---|---|---|
|
Example
If we had an approval task in our database with the following attributes
Code Block | ||||
---|---|---|---|---|
| ||||
[ { "projectName": "Project 1", "projectVersionName": "1.0.21", "workflowRequestId": 11701, "projectId": 10002, "taskId": 11702, "status": "PENDING", "environmentId": 16109, "flexFields": [], "requestType": "Project", "requestorPath": "FlexDeploy / Application 1", "notes": null } ] |
When we run a GET request at the following URL
http://host:port/flexdeploy/rest/v1/tasks/approval?projectid=10002
...
Code Block | ||||
---|---|---|---|---|
| ||||
[ { "projectName": "Project 1", "projectVersionName": "1.0.21", "workflowRequestId": 11701, "projectId": 10002, "taskId": 11702, "status": "PENDING", "environmentId": 16109, "flexFields": [], "requestType": "Project", "requestorPath": "FlexDeploy / Application 1", "notes": null } ] |
Approve By TaskId
This PUT service will approve an approval task with the given Id.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/tasks/approval/approve/{Id} |
...
Request
Attributes | Type | Required | Description |
---|---|---|---|
Id | Long | Yes | The Id that is used to approve an approval task with the same approval task Id.of the approval task you wish to approve |
Include Page | ||||
---|---|---|---|---|
|
Example
If we had an approval task in our database with the following attributes
Code Block | ||||
---|---|---|---|---|
| ||||
{
"projectName": "Project 1",
"projectVersionName": "1.0.21",
"workflowRequestId": 11701,
"projectId": 10002,
"taskId": 11702,
"status": "PENDING",
"environmentId": 16109,
"flexFields": [],
"requestType": "Project",
"requestorPath": "FlexDeploy / Application 1",
"notes": null
} |
When we run a PUT request at the following URL
http://host:port/flexdeploy/rest/v1/tasks/approval/approve/11702?notes=Approved+by+George
The PUT request would approve the approval task and return the following JSON approval task object
Code Block | ||||
---|---|---|---|---|
| ||||
{ "projectName": "Project 1", "projectVersionName": "1.0.21", "workflowRequestId": 11701, "projectId": 10002, "taskId": 11702, "status": "APPROVED", "environmentId": 16109, "flexFields": [], "requestType": "Project", "requestorPath": "FlexDeploy / Application 1", } |
...
"notes": "Approved by George"
} |
Approve using Query Parameters
...
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/tasks/approval/approve? Append the following character sequences to the above URL to specify Query parameters.workflowrequestid workflowRequestId = {workflowRequestId} foldererquestid folderRequestId = {folderRequestId} pipelinestageexecid pipelineStageExecId = {pipelineStageExecId} projectid projectId = {projectId} applicationid applicationId = {applicationId} environmentid environmentId = {environmentId} externalId = {externalId} externalSystemType = {externalSystemType} externalSystemId = {externalSystemId} notes = {notes} |
Info | ||
---|---|---|
| ||
Only one approval task can be approved at a time. If more than one task matches the query parameters an exception will be thrown. |
...
Request
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. |
foldererquestidfolderRequestId | URL | No | This is a URL query parameter for the folder request Id which is used to search the approval tasks. |
pipelinestageexecidpipelineStageExecId | URL | No | This is a URL query parameter for the pipeline stage execution Id which is used to search the approval tasks. |
projectidprojectId | URL | No | This is a URL query parameter for the project Id which is used to search the approval tasks. |
applicationidapplicationId | URL | No | This is a URL query parameter for the application Id which is used to search the approval tasks. |
environmentidenvironmentId | URL | No | This is a URL query parameter for the environment Id which is used to search the approval tasks. |
externalId | URL | No | This is a URL query parameter for the external Id which is used to search the approval tasks. |
externalSystemType | URL | No | This is a URL query parameter for the external Id which is used to search the approval tasks. |
externalSystemId | URL | No | This is a URL query parameter for the external Id which is used to search the approval tasks.search the approval tasks. |
notes | URL | No | Notes entered when approving or rejecting the task |
Include Page | ||||
---|---|---|---|---|
|
Example
If we had an approval task in our database with the following attributes
Code Block | ||||
---|---|---|---|---|
| ||||
{ "projectName": "Project 1", "projectVersionName": "1.0.21", "workflowRequestId": 11701, "projectId": 10002, "taskId": 11702, "status": "PENDING", "environmentId": 16109, "flexFields": [], "requestType": "Project", "requestorPath": "FlexDeploy / Application 1", "notes": null } |
When we run a PUT request at the following URL
http://host:port/flexdeploy/rest/v1/tasks/approval/approve?projectid=10002¬es=Approved+by+George
The PUT request would approve the approval task and return the following JSON approval task object
Code Block | ||||
---|---|---|---|---|
| ||||
{ "projectName": "Project 1", "projectVersionName": "1.0.21", "workflowRequestId": 11701, "projectId": 10002, "taskId": 11702, "status": "APPROVED", "environmentId": 16109, "flexFields": [], "requestType": "Project", "requestorPath": "FlexDeploy / Application 1", "notes": "Approved by George" } |
Reject By TaskId
This PUT service will reject an approval task with the given Id.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/tasks/approval/reject/{Id} |
...
Request
Attributes | Type | Required | Description |
---|---|---|---|
Id | Long | Yes | The Id that is used to approve an approval task with the same approval task Id.of the approval task you wish to reject |
Include Page | ||||
---|---|---|---|---|
|
Example
If we had an approval task in our database with the following attributes
Code Block | ||||
---|---|---|---|---|
| ||||
{ "projectName": "Project 1", "projectVersionName": "1.0.21", "workflowRequestId": 11701, "projectId": 10002, "taskId": 11702, "status": "PENDING", "environmentId": 16109, "flexFields": [], "requestType": "Project", "requestorPath": "FlexDeploy / Application 1", "notes": null } |
When we run a PUT request at the following URL
http://host:port/flexdeploy/rest/v1/tasks/approval/reject/11702?notes=Approved+by+George
The PUT request would reject the approval task and return the following JSON approval task object
Code Block | ||||
---|---|---|---|---|
| ||||
{ "projectName": "Project 1", "projectVersionName": "1.0.21", "workflowRequestId": 11701, "projectId": 10002, "taskId": 11702, "status": "REJECTED", "environmentId": 16109, "flexFields": [], "requestType": "Project", "requestorPath": "FlexDeploy / Application 1", } |
...
"notes": "Approved by George"
} |
Reject using Query Parameters
...
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/tasks/approval/reject? Append the following character sequences to the above URL to specify Query parameters.workflowrequestid workflowRequestId = {workflowRequestId} foldererquestid folderRequestId = {folderRequestId} pipelinestageexecid pipelineStageExecId = {pipelineStageExecId} projectid projectId = {projectId} applicationid applicationId = {applicationId} environmentid environmentId = {environmentId} externalId = {externalId} externalSystemType = {externalSystemType} externalSystemId = {externalSystemId} notes = {notes} |
Info | ||
---|---|---|
| ||
Only one approval task can be rejected at a time. If more than one task matches the query parameters an exception will be thrown. |
...
notes are used to add a note, not search by a note. |
Request
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. |
foldererquestidfolderRequestId | URL | No | This is a URL query parameter for the folder request Id which is used to search the approval tasks. |
pipelinestageexecidpipelineStageExecId | URL | No | This is a URL query parameter for the pipeline stage execution Id which is used to search the approval tasks. |
projectidprojectId | URL | No | This is a URL query parameter for the project Id which is used to search the approval tasks. |
applicationidapplicationId | URL | No | This is a URL query parameter for the application Id which is used to search the approval tasks. |
environmentidenvironmentId | URL | No | This is a URL query parameter for the environment Id which is used to search the approval tasks. |
externalId | URL | No | This is a URL query parameter for the external Id which is used to search the approval tasks. |
externalSystemType | URL | No | This is a URL query paramater for the external Id which is used to search the approval tasks. |
externalSystemId | URL | No | This is a URL query parameter for the external Id which is used to search the approval tasks. |
notes | URL | No | Notes entered when approving or rejecting the task |
Include Page | ||||
---|---|---|---|---|
|
Example
If we had an approval task in our database with the following attributes
Code Block | ||||
---|---|---|---|---|
| ||||
{ "projectName": "Project 1", "projectVersionName": "1.0.21", "workflowRequestId": 11701, "projectId": 10002, "taskId": 11702, "status": "PENDING", "environmentId": 16109, "flexFields": [], "requestType": "Project", "requestorPath": "FlexDeploy / Application 1", "notes": null } |
When we run a PUT request at the following URL
http://host:port/flexdeploy/rest/v1/tasks/approval/reject?projectid=10002¬es=Approved+by+George
The PUT request would reject the approval task and return the following JSON approval task object
Code Block | ||||
---|---|---|---|---|
| ||||
{ "projectName": "Project 1", "projectVersionName": "1.0.21", "workflowRequestId": 11701, "projectId": 10002, "taskId": 11702, "status": "REJECTED", "environmentId": 16109, "flexFields": [], "requestType": "Project", "requestorPath": "FlexDeploy / Application 1", "notes": null } |
...