List all of the tasks in the supplied Octopus Deploy Space. The results will be sorted from newest to oldest
GET /api
Also reachable at /api, /api.
Path Parameters
spaceIdstring (required)
Query Parameters
activeboolean
Set to true for tasks that have not finished (New, Queued, Executing or Cancelling), or false for tasks that have.batchstringdescriptionstring
Text to match within a task’s description, such as a project or release name. This is a partial match, not an exact one.environmentstring
The ID of an environment, to return only tasks against that environment. This is an ID such as ‘Environments-1’, not an environment name.fromCompletedDatestring
Formatdate-time.fromQueueDatestring
Formatdate-time.fromStartDatestring
Formatdate-time.hasPendingInterruptionsbooleanhasPendingPreconditionsbooleanhasWarningsOrErrorsbooleanidsarray of string
Task IDs to return, such as ‘ServerTasks-1’.namearray of string
Task type names to match exactly, such as ‘Deploy’ or ‘RunbookRun’. Use ListServerTaskTypes to get the supported values.nodestring
The ID of the Octopus Server node a task ran on, to return only tasks from that node.partialNamestring
A partial task type name, to match tasks whose type name includes it.projectstring
The ID of a project, to return only tasks against that project. This is an ID such as ‘Projects-1’, not a project name.runbookstring
The ID of a runbook, to return only runs of that runbook.runningboolean
Set to true for tasks currently in progress (Executing or Cancelling), or false for tasks that are not.skipinteger
Number of items to skip. Defaults to zero. Minimum0.statesarray of string
Task states to match. One or more of New, Queued, Executing, Cancelling, Success, Failed, Canceled, TimedOut.takeinteger
Number of items to take. Defaults to 30. Minimum0.tenantstring
The ID of a tenant, to return only tasks against that tenant. This is an ID such as ‘Tenants-1’, not a tenant name.tenantTagstring
A tenant tag in canonical form, such as ‘Regions/EMEA’, to return only tasks against tenants carrying it.toCompletedDatestring
Formatdate-time.toQueueDatestring
Formatdate-time.toStartDatestring
Formatdate-time.
Response
200 — Holds a TaskResourceCollection generated in response to a ListServerTasksRequest
Idstring
Gets or sets a unique identifier for this resource.ItemTypestringItemsarray of objectArgumentsobject
Gets or sets any arguments to the task.CanRerunboolean
If true, then the task can be used as the basis for a new task with the same effect.Completedstring
Gets or sets a value indicating the completion status of the task. May be “Timed out”, “Queued…”, “Executing…”, or the time at which the task completed for completed tasks.CompletedTimestring
Gets or sets the date/time that the task completed. Will be null if the task has not yet completed. Formatdate-time.Descriptionstring
Gets or sets a short, human-understandable description of this task. An example might be “Manual database backup”. This is the name that will be shown in the task list.Durationstring
Gets or sets a string indicating how long the task took to run.ErrorMessagestring
Gets or sets a short summary of the errors encountered when the task ran (if any).EstimatedRemainingQueueDurationSecondsintegerFinishedSuccessfullyboolean
Gets or sets a value indicating whether the task ran to completion successfully.HasBeenPickedUpByProcessorboolean
Gets or sets a boolean value indicating whether the Octopus Server is processing this task.HasPendingInterruptionsboolean
True if the task has any pending interruptions.HasPendingPreconditionsboolean
True if the task has any pending preconditions.HasWarningsOrErrorsboolean
True if any warnings or non-fatal errors were recorded in the task log during execution.Idstring
Gets or sets a unique identifier for this resource.IsCompletedboolean
Gets or sets a value indicating whether the task has completed (that is, not queued, not running, and not paused; may have finished successfully or failed).LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.LastUpdatedTimestring
Gets or sets the time that the Octopus server last updated the status of this task. For a running task this should happen at least every couple of minutes. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.Namestring
Gets or sets the name of the task to create. This name must be one of the list of possible names documented in the create API operation documentation.PendingInterruptionTypesarray of enum
Contains a list of the types of any pending interruptions.
Allowed values:ManualIntervention,GuidedFailure,PullRequestCompletion,ArgoCDApplicationSync,KubernetesResourceVerification.PendingPreconditionTypesarray of string
Contains a list of the types of any pending preconditions.ProjectIdstring
If the task belongs to a project (e.g. a deployment), the ID of the project it belongs to.QueueTimestring
Gets or sets the time at which the task was queued. Formatdate-time.QueueTimeExpirystring
Gets or sets the time at which the task will timeout if it has not started executing. Formatdate-time.ServerNodestring
Gets the ID of the Octopus server that created and will control this task.SpaceIdstringStartTimestring
Gets or sets the time at which the task started executing. Formatdate-time.Stateenum
Gets or sets the current state of the task.
Allowed values:Queued,Executing,Failed,Canceled,TimedOut,Success,Cancelling.
ItemsPerPageintegerLastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.LastPageNumberintegerLinksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.NumberOfPagesintegerTotalResultsinteger
Example Response
{
"Id": "string",
"ItemType": "string",
"Items": [
{
"Arguments": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"CanRerun": true,
"Completed": "string",
"CompletedTime": "2020-01-01T00:00:00.000Z",
"Description": "string",
"Duration": "string",
"ErrorMessage": "string",
"EstimatedRemainingQueueDurationSeconds": 0,
"FinishedSuccessfully": true,
"HasBeenPickedUpByProcessor": true,
"HasPendingInterruptions": true,
"HasPendingPreconditions": true,
"HasWarningsOrErrors": true,
"Id": "string",
"IsCompleted": true,
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"LastUpdatedTime": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"Name": "string",
"PendingInterruptionTypes": [
"ManualIntervention"
],
"PendingPreconditionTypes": [
"string"
],
"ProjectId": "Projects-1",
"QueueTime": "2020-01-01T00:00:00.000Z",
"QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
"ServerNode": "string",
"SpaceId": "Spaces-1",
"StartTime": "2020-01-01T00:00:00.000Z",
"State": "Queued"
}
],
"ItemsPerPage": 0,
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"LastPageNumber": 0,
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"NumberOfPages": 0,
"TotalResults": 0
}Create a new Task
POST /api
Also reachable at /api, /api.
Path Parameters
spaceIdstring (required)
Request Body
ArgumentsobjectDescriptionstring (required)Namestring (required)
Minimum length 1.QueueTimestring
Formatdate-time.QueueTimeExpirystring
Formatdate-time.SpaceIdstringWeightnumber
Response
201 — Created
Argumentsobject
Gets or sets any arguments to the task.CanRerunboolean
If true, then the task can be used as the basis for a new task with the same effect.Completedstring
Gets or sets a value indicating the completion status of the task. May be “Timed out”, “Queued…”, “Executing…”, or the time at which the task completed for completed tasks.CompletedTimestring
Gets or sets the date/time that the task completed. Will be null if the task has not yet completed. Formatdate-time.Descriptionstring
Gets or sets a short, human-understandable description of this task. An example might be “Manual database backup”. This is the name that will be shown in the task list.Durationstring
Gets or sets a string indicating how long the task took to run.ErrorMessagestring
Gets or sets a short summary of the errors encountered when the task ran (if any).EstimatedRemainingQueueDurationSecondsintegerFinishedSuccessfullyboolean
Gets or sets a value indicating whether the task ran to completion successfully.HasBeenPickedUpByProcessorboolean
Gets or sets a boolean value indicating whether the Octopus Server is processing this task.HasPendingInterruptionsboolean
True if the task has any pending interruptions.HasPendingPreconditionsboolean
True if the task has any pending preconditions.HasWarningsOrErrorsboolean
True if any warnings or non-fatal errors were recorded in the task log during execution.Idstring
Gets or sets a unique identifier for this resource.IsCompletedboolean
Gets or sets a value indicating whether the task has completed (that is, not queued, not running, and not paused; may have finished successfully or failed).LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.LastUpdatedTimestring
Gets or sets the time that the Octopus server last updated the status of this task. For a running task this should happen at least every couple of minutes. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.Namestring
Gets or sets the name of the task to create. This name must be one of the list of possible names documented in the create API operation documentation.PendingInterruptionTypesarray of enum
Contains a list of the types of any pending interruptions.
Allowed values:ManualIntervention,GuidedFailure,PullRequestCompletion,ArgoCDApplicationSync,KubernetesResourceVerification.PendingPreconditionTypesarray of string
Contains a list of the types of any pending preconditions.ProjectIdstring
If the task belongs to a project (e.g. a deployment), the ID of the project it belongs to.QueueTimestring
Gets or sets the time at which the task was queued. Formatdate-time.QueueTimeExpirystring
Gets or sets the time at which the task will timeout if it has not started executing. Formatdate-time.ServerNodestring
Gets the ID of the Octopus server that created and will control this task.SpaceIdstringStartTimestring
Gets or sets the time at which the task started executing. Formatdate-time.Stateenum
Gets or sets the current state of the task.
Allowed values:Queued,Executing,Failed,Canceled,TimedOut,Success,Cancelling.
Example Request
{
"Arguments": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"Description": "string",
"Name": "string",
"QueueTime": "2020-01-01T00:00:00.000Z",
"QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
"SpaceId": "Spaces-1",
"Weight": 0
}Example Response
{
"Arguments": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"CanRerun": true,
"Completed": "string",
"CompletedTime": "2020-01-01T00:00:00.000Z",
"Description": "string",
"Duration": "string",
"ErrorMessage": "string",
"EstimatedRemainingQueueDurationSeconds": 0,
"FinishedSuccessfully": true,
"HasBeenPickedUpByProcessor": true,
"HasPendingInterruptions": true,
"HasPendingPreconditions": true,
"HasWarningsOrErrors": true,
"Id": "string",
"IsCompleted": true,
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"LastUpdatedTime": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"Name": "string",
"PendingInterruptionTypes": [
"ManualIntervention"
],
"PendingPreconditionTypes": [
"string"
],
"ProjectId": "Projects-1",
"QueueTime": "2020-01-01T00:00:00.000Z",
"QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
"ServerNode": "string",
"SpaceId": "Spaces-1",
"StartTime": "2020-01-01T00:00:00.000Z",
"State": "Queued"
}Create a new task and execute it, using a given task as the input. Note that deployment tasks cannot be re-run
POST /api
Also reachable at /api, /api.
Path Parameters
idstring (required)
ID of the Task to re-run.spaceIdstring (required)
The ID of the space containing the resources.
Response
200 — Carries the new task created in response to re-running an existing task via RerunServerTaskCommand.
Argumentsobject
Gets or sets any arguments to the task.CanRerunboolean
If true, then the task can be used as the basis for a new task with the same effect.Completedstring
Gets or sets a value indicating the completion status of the task. May be “Timed out”, “Queued…”, “Executing…”, or the time at which the task completed for completed tasks.CompletedTimestring
Gets or sets the date/time that the task completed. Will be null if the task has not yet completed. Formatdate-time.Descriptionstring
Gets or sets a short, human-understandable description of this task. An example might be “Manual database backup”. This is the name that will be shown in the task list.Durationstring
Gets or sets a string indicating how long the task took to run.ErrorMessagestring
Gets or sets a short summary of the errors encountered when the task ran (if any).EstimatedRemainingQueueDurationSecondsintegerFinishedSuccessfullyboolean
Gets or sets a value indicating whether the task ran to completion successfully.HasBeenPickedUpByProcessorboolean
Gets or sets a boolean value indicating whether the Octopus Server is processing this task.HasPendingInterruptionsboolean
True if the task has any pending interruptions.HasPendingPreconditionsboolean
True if the task has any pending preconditions.HasWarningsOrErrorsboolean
True if any warnings or non-fatal errors were recorded in the task log during execution.Idstring
Gets or sets a unique identifier for this resource.IsCompletedboolean
Gets or sets a value indicating whether the task has completed (that is, not queued, not running, and not paused; may have finished successfully or failed).LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.LastUpdatedTimestring
Gets or sets the time that the Octopus server last updated the status of this task. For a running task this should happen at least every couple of minutes. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.Namestring
Gets or sets the name of the task to create. This name must be one of the list of possible names documented in the create API operation documentation.PendingInterruptionTypesarray of enum
Contains a list of the types of any pending interruptions.
Allowed values:ManualIntervention,GuidedFailure,PullRequestCompletion,ArgoCDApplicationSync,KubernetesResourceVerification.PendingPreconditionTypesarray of string
Contains a list of the types of any pending preconditions.ProjectIdstring
If the task belongs to a project (e.g. a deployment), the ID of the project it belongs to.QueueTimestring
Gets or sets the time at which the task was queued. Formatdate-time.QueueTimeExpirystring
Gets or sets the time at which the task will timeout if it has not started executing. Formatdate-time.ServerNodestring
Gets the ID of the Octopus server that created and will control this task.SpaceIdstringStartTimestring
Gets or sets the time at which the task started executing. Formatdate-time.Stateenum
Gets or sets the current state of the task.
Allowed values:Queued,Executing,Failed,Canceled,TimedOut,Success,Cancelling.
Example Response
{
"Arguments": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"CanRerun": true,
"Completed": "string",
"CompletedTime": "2020-01-01T00:00:00.000Z",
"Description": "string",
"Duration": "string",
"ErrorMessage": "string",
"EstimatedRemainingQueueDurationSeconds": 0,
"FinishedSuccessfully": true,
"HasBeenPickedUpByProcessor": true,
"HasPendingInterruptions": true,
"HasPendingPreconditions": true,
"HasWarningsOrErrors": true,
"Id": "string",
"IsCompleted": true,
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"LastUpdatedTime": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"Name": "string",
"PendingInterruptionTypes": [
"ManualIntervention"
],
"PendingPreconditionTypes": [
"string"
],
"ProjectId": "Projects-1",
"QueueTime": "2020-01-01T00:00:00.000Z",
"QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
"ServerNode": "string",
"SpaceId": "Spaces-1",
"StartTime": "2020-01-01T00:00:00.000Z",
"State": "Queued"
}List supported task types
GET /api
Also reachable at /api, /api.
Path Parameters
spaceIdstring (required)
Response
200 — Holds a list of supported task types, generated in response to a ListServerTaskTypesRequest
IdstringLinksobjectNamestring
Example Response
[
{
"Id": "string",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"Name": "string"
}
]Get a single Task by ID
GET /api
Also reachable at /api, /api.
Path Parameters
idstring (required)
ID of the Task to load.spaceIdstring (required)
The ID of the space containing the resources.
Response
200 — Holds a task, returned in response to GetServerTaskByIdRequest
Argumentsobject
Gets or sets any arguments to the task.CanRerunboolean
If true, then the task can be used as the basis for a new task with the same effect.Completedstring
Gets or sets a value indicating the completion status of the task. May be “Timed out”, “Queued…”, “Executing…”, or the time at which the task completed for completed tasks.CompletedTimestring
Gets or sets the date/time that the task completed. Will be null if the task has not yet completed. Formatdate-time.Descriptionstring
Gets or sets a short, human-understandable description of this task. An example might be “Manual database backup”. This is the name that will be shown in the task list.Durationstring
Gets or sets a string indicating how long the task took to run.ErrorMessagestring
Gets or sets a short summary of the errors encountered when the task ran (if any).EstimatedRemainingQueueDurationSecondsintegerFinishedSuccessfullyboolean
Gets or sets a value indicating whether the task ran to completion successfully.HasBeenPickedUpByProcessorboolean
Gets or sets a boolean value indicating whether the Octopus Server is processing this task.HasPendingInterruptionsboolean
True if the task has any pending interruptions.HasPendingPreconditionsboolean
True if the task has any pending preconditions.HasWarningsOrErrorsboolean
True if any warnings or non-fatal errors were recorded in the task log during execution.Idstring
Gets or sets a unique identifier for this resource.IsCompletedboolean
Gets or sets a value indicating whether the task has completed (that is, not queued, not running, and not paused; may have finished successfully or failed).LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.LastUpdatedTimestring
Gets or sets the time that the Octopus server last updated the status of this task. For a running task this should happen at least every couple of minutes. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.Namestring
Gets or sets the name of the task to create. This name must be one of the list of possible names documented in the create API operation documentation.PendingInterruptionTypesarray of enum
Contains a list of the types of any pending interruptions.
Allowed values:ManualIntervention,GuidedFailure,PullRequestCompletion,ArgoCDApplicationSync,KubernetesResourceVerification.PendingPreconditionTypesarray of string
Contains a list of the types of any pending preconditions.ProjectIdstring
If the task belongs to a project (e.g. a deployment), the ID of the project it belongs to.QueueTimestring
Gets or sets the time at which the task was queued. Formatdate-time.QueueTimeExpirystring
Gets or sets the time at which the task will timeout if it has not started executing. Formatdate-time.ServerNodestring
Gets the ID of the Octopus server that created and will control this task.SpaceIdstringStartTimestring
Gets or sets the time at which the task started executing. Formatdate-time.Stateenum
Gets or sets the current state of the task.
Allowed values:Queued,Executing,Failed,Canceled,TimedOut,Success,Cancelling.
Example Response
{
"Arguments": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"CanRerun": true,
"Completed": "string",
"CompletedTime": "2020-01-01T00:00:00.000Z",
"Description": "string",
"Duration": "string",
"ErrorMessage": "string",
"EstimatedRemainingQueueDurationSeconds": 0,
"FinishedSuccessfully": true,
"HasBeenPickedUpByProcessor": true,
"HasPendingInterruptions": true,
"HasPendingPreconditions": true,
"HasWarningsOrErrors": true,
"Id": "string",
"IsCompleted": true,
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"LastUpdatedTime": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"Name": "string",
"PendingInterruptionTypes": [
"ManualIntervention"
],
"PendingPreconditionTypes": [
"string"
],
"ProjectId": "Projects-1",
"QueueTime": "2020-01-01T00:00:00.000Z",
"QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
"ServerNode": "string",
"SpaceId": "Spaces-1",
"StartTime": "2020-01-01T00:00:00.000Z",
"State": "Queued"
}Mark the given task as canceled
POST /api
Also reachable at /api, /api.
Path Parameters
idstring (required)
ID of the Task to cancel.spaceIdstring (required)
The ID of the space containing the resources.
Response
200 — Returned in response to CancelServerTaskRequest. If the ServerTask cancellation failed, clients should receive an error instead.
Argumentsobject
Gets or sets any arguments to the task.CanRerunboolean
If true, then the task can be used as the basis for a new task with the same effect.Completedstring
Gets or sets a value indicating the completion status of the task. May be “Timed out”, “Queued…”, “Executing…”, or the time at which the task completed for completed tasks.CompletedTimestring
Gets or sets the date/time that the task completed. Will be null if the task has not yet completed. Formatdate-time.Descriptionstring
Gets or sets a short, human-understandable description of this task. An example might be “Manual database backup”. This is the name that will be shown in the task list.Durationstring
Gets or sets a string indicating how long the task took to run.ErrorMessagestring
Gets or sets a short summary of the errors encountered when the task ran (if any).EstimatedRemainingQueueDurationSecondsintegerFinishedSuccessfullyboolean
Gets or sets a value indicating whether the task ran to completion successfully.HasBeenPickedUpByProcessorboolean
Gets or sets a boolean value indicating whether the Octopus Server is processing this task.HasPendingInterruptionsboolean
True if the task has any pending interruptions.HasPendingPreconditionsboolean
True if the task has any pending preconditions.HasWarningsOrErrorsboolean
True if any warnings or non-fatal errors were recorded in the task log during execution.Idstring
Gets or sets a unique identifier for this resource.IsCompletedboolean
Gets or sets a value indicating whether the task has completed (that is, not queued, not running, and not paused; may have finished successfully or failed).LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.LastUpdatedTimestring
Gets or sets the time that the Octopus server last updated the status of this task. For a running task this should happen at least every couple of minutes. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.Namestring
Gets or sets the name of the task to create. This name must be one of the list of possible names documented in the create API operation documentation.PendingInterruptionTypesarray of enum
Contains a list of the types of any pending interruptions.
Allowed values:ManualIntervention,GuidedFailure,PullRequestCompletion,ArgoCDApplicationSync,KubernetesResourceVerification.PendingPreconditionTypesarray of string
Contains a list of the types of any pending preconditions.ProjectIdstring
If the task belongs to a project (e.g. a deployment), the ID of the project it belongs to.QueueTimestring
Gets or sets the time at which the task was queued. Formatdate-time.QueueTimeExpirystring
Gets or sets the time at which the task will timeout if it has not started executing. Formatdate-time.ServerNodestring
Gets the ID of the Octopus server that created and will control this task.SpaceIdstringStartTimestring
Gets or sets the time at which the task started executing. Formatdate-time.Stateenum
Gets or sets the current state of the task.
Allowed values:Queued,Executing,Failed,Canceled,TimedOut,Success,Cancelling.
Example Response
{
"Arguments": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"CanRerun": true,
"Completed": "string",
"CompletedTime": "2020-01-01T00:00:00.000Z",
"Description": "string",
"Duration": "string",
"ErrorMessage": "string",
"EstimatedRemainingQueueDurationSeconds": 0,
"FinishedSuccessfully": true,
"HasBeenPickedUpByProcessor": true,
"HasPendingInterruptions": true,
"HasPendingPreconditions": true,
"HasWarningsOrErrors": true,
"Id": "string",
"IsCompleted": true,
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"LastUpdatedTime": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"Name": "string",
"PendingInterruptionTypes": [
"ManualIntervention"
],
"PendingPreconditionTypes": [
"string"
],
"ProjectId": "Projects-1",
"QueueTime": "2020-01-01T00:00:00.000Z",
"QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
"ServerNode": "string",
"SpaceId": "Spaces-1",
"StartTime": "2020-01-01T00:00:00.000Z",
"State": "Queued"
}Get a single task by ID, including the full task log as a tree of activity elements
GET /api
Also reachable at /api, /api.
Path Parameters
idstring (required)
The ID of the task to load details for.spaceIdstring (required)
The ID of the space containing the resource(s).
Query Parameters
rangesstringtailinteger
If set, determines how many log entries will be returned.verboseboolean
If true, includes verbose output.
Response
200 — Returns details about a specific server task
ActivityLogsarray of objectChildrenarray of objectEndedstring
Formatdate-time.IdstringLogElementsarray of objectNamestringProgressMessagestringProgressPercentageintegerShowAtSummaryLevelbooleanStartedstring
Formatdate-time.Statusenum
Allowed values:Pending,Running,Success,Failed,Skipped,SuccessWithWarning,Canceled.
Idstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.PhysicalLogSizeintegerProgressobjectEstimatedTimeRemainingstringProgressPercentageinteger
TaskobjectArgumentsobject
Gets or sets any arguments to the task.CanRerunboolean
If true, then the task can be used as the basis for a new task with the same effect.Completedstring
Gets or sets a value indicating the completion status of the task. May be “Timed out”, “Queued…”, “Executing…”, or the time at which the task completed for completed tasks.CompletedTimestring
Gets or sets the date/time that the task completed. Will be null if the task has not yet completed. Formatdate-time.Descriptionstring
Gets or sets a short, human-understandable description of this task. An example might be “Manual database backup”. This is the name that will be shown in the task list.Durationstring
Gets or sets a string indicating how long the task took to run.ErrorMessagestring
Gets or sets a short summary of the errors encountered when the task ran (if any).EstimatedRemainingQueueDurationSecondsintegerFinishedSuccessfullyboolean
Gets or sets a value indicating whether the task ran to completion successfully.HasBeenPickedUpByProcessorboolean
Gets or sets a boolean value indicating whether the Octopus Server is processing this task.HasPendingInterruptionsboolean
True if the task has any pending interruptions.HasPendingPreconditionsboolean
True if the task has any pending preconditions.HasWarningsOrErrorsboolean
True if any warnings or non-fatal errors were recorded in the task log during execution.Idstring
Gets or sets a unique identifier for this resource.IsCompletedboolean
Gets or sets a value indicating whether the task has completed (that is, not queued, not running, and not paused; may have finished successfully or failed).LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.LastUpdatedTimestring
Gets or sets the time that the Octopus server last updated the status of this task. For a running task this should happen at least every couple of minutes. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.Namestring
Gets or sets the name of the task to create. This name must be one of the list of possible names documented in the create API operation documentation.PendingInterruptionTypesarray of enum
Contains a list of the types of any pending interruptions.
Allowed values:ManualIntervention,GuidedFailure,PullRequestCompletion,ArgoCDApplicationSync,KubernetesResourceVerification.PendingPreconditionTypesarray of string
Contains a list of the types of any pending preconditions.ProjectIdstring
If the task belongs to a project (e.g. a deployment), the ID of the project it belongs to.QueueTimestring
Gets or sets the time at which the task was queued. Formatdate-time.QueueTimeExpirystring
Gets or sets the time at which the task will timeout if it has not started executing. Formatdate-time.ServerNodestring
Gets the ID of the Octopus server that created and will control this task.SpaceIdstringStartTimestring
Gets or sets the time at which the task started executing. Formatdate-time.Stateenum
Gets or sets the current state of the task.
Allowed values:Queued,Executing,Failed,Canceled,TimedOut,Success,Cancelling.
Example Response
{
"ActivityLogs": [
{
"Children": [],
"Ended": "2020-01-01T00:00:00.000Z",
"Id": "0c5a872485ac4b10857939a92d082e67",
"LogElements": [
{}
],
"Name": "string",
"ProgressMessage": "string",
"ProgressPercentage": 0,
"ShowAtSummaryLevel": true,
"Started": "2020-01-01T00:00:00.000Z",
"Status": "Pending"
}
],
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"PhysicalLogSize": 0,
"Progress": {
"EstimatedTimeRemaining": "string",
"ProgressPercentage": 0
},
"Task": {
"Arguments": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"CanRerun": true,
"Completed": "string",
"CompletedTime": "2020-01-01T00:00:00.000Z",
"Description": "string",
"Duration": "string",
"ErrorMessage": "string",
"EstimatedRemainingQueueDurationSeconds": 0,
"FinishedSuccessfully": true,
"HasBeenPickedUpByProcessor": true,
"HasPendingInterruptions": true,
"HasPendingPreconditions": true,
"HasWarningsOrErrors": true,
"Id": "string",
"IsCompleted": true,
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"LastUpdatedTime": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"Name": "string",
"PendingInterruptionTypes": [
"ManualIntervention"
],
"PendingPreconditionTypes": [
"string"
],
"ProjectId": "Projects-1",
"QueueTime": "2020-01-01T00:00:00.000Z",
"QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
"ServerNode": "string",
"SpaceId": "Spaces-1",
"StartTime": "2020-01-01T00:00:00.000Z",
"State": "Queued"
}
}Prioritize given task to the top of the Task Queue
POST /api
Also reachable at /api, /api.
Path Parameters
idstring (required)spaceIdstring (required)
Response
200 — Success
Get a list of tasks that this task is currently queued behind
GET /api
Also reachable at /api, /api.
Path Parameters
idstring (required)
ID of the Task.spaceIdstring (required)
Query Parameters
skipinteger
Number of items to skip. Defaults to zero. Minimum0.takeinteger
Number of items to take. Defaults to 30. Minimum0.
Response
200 — Holds the list of tasks that a task is currently queued behind. Response to GetServerTaskQueuedBehindRequest.
Idstring
Gets or sets a unique identifier for this resource.ItemTypestringItemsarray of objectArgumentsobject
Gets or sets any arguments to the task.CanRerunboolean
If true, then the task can be used as the basis for a new task with the same effect.Completedstring
Gets or sets a value indicating the completion status of the task. May be “Timed out”, “Queued…”, “Executing…”, or the time at which the task completed for completed tasks.CompletedTimestring
Gets or sets the date/time that the task completed. Will be null if the task has not yet completed. Formatdate-time.Descriptionstring
Gets or sets a short, human-understandable description of this task. An example might be “Manual database backup”. This is the name that will be shown in the task list.Durationstring
Gets or sets a string indicating how long the task took to run.ErrorMessagestring
Gets or sets a short summary of the errors encountered when the task ran (if any).EstimatedRemainingQueueDurationSecondsintegerFinishedSuccessfullyboolean
Gets or sets a value indicating whether the task ran to completion successfully.HasBeenPickedUpByProcessorboolean
Gets or sets a boolean value indicating whether the Octopus Server is processing this task.HasPendingInterruptionsboolean
True if the task has any pending interruptions.HasPendingPreconditionsboolean
True if the task has any pending preconditions.HasWarningsOrErrorsboolean
True if any warnings or non-fatal errors were recorded in the task log during execution.Idstring
Gets or sets a unique identifier for this resource.IsCompletedboolean
Gets or sets a value indicating whether the task has completed (that is, not queued, not running, and not paused; may have finished successfully or failed).LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.LastUpdatedTimestring
Gets or sets the time that the Octopus server last updated the status of this task. For a running task this should happen at least every couple of minutes. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.Namestring
Gets or sets the name of the task to create. This name must be one of the list of possible names documented in the create API operation documentation.PendingInterruptionTypesarray of enum
Contains a list of the types of any pending interruptions.
Allowed values:ManualIntervention,GuidedFailure,PullRequestCompletion,ArgoCDApplicationSync,KubernetesResourceVerification.PendingPreconditionTypesarray of string
Contains a list of the types of any pending preconditions.ProjectIdstring
If the task belongs to a project (e.g. a deployment), the ID of the project it belongs to.QueueTimestring
Gets or sets the time at which the task was queued. Formatdate-time.QueueTimeExpirystring
Gets or sets the time at which the task will timeout if it has not started executing. Formatdate-time.ServerNodestring
Gets the ID of the Octopus server that created and will control this task.SpaceIdstringStartTimestring
Gets or sets the time at which the task started executing. Formatdate-time.Stateenum
Gets or sets the current state of the task.
Allowed values:Queued,Executing,Failed,Canceled,TimedOut,Success,Cancelling.
ItemsPerPageintegerLastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.LastPageNumberintegerLinksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.NumberOfPagesintegerTotalResultsinteger
Example Response
{
"Id": "string",
"ItemType": "string",
"Items": [
{
"Arguments": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"CanRerun": true,
"Completed": "string",
"CompletedTime": "2020-01-01T00:00:00.000Z",
"Description": "string",
"Duration": "string",
"ErrorMessage": "string",
"EstimatedRemainingQueueDurationSeconds": 0,
"FinishedSuccessfully": true,
"HasBeenPickedUpByProcessor": true,
"HasPendingInterruptions": true,
"HasPendingPreconditions": true,
"HasWarningsOrErrors": true,
"Id": "string",
"IsCompleted": true,
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"LastUpdatedTime": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"Name": "string",
"PendingInterruptionTypes": [
"ManualIntervention"
],
"PendingPreconditionTypes": [
"string"
],
"ProjectId": "Projects-1",
"QueueTime": "2020-01-01T00:00:00.000Z",
"QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
"ServerNode": "string",
"SpaceId": "Spaces-1",
"StartTime": "2020-01-01T00:00:00.000Z",
"State": "Queued"
}
],
"ItemsPerPage": 0,
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"LastPageNumber": 0,
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"NumberOfPages": 0,
"TotalResults": 0
}Get the full task log of a given resource as plain text. Useful when the log needs to be rendered to a console or sent as an email attachment
GET /api
Also reachable at /api, /api.
Path Parameters
idstring (required)
The ID of the task.spaceIdstring (required)
The ID of the space containing the resource(s).
Response
200 — Success
Example Response
"string"Change the state of a task
POST /api
Also reachable at /api, /api.
Path Parameters
idstring (required)
The ID of the task.spaceIdstring (required)
The ID of the space containing the resource(s).
Request Body
Idstring (required)
The ID of the task.Reasonstring (required)
The reason for the state change. Minimum length 1.SpaceIdstring
The ID of the space containing the resource(s).Stateenum (required)
The state to set the task to.
Allowed values:Queued,Executing,Failed,Canceled,TimedOut,Success,Cancelling.
Response
200 — Returns the Task resource after the state has been changed in response to a ModifyServerTaskStateCommand
Argumentsobject
Gets or sets any arguments to the task.CanRerunboolean
If true, then the task can be used as the basis for a new task with the same effect.Completedstring
Gets or sets a value indicating the completion status of the task. May be “Timed out”, “Queued…”, “Executing…”, or the time at which the task completed for completed tasks.CompletedTimestring
Gets or sets the date/time that the task completed. Will be null if the task has not yet completed. Formatdate-time.Descriptionstring
Gets or sets a short, human-understandable description of this task. An example might be “Manual database backup”. This is the name that will be shown in the task list.Durationstring
Gets or sets a string indicating how long the task took to run.ErrorMessagestring
Gets or sets a short summary of the errors encountered when the task ran (if any).EstimatedRemainingQueueDurationSecondsintegerFinishedSuccessfullyboolean
Gets or sets a value indicating whether the task ran to completion successfully.HasBeenPickedUpByProcessorboolean
Gets or sets a boolean value indicating whether the Octopus Server is processing this task.HasPendingInterruptionsboolean
True if the task has any pending interruptions.HasPendingPreconditionsboolean
True if the task has any pending preconditions.HasWarningsOrErrorsboolean
True if any warnings or non-fatal errors were recorded in the task log during execution.Idstring
Gets or sets a unique identifier for this resource.IsCompletedboolean
Gets or sets a value indicating whether the task has completed (that is, not queued, not running, and not paused; may have finished successfully or failed).LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.LastUpdatedTimestring
Gets or sets the time that the Octopus server last updated the status of this task. For a running task this should happen at least every couple of minutes. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.Namestring
Gets or sets the name of the task to create. This name must be one of the list of possible names documented in the create API operation documentation.PendingInterruptionTypesarray of enum
Contains a list of the types of any pending interruptions.
Allowed values:ManualIntervention,GuidedFailure,PullRequestCompletion,ArgoCDApplicationSync,KubernetesResourceVerification.PendingPreconditionTypesarray of string
Contains a list of the types of any pending preconditions.ProjectIdstring
If the task belongs to a project (e.g. a deployment), the ID of the project it belongs to.QueueTimestring
Gets or sets the time at which the task was queued. Formatdate-time.QueueTimeExpirystring
Gets or sets the time at which the task will timeout if it has not started executing. Formatdate-time.ServerNodestring
Gets the ID of the Octopus server that created and will control this task.SpaceIdstringStartTimestring
Gets or sets the time at which the task started executing. Formatdate-time.Stateenum
Gets or sets the current state of the task.
Allowed values:Queued,Executing,Failed,Canceled,TimedOut,Success,Cancelling.
Example Request
{
"Id": "ServerTasks-1",
"Reason": "string",
"SpaceId": "Spaces-1",
"State": "Queued"
}Example Response
{
"Arguments": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"CanRerun": true,
"Completed": "string",
"CompletedTime": "2020-01-01T00:00:00.000Z",
"Description": "string",
"Duration": "string",
"ErrorMessage": "string",
"EstimatedRemainingQueueDurationSeconds": 0,
"FinishedSuccessfully": true,
"HasBeenPickedUpByProcessor": true,
"HasPendingInterruptions": true,
"HasPendingPreconditions": true,
"HasWarningsOrErrors": true,
"Id": "string",
"IsCompleted": true,
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"LastUpdatedTime": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"Name": "string",
"PendingInterruptionTypes": [
"ManualIntervention"
],
"PendingPreconditionTypes": [
"string"
],
"ProjectId": "Projects-1",
"QueueTime": "2020-01-01T00:00:00.000Z",
"QueueTimeExpiry": "2020-01-01T00:00:00.000Z",
"ServerNode": "string",
"SpaceId": "Spaces-1",
"StartTime": "2020-01-01T00:00:00.000Z",
"State": "Queued"
}Get messages for a single Task by Id
GET /api
Also reachable at /api, /api.
Path Parameters
idstring (required)
ID of the Task to load status messages for.spaceIdstring (required)
The ID of the space containing the resources.
Response
200 — The requested Task Status Messages
Messagesarray of objectCategorystringIdstring
Gets or sets a unique identifier for this resource.LastModifiedBystring
Gets or sets the username of the user who last modified this resource.LastModifiedOnstring
Gets or sets the date/time that this resource was last modified. Formatdate-time.Linksobject
Gets or sets a dictionary of links to other related resources. These links can be used to navigate the resources on the server.MessagestringTitlestring
Example Response
{
"Messages": [
{
"Category": "string",
"Id": "string",
"LastModifiedBy": "string",
"LastModifiedOn": "2020-01-01T00:00:00.000Z",
"Links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"Message": "string",
"Title": "string"
}
]
}