Versions Compared

Key

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

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.

...

Include Page
REST V1 Approval Task Response
REST V1 Approval Task Response

Response Codes

HTTP CodeDescription
200Task was found and returned
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

...

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
titleAPI 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

...

Include Page
REST V1 Approval Task Response
REST V1 Approval Task Response

Response Codes

HTTP Code

Example

...

Description
200Search successful and data returned (result could be empty)
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

...

AttributesTypeRequiredDescription
IdLongYesThe Id of the approval task you wish to approve

...

Include Page
REST V1 Approval Task Response
REST V1 Approval Task Response

Response Codes

HTTP CodeDescription
200Task was found and approved
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

...

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

...

task

Include Page
REST V1 Approval Task Response
REST V1 Approval Task Response

Response Codes

HTTP CodeDescription
200Task was found and approved
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

...

AttributesTypeRequiredDescription
IdLongYesThe Id of the approval task you wish to reject

...

to reject

Include Page
REST V1 Approval Task Response
REST V1 Approval Task Response

Response Codes

HTTP CodeDescription
200Workflow was found and rejected
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

...

Include Page
REST V1 Approval Task Response
REST V1 Approval Task Response

Response Codes

HTTP CodeDescription
200Task was found and rejected
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

...