This resource represents a long-running asynchronous tasks. Use it to obtain details about the progress of a long-running task or cancel a long-running task.

Hierarchy

  • CommonHttpService
    • TasksService

Constructors

  • Internal

    Create a new instance of the service.

    Parameters

    • getClientInstance: (() => CommonHttpClient)
        • (): CommonHttpClient
        • Returns CommonHttpClient

    Returns TasksService

Methods

  • Returns the status of a long-running asynchronous task.

    When a task has finished, this operation returns the JSON blob applicable to the task. See the documentation of the operation that created the task for details. Task details are not permanently retained. As of September 2019, details are retained for 14 days although this period may change without notice.

    Deprecation notice: The required OAuth 2.0 scopes will be updated on June 15, 2024.

    • read:jira-work

    Permissions required: either of:

    Parameters

    • params: {
          taskId: string;
      }
      • taskId: string

        The ID of the task.

    Returns Promise<TaskProgressBeanObject>

    Returned if the request is successful.

    example:

    {
    "self": "https://your-domain.atlassian.net/rest/api/3/task/1",
    "id": "1",
    "description": "Task description",
    "status": "COMPLETE",
    "result": "the task result, this may be any JSON",
    "submittedBy": 10000,
    "progress": 100,
    "elapsedRuntime": 156,
    "submitted": 1501708132800,
    "started": 1501708132900,
    "finished": 1501708133000,
    "lastUpdate": 1501708133000
    }

    GET /rest/api/3/task/{taskId} @scopes-current read:jira-work @scopes-beta

  • Method to initialize the class. Normally used to set up validation rules.

    Returns void