Anchor | ||||
---|---|---|---|---|
|
...
Attributes | Type | Description |
---|---|---|
taskId | Long | The task id of the approval task. |
status | String | The status of the approval task. |
environmentId | Long | The environment Id of the approval task. |
requestType | String | The request type of the approval task. The request type can be a release, application, or project request. |
flexFields | List<FlexField> | The list of flex fields for the approval task. |
requestorPath | String | The requestor path of the approval task. |
externalId | String | The externalId of the approval task. If the approval task is not an external approval task this will be null. |
externalSystemId | Long | The externalSystemId of the approval task. If the approval task is not an external approval task this will be null. |
externalSystemTypexternalSystemType | String | The externalSystemType of the approval task. If the approval task is not an external approval task this will be null. |
notes | String | Notes the requestor entered when approving or rejecting the task |
Each approval task can be one of three different types: Release, Application, and Project.
...
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. |
pipelineStageGateExecId | Long | The pipeline stage execution Id of the release approval task. |
notes | String | Notes entered when approving or rejecting the task |
Application Approval Task
Attributes | Type | Description |
---|---|---|
applicationId | Long | The application id of the application approval task. |
applicationName | String | The application name of the application approval task. |
folderVersionName | String | The folder version name of the application approval task. |
folderRequestId | String | The folder request Id of the application approval task. |
notes | String | Notes entered when approving or rejecting the task |
Project Approval Task
Attributes | Type | Description |
---|---|---|
projectId | Long | The project id of the project approval task. |
projectName | String | The prohect name of the project approval task. |
projectVersionName | String | The project version name of the project approval task. |
workflowRequestId | Long | The workflow request id of the project approval task. |
notes | String | Notes entered when approving or rejecting the task |
...
GET
GET by TaskId
...
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
...
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/tasks/approval? Append the following character sequences to the above URL to specify Query parameters.workflowRequestId = {workflowRequestId} folderRequestId = {folderRequestId} pipelineStageExecId = {pipelineStageExecId} projectId = {projectId} applicationId = {applicationId} environmentId = {environmentId} externalId = {externalId} externalSystemType = {externalSystemType} externalSystemId = {externalSystemId} notes = {notes}* Examples:To return all of the approval tasks:http://host:port/flexdeploy/rest/tasks/approval To search by project Id only:http://host:port/flexdeploy/rest/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. |
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
workflowRequestId | URL | No | This is a URL query parameter for the workflow request Id which is used to search the approval tasks. |
folderRequestId | 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. |
projectId | URL | No | This is a URL query parameter for the project Id which is used to search the approval tasks. |
applicationId | URL | No | This is a URL query parameter for the application Id which is used to search the approval tasks. |
environmentId | 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. |
notes | URL | No | Notes entered when approving or rejecting the task |
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
...
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
...
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/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/tasks/approval/approve? Append the following character sequences to the above URL to specify Query parameters.workflowRequestId = {workflowRequestId} folderRequestId = {folderRequestId} pipelineStageExecId = {pipelineStageExecId} projectId = {projectId} applicationId = {applicationId} 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. |
...
Parameter | Type | Required | Description |
---|---|---|---|
workflowRequestId | URL | No | This is a URL query parameter for the workflow request Id which is used to search the approval tasks. |
folderRequestId | 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. |
projectId | URL | No | This is a URL query parameter for the project Id which is used to search the approval tasks. |
applicationId | URL | No | This is a URL query parameter for the application Id which is used to search the approval tasks. |
environmentId | 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. |
Example
notes | URL | No | Notes entered when approving or rejecting the task |
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/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
...
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/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/tasks/approval/reject? Append the following character sequences to the above URL to specify Query parameters.workflowRequestId = {workflowRequestId} folderRequestId = {folderRequestId} pipelineStageExecId = {pipelineStageExecId} projectId = {projectId} applicationId = {applicationId} 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. |
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
workflowRequestId | URL | No | This is a URL query parameter for the workflow request Id which is used to search the approval tasks. |
folderRequestId | 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. |
projectId | URL | No | This is a URL query parameter for the project Id which is used to search the approval tasks. |
applicationId | URL | No | This is a URL query parameter for the application Id which is used to search the approval tasks. |
environmentId | 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 |
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/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 } |
...