Approval Tasks API

Approval Tasks can be accessed through this API using GET. This API can also approve and reject approval tasks based on task id and other parameters.

Authentication - Use Basic Authentication for this API.

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. 

API URL

http://host:port/flexdeploy/rest/v1/tasks/approval/{Id}

Request

Parameter

Type

Required

Description

Id

URLYesThis is a URL parameter for the Id which is used to find and return an approval task.

Response

AttributesTypeDescription
taskIdLongThe task id of the approval task.
statusStringThe status of the approval task.
environmentIdLongThe environment Id of the approval task.
requestTypeStringThe request type of the approval task. The request type can be a release, application, or project request.
flexFieldsList<FlexField>The list of flex fields for the approval task.
requestorPathStringThe requestor path of the approval task. 
externalIdStringThe externalId of the approval task. If the approval task is not an external approval task this will be null.
externalSystemIdLongThe externalSystemId of the approval task. If the approval task is not an external approval task this will be null.
externalSystemTypeStringThe externalSystemType of the approval task. If the approval task is not an external approval task this will be null.
notesStringNotes the requestor entered when approving or rejecting the task
linksList<Link>List of any relevant links for the object.

Each approval task can be one of three different types: Release, Application, and Project.

Release 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.
pipelineStageGateExecIdLongThe pipeline stage execution Id of the release approval task.
notesStringNotes entered when approving or rejecting the task

Application Approval Task

AttributesTypeDescription
applicationIdLongThe application id of the application approval task.
applicationNameStringThe application name of the application approval task.
folderVersionNameStringThe folder version name of the application approval task.
folderRequestIdStringThe folder request Id of the application approval task.
notesStringNotes entered when approving or rejecting the task

Project Approval Task

AttributesTypeDescription
projectIdLongThe project id of the project approval task.
projectNameStringThe prohect name of the project approval task.
projectVersionNameStringThe project version name of the project approval task.
workflowRequestIdLongThe workflow request id of the project approval task.
environmentNameStringThe environment name of the project approval task.
notesStringNotes entered when approving or rejecting the task

Link

AttributeTypeDescription
typeStringType of the link "REST", "UI"
linkStringPhysical link of the object.

Response Codes

HTTP CodeDescription
200Task was found and returned
400Bad request
401Authentication failure
403Authorization failure (no access to resource)
404Task not found
500Unexpected internal server error

Example

If we had an approval task in our database with an Id of 10000 and had the following attributes

Approval Task - 10000
{
   "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

Approval Task - 10000
{
   "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.

API URLs

http://host:port/flexdeploy/rest/v1/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/v1/tasks/approval

To search by project Id only:

http://host:port/flexdeploy/rest/v1/tasks/approval?projectid=11001

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

workflowRequestIdQuery - LongNoThis is a URL query parameter for the workflow request Id which is used to search the approval tasks.

folderRequestId

Query - LongNoThis is a URL query parameter for the folder request Id which is used to search the approval tasks.
pipelineStageExecIdQuery - LongNoThis is a URL query parameter for the pipeline stage execution Id which is used to search the approval tasks.
projectIdQuery - LongNoThis is a URL query parameter for the project Id which is used to search the approval tasks.
applicationIdQuery - LongNoThis is a URL query parameter for the application Id which is used to search the approval tasks.
environmentIdQuery - LongNoThis is a URL query parameter for the environment Id which is used to search the approval tasks.
externalIdQuery - LongNoThis is a URL query paramter for the external Id which is used to search the approval tasks.
externalSystemTypeQuery - StringNo

This is a URL query parameter for the external system type which is used to search the approval tasks.

Equals type search.

externalSystemIdQuery - LongNo This is a URL query parameter for the external system Id which is used to seach the approval tasks.
notesQuery - StringNo

Notes entered when approving or rejecting the task

Equals type search.

Response

AttributesTypeDescription
taskIdLongThe task id of the approval task.
statusStringThe status of the approval task.
environmentIdLongThe environment Id of the approval task.
requestTypeStringThe request type of the approval task. The request type can be a release, application, or project request.
flexFieldsList<FlexField>The list of flex fields for the approval task.
requestorPathStringThe requestor path of the approval task. 
externalIdStringThe externalId of the approval task. If the approval task is not an external approval task this will be null.
externalSystemIdLongThe externalSystemId of the approval task. If the approval task is not an external approval task this will be null.
externalSystemTypeStringThe externalSystemType of the approval task. If the approval task is not an external approval task this will be null.
notesStringNotes the requestor entered when approving or rejecting the task
linksList<Link>List of any relevant links for the object.

Each approval task can be one of three different types: Release, Application, and Project.

Release 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.
pipelineStageGateExecIdLongThe pipeline stage execution Id of the release approval task.
notesStringNotes entered when approving or rejecting the task

Application Approval Task

AttributesTypeDescription
applicationIdLongThe application id of the application approval task.
applicationNameStringThe application name of the application approval task.
folderVersionNameStringThe folder version name of the application approval task.
folderRequestIdStringThe folder request Id of the application approval task.
notesStringNotes entered when approving or rejecting the task

Project Approval Task

AttributesTypeDescription
projectIdLongThe project id of the project approval task.
projectNameStringThe prohect name of the project approval task.
projectVersionNameStringThe project version name of the project approval task.
workflowRequestIdLongThe workflow request id of the project approval task.
environmentNameStringThe environment name of the project approval task.
notesStringNotes entered when approving or rejecting the task

Link

AttributeTypeDescription
typeStringType of the link "REST", "UI"
linkStringPhysical link of the object.

Response Codes

HTTP CodeDescription
200Search successful and results returned
400Bad request
401Authentication failure
403Authorization failure (no access to resource)
500Unexpected internal server error

Example

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

Approval Task
[
{
   "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

The GET request would return the  following JSON approval task object

Approval Task
[
{
   "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.

API URL

http://host:port/flexdeploy/rest/v1/tasks/approval/approve/{Id}

Request

AttributesTypeRequiredDescription
IdLongYesThe Id of the approval task you wish to approve

Response

AttributesTypeDescription
taskIdLongThe task id of the approval task.
statusStringThe status of the approval task.
environmentIdLongThe environment Id of the approval task.
requestTypeStringThe request type of the approval task. The request type can be a release, application, or project request.
flexFieldsList<FlexField>The list of flex fields for the approval task.
requestorPathStringThe requestor path of the approval task. 
externalIdStringThe externalId of the approval task. If the approval task is not an external approval task this will be null.
externalSystemIdLongThe externalSystemId of the approval task. If the approval task is not an external approval task this will be null.
externalSystemTypeStringThe externalSystemType of the approval task. If the approval task is not an external approval task this will be null.
notesStringNotes the requestor entered when approving or rejecting the task
linksList<Link>List of any relevant links for the object.

Each approval task can be one of three different types: Release, Application, and Project.

Release 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.
pipelineStageGateExecIdLongThe pipeline stage execution Id of the release approval task.
notesStringNotes entered when approving or rejecting the task

Application Approval Task

AttributesTypeDescription
applicationIdLongThe application id of the application approval task.
applicationNameStringThe application name of the application approval task.
folderVersionNameStringThe folder version name of the application approval task.
folderRequestIdStringThe folder request Id of the application approval task.
notesStringNotes entered when approving or rejecting the task

Project Approval Task

AttributesTypeDescription
projectIdLongThe project id of the project approval task.
projectNameStringThe prohect name of the project approval task.
projectVersionNameStringThe project version name of the project approval task.
workflowRequestIdLongThe workflow request id of the project approval task.
environmentNameStringThe environment name of the project approval task.
notesStringNotes entered when approving or rejecting the task

Link

AttributeTypeDescription
typeStringType of the link "REST", "UI"
linkStringPhysical link of the object.

Response Codes

HTTP CodeDescription
200Task was found and approved
400Bad request
401Authentication failure
403Authorization failure (no access to resource)
404Task not found
500Unexpected internal server error

Example

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

Approval Task
{
   "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

Approval Task
{
   "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

This PUT service will approve an approval task with the given attributes.

API URLs

http://host:port/flexdeploy/rest/v1/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}

Returned Tasks

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

workflowRequestIdURLNoThis is a URL query parameter for the workflow request Id which is used to search the approval tasks.
folderRequestIdURLNoThis 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.
projectIdURLNoThis is a URL query parameter for the project Id which is used to search the approval tasks.
applicationIdURLNoThis is a URL query parameter for the application Id which is used to search the approval tasks.
environmentIdURLNoThis is a URL query parameter for the environment Id which is used to search the approval tasks.
externalId URLNoThis is a URL query parameter for the external Id which is used to search the approval tasks.
externalSystemTypeURLNoThis is a URL query parameter for the external Id which is used to search the approval tasks.
externalSystemId URLNoThis is a URL query parameter for the external Id which is used to search the approval tasks.
notesURLNoNotes entered when approving or rejecting the task

Response

AttributesTypeDescription
taskIdLongThe task id of the approval task.
statusStringThe status of the approval task.
environmentIdLongThe environment Id of the approval task.
requestTypeStringThe request type of the approval task. The request type can be a release, application, or project request.
flexFieldsList<FlexField>The list of flex fields for the approval task.
requestorPathStringThe requestor path of the approval task. 
externalIdStringThe externalId of the approval task. If the approval task is not an external approval task this will be null.
externalSystemIdLongThe externalSystemId of the approval task. If the approval task is not an external approval task this will be null.
externalSystemTypeStringThe externalSystemType of the approval task. If the approval task is not an external approval task this will be null.
notesStringNotes the requestor entered when approving or rejecting the task
linksList<Link>List of any relevant links for the object.

Each approval task can be one of three different types: Release, Application, and Project.

Release 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.
pipelineStageGateExecIdLongThe pipeline stage execution Id of the release approval task.
notesStringNotes entered when approving or rejecting the task

Application Approval Task

AttributesTypeDescription
applicationIdLongThe application id of the application approval task.
applicationNameStringThe application name of the application approval task.
folderVersionNameStringThe folder version name of the application approval task.
folderRequestIdStringThe folder request Id of the application approval task.
notesStringNotes entered when approving or rejecting the task

Project Approval Task

AttributesTypeDescription
projectIdLongThe project id of the project approval task.
projectNameStringThe prohect name of the project approval task.
projectVersionNameStringThe project version name of the project approval task.
workflowRequestIdLongThe workflow request id of the project approval task.
environmentNameStringThe environment name of the project approval task.
notesStringNotes entered when approving or rejecting the task

Link

AttributeTypeDescription
typeStringType of the link "REST", "UI"
linkStringPhysical link of the object.

Response Codes

HTTP CodeDescription
200Task was found and approved
400Bad request
401Authentication failure
403Authorization failure (no access to resource)
404Task not found
500Unexpected internal server error

Example

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

Approval Task
{
   "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&notes=Approved+by+George

The PUT request would approve the approval task and return the following JSON approval task object

Approval Task
{
   "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.

API URL

http://host:port/flexdeploy/rest/v1/tasks/approval/reject/{Id}

Request

AttributesTypeRequiredDescription
IdLongYesThe Id of the approval task you wish to reject

Response

AttributesTypeDescription
taskIdLongThe task id of the approval task.
statusStringThe status of the approval task.
environmentIdLongThe environment Id of the approval task.
requestTypeStringThe request type of the approval task. The request type can be a release, application, or project request.
flexFieldsList<FlexField>The list of flex fields for the approval task.
requestorPathStringThe requestor path of the approval task. 
externalIdStringThe externalId of the approval task. If the approval task is not an external approval task this will be null.
externalSystemIdLongThe externalSystemId of the approval task. If the approval task is not an external approval task this will be null.
externalSystemTypeStringThe externalSystemType of the approval task. If the approval task is not an external approval task this will be null.
notesStringNotes the requestor entered when approving or rejecting the task
linksList<Link>List of any relevant links for the object.

Each approval task can be one of three different types: Release, Application, and Project.

Release 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.
pipelineStageGateExecIdLongThe pipeline stage execution Id of the release approval task.
notesStringNotes entered when approving or rejecting the task

Application Approval Task

AttributesTypeDescription
applicationIdLongThe application id of the application approval task.
applicationNameStringThe application name of the application approval task.
folderVersionNameStringThe folder version name of the application approval task.
folderRequestIdStringThe folder request Id of the application approval task.
notesStringNotes entered when approving or rejecting the task

Project Approval Task

AttributesTypeDescription
projectIdLongThe project id of the project approval task.
projectNameStringThe prohect name of the project approval task.
projectVersionNameStringThe project version name of the project approval task.
workflowRequestIdLongThe workflow request id of the project approval task.
environmentNameStringThe environment name of the project approval task.
notesStringNotes entered when approving or rejecting the task

Link

AttributeTypeDescription
typeStringType of the link "REST", "UI"
linkStringPhysical link of the object.

Response Codes

HTTP CodeDescription
200Workflow was found and rejected
400Bad request
401Authentication failure
403Authorization failure (no access to resource)
404Task not found
500Unexpected internal server error

Example

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

Approval Task
{
   "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

Approval Task
{
   "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

This PUT service will approve an approval task with the given attributes.

API URLs

http://host:port/flexdeploy/rest/v1/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}

Returned Tasks

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

workflowRequestIdURLNoThis is a URL query parameter for the workflow request Id which is used to search the approval tasks.
folderRequestIdURLNoThis 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.
projectIdURLNoThis is a URL query parameter for the project Id which is used to search the approval tasks.
applicationIdURLNoThis is a URL query parameter for the application Id which is used to search the approval tasks.
environmentIdURLNoThis is a URL query parameter for the environment Id which is used to search the approval tasks.
externalIdURL NoThis is a URL query parameter for the external Id which is used to search the approval tasks.
externalSystemTypeURLNoThis is a URL query paramater for the external Id which is used to search the approval tasks.
externalSystemIdURL NoThis is a URL query parameter for the external Id which is used to search the approval tasks.
notesURLNoNotes entered when approving or rejecting the task

Response

AttributesTypeDescription
taskIdLongThe task id of the approval task.
statusStringThe status of the approval task.
environmentIdLongThe environment Id of the approval task.
requestTypeStringThe request type of the approval task. The request type can be a release, application, or project request.
flexFieldsList<FlexField>The list of flex fields for the approval task.
requestorPathStringThe requestor path of the approval task. 
externalIdStringThe externalId of the approval task. If the approval task is not an external approval task this will be null.
externalSystemIdLongThe externalSystemId of the approval task. If the approval task is not an external approval task this will be null.
externalSystemTypeStringThe externalSystemType of the approval task. If the approval task is not an external approval task this will be null.
notesStringNotes the requestor entered when approving or rejecting the task
linksList<Link>List of any relevant links for the object.

Each approval task can be one of three different types: Release, Application, and Project.

Release 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.
pipelineStageGateExecIdLongThe pipeline stage execution Id of the release approval task.
notesStringNotes entered when approving or rejecting the task

Application Approval Task

AttributesTypeDescription
applicationIdLongThe application id of the application approval task.
applicationNameStringThe application name of the application approval task.
folderVersionNameStringThe folder version name of the application approval task.
folderRequestIdStringThe folder request Id of the application approval task.
notesStringNotes entered when approving or rejecting the task

Project Approval Task

AttributesTypeDescription
projectIdLongThe project id of the project approval task.
projectNameStringThe prohect name of the project approval task.
projectVersionNameStringThe project version name of the project approval task.
workflowRequestIdLongThe workflow request id of the project approval task.
environmentNameStringThe environment name of the project approval task.
notesStringNotes entered when approving or rejecting the task

Link

AttributeTypeDescription
typeStringType of the link "REST", "UI"
linkStringPhysical link of the object.

Response Codes

HTTP CodeDescription
200Task was found and rejected
400Bad request
401Authentication failure
403Authorization failure (no access to resource)
404Task not found
500Unexpected internal server error

Example

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

Approval Task
{
   "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&notes=Approved+by+George

The PUT request would reject the approval task and return the following JSON approval task object

Approval Task
{
   "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
}
The following macros are not currently supported in the footer:
  • style