Hierarchy

  • CommonHttpService
    • TaskService

Constructors

  • Internal

    Create a new instance of the service.

    Parameters

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

    Returns TaskService

Methods

  • Returns a specific task.

    Permissions required: Permission to view the containing page or blog post and its corresponding space.

    Parameters

    • params: {
          bodyFormat?: PrimaryBodyRepresentation;
          id: number;
      }
      • OptionalbodyFormat?: PrimaryBodyRepresentation

        The content format types to be returned in the body field of the response. If available, the representation will be available under a response field of the same name under the body field.

      • id: number

        The ID of the task to be returned. If you don't know the task ID, use Get tasks and filter the results.

    Returns Promise<Task>

    Returned if the requested task is returned.

    GET /tasks/{id} @scopes-current read:task:confluence

  • Returns all tasks. The number of results is limited by the limit parameter and additional results (if available) will be available through the next URL present in the Link response header.

    Permissions required: Permission to access the Confluence site ('Can use' global permission). Only tasks that the user has permission to view will be returned.

    Parameters

    • params: {
          assignedTo?: string[];
          blogpostId?: number[];
          bodyFormat?: PrimaryBodyRepresentation;
          completedAtFrom?: number;
          completedAtTo?: number;
          completedBy?: string[];
          createdAtFrom?: number;
          createdAtTo?: number;
          createdBy?: string[];
          cursor?: string;
          dueAtFrom?: number;
          dueAtTo?: number;
          includeBlankTasks?: boolean;
          limit?: number;
          pageId?: number[];
          spaceId?: number[];
          status?: "complete" | "incomplete";
          taskId?: number[];
      } = {}
      • OptionalassignedTo?: string[]

        Filters on the Account ID of the user to whom this task is assigned. Multiple IDs can be specified.

      • OptionalblogpostId?: number[]

        Filters on the blog post ID of the task. Multiple IDs can be specified. Note - page and blog post filters can be used in conjunction.

      • OptionalbodyFormat?: PrimaryBodyRepresentation

        The content format types to be returned in the body field of the response. If available, the representation will be available under a response field of the same name under the body field.

      • OptionalcompletedAtFrom?: number

        Filters on start of date-time range of task based on completion date (inclusive). Input is epoch time in milliseconds.

      • OptionalcompletedAtTo?: number

        Filters on end of date-time range of task based on completion date (inclusive). Input is epoch time in milliseconds.

      • OptionalcompletedBy?: string[]

        Filters on the Account ID of the user who completed this task. Multiple IDs can be specified.

      • OptionalcreatedAtFrom?: number

        Filters on start of date-time range of task based on creation date (inclusive). Input is epoch time in milliseconds.

      • OptionalcreatedAtTo?: number

        Filters on end of date-time range of task based on creation date (inclusive). Input is epoch time in milliseconds.

      • OptionalcreatedBy?: string[]

        Filters on the Account ID of the user who created this task. Multiple IDs can be specified.

      • Optionalcursor?: string

        Used for pagination, this opaque cursor will be returned in the next URL in the Link response header. Use the relative URL in the Link header to retrieve the next set of results.

      • OptionaldueAtFrom?: number

        Filters on start of date-time range of task based on due date (inclusive). Input is epoch time in milliseconds.

      • OptionaldueAtTo?: number

        Filters on end of date-time range of task based on due date (inclusive). Input is epoch time in milliseconds.

      • OptionalincludeBlankTasks?: boolean

        Specifies whether to include blank tasks in the response. Defaults to true.

      • Optionallimit?: number

        Maximum number of tasks per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.

      • OptionalpageId?: number[]

        Filters on the page ID of the task. Multiple IDs can be specified. Note - page and blog post filters can be used in conjunction.

      • OptionalspaceId?: number[]

        Filters on the space ID of the task. Multiple IDs can be specified.

      • Optionalstatus?: "complete" | "incomplete"

        Filters on the status of the task.

      • OptionaltaskId?: number[]

        Filters on task ID. Multiple IDs can be specified.

    Returns Promise<{
        _links?: MultiEntityLinks;
        results?: Task[];
    } & {
        [key: string]: unknown;
    }>

    Returned if the requested tasks are returned.

  • Update a task by id. This endpoint currently only supports updating task status.

    Permissions required: Permission to edit the containing page or blog post and view its corresponding space.

    Parameters

    • params: {
          bodyFormat?: PrimaryBodyRepresentation;
          id: number;
          requestBody: {
              assignedTo?: string;
              blogPostId?: string;
              completedAt?: string;
              completedBy?: string;
              createdAt?: string;
              createdBy?: string;
              dueAt?: string;
              id?: string;
              localId?: string;
              pageId?: string;
              spaceId?: string;
              status: "complete" | "incomplete";
              updatedAt?: string;
          } & {
              [key: string]: unknown;
          };
      }
      • OptionalbodyFormat?: PrimaryBodyRepresentation

        The content format types to be returned in the body field of the response. If available, the representation will be available under a response field of the same name under the body field.

      • id: number

        The ID of the task to be updated. If you don't know the task ID, use Get tasks and filter the results.

      • requestBody: {
            assignedTo?: string;
            blogPostId?: string;
            completedAt?: string;
            completedBy?: string;
            createdAt?: string;
            createdBy?: string;
            dueAt?: string;
            id?: string;
            localId?: string;
            pageId?: string;
            spaceId?: string;
            status: "complete" | "incomplete";
            updatedAt?: string;
        } & {
            [key: string]: unknown;
        }

    Returns Promise<Task>

    Returned if the requested task is updated.

    PUT /tasks/{id} @scopes-current write:task:confluence

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

    Returns void