Versions Compared

Key

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

Scheduled Tasks can be accessed through this API using GET. This API can also run and cancel scheduled tasks based on task id and other parameters.

...

Include Page
REST V1 Scheduled Task Response
REST V1 Scheduled 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 a scheduled task in our database with an Id of 10000 and the following attributes

...

GET (Using Query Parameters)

This GET service will return a list of scheduled tasks in the form of JSON objects based on a query parameter for the display name. 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 scheduled tasks.

Info
titleAPI URLs

http://host:port/flexdeploy/rest/v1/tasks/scheduled?

Append the following character sequences to the above URL to specify Query parameters.

workflowRequestId = {workflowRequestId}

folderRequestId = {folderRequestId}

pipelineStageGateExecId = {pipelineStageGateExecId}

pipelineStageStepExecId = {pipelineStageStepExecId}

projectId = {projectId}

applicationId = {applicationId}

environmentId = {environmentId}

notes = {notes}

Examples:
To return all of the scheduled tasks:

http://host:port/flexdeploy/rest/v1/tasks/scheduled

To search by project Id only:

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

...

Include Page
REST V1 Scheduled Task Response
REST V1 Scheduled Task Response

Response Codes

HTTP Code

Example

...

Description
200Search successful
401Authentication failure
403Authorization failure (no access to resource)
500Unexpected internal server error

Example

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

...

AttributesTypeRequiredDescription
IdLongYesThe Id of the scheduled task you wish to run
notesStringNoThis is a URL query parameter to add notes to the task when running it.

Include Page
REST V1 Scheduled Task Response
REST V1 Scheduled Task ResponseREST V1 Scheduled Task ResponseResponse

Response Codes

HTTP CodeDescription
200Task was found and schedule set to run immediately
401Authentication failure
403Authorization failure (no access to resource)
404Task not found
500Unexpected internal server error

Example

If we had a scheduled 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 scheduled tasks.
folderRequestIdURLNoThis is a URL query parameter for the folder request Id which is used to search the scheduled tasks.
pipelineStageGateExecIdURLNoThis is a URL query parameter for the pipeline stage gate execution Id which is used to search the scheduled tasks.
pipelineStageStepExecIdURLNoThis is a URL query parameter for the pipeline stage step execution Id which is used to search the scheduled tasks.
projectIdURLNoThis is a URL query parameter for the project Id which is used to search the scheduled tasks.
applicationIdURLNoThis is a URL query parameter for the application Id which is used to search the scheduled tasks.
environmentIdURLNoThis is a URL query parameter for the environment Id which is used to search the scheduled tasks.
notesURLNoThis is a URL query parameter to add notes to the task when running it.

...

Include Page
REST V1 Scheduled Task Response
REST V1 Scheduled Task Response

Response Codes

HTTP CodeDescription
200Task was found and schedule set to run immediately
401Authentication failure
403Authorization failure (no access to resource)
404Task not found
500Unexpected internal server error

Example

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

...

AttributesTypeRequiredDescription
IdLongYesThe Id of the scheduled task you wish to cancel
notesStringNoThis is a URL query parameter to add notes to the task when canceling it.

...

.

Include Page
REST V1 Scheduled Task Response
REST V1 Scheduled Task Response

Response Codes

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

Example

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

...

Include Page
REST V1 Scheduled Task Response
REST V1 Scheduled Task Response

Response Codes

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

Example

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

...