jira.js
    Preparing search index...

    Function searchProjects

    • Returns a paginated list of projects visible to the user.

      This operation can be accessed anonymously.

      Permissions required: Projects are returned only where the user has one of:

      Parameters

      • client: Client
      • Optionalparameters: {
            action?: "view" | string & {} | "edit" | "create" | "browse";
            categoryId?: number;
            expand?:
                | string
                | string[]
                | string & {}
                | (
                    | "url"
                    | "description"
                    | string & {}
                    | "issueTypes"
                    | "lead"
                    | "insight"
                    | "projectKeys"
                )[];
            id?: number[];
            keys?: string[];
            maxResults?: number;
            orderBy?: | "name"
            | "key"
            | string & {}
            | "category"
            | "owner"
            | "archivedDate"
            | "deletedDate"
            | "issueCount"
            | "-name"
            | "+name"
            | "-issueCount"
            | "+issueCount"
            | "-owner"
            | "+owner"
            | "-category"
            | "+category"
            | "-key"
            | "+key"
            | "lastIssueUpdatedDate"
            | "-lastIssueUpdatedDate"
            | "+lastIssueUpdatedDate"
            | "+archivedDate"
            | "-archivedDate"
            | "+deletedDate"
            | "-deletedDate";
            properties?: { [key: string]: unknown }[];
            propertyQuery?: string;
            query?: string;
            startAt?: number;
            status?: ("deleted" | "live" | string & {} | "archived")[];
            typeKey?: string | string[];
        }
        • Optionalaction?: "view" | string & {} | "edit" | "create" | "browse"

          Filter results by projects for which the user can:

        • OptionalcategoryId?: number

          The ID of the project's category. A complete list of category IDs is found using the Get all project categories operation.

        • Optionalexpand?:
              | string
              | string[]
              | string & {}
              | (
                  | "url"
                  | "description"
                  | string & {}
                  | "issueTypes"
                  | "lead"
                  | "insight"
                  | "projectKeys"
              )[]

          Use expand to include additional information in the response. This parameter accepts a comma-separated list. Expanded options include:

          • description Returns the project description.
          • projectKeys Returns all project keys associated with a project.
          • lead Returns information about the project lead.
          • issueTypes Returns all issue types associated with the project.
          • url Returns the URL associated with the project.
          • insight EXPERIMENTAL. Returns the insight details of total issue count and last issue update time for the project.
        • Optionalid?: number[]

          The project IDs to filter the results by. To include multiple IDs, provide an ampersand-separated list. For example, id=10000&id=10001. Up to 50 project IDs can be provided.

        • Optionalkeys?: string[]

          The project keys to filter the results by. To include multiple keys, provide an ampersand-separated list. For example, keys=PA&keys=PB. Up to 50 project keys can be provided.

        • OptionalmaxResults?: number

          The maximum number of items to return per page. Must be less than or equal to 100. If a value greater than 100 is provided, the maxResults parameter will default to 100.

        • OptionalorderBy?:
              | "name"
              | "key"
              | string & {}
              | "category"
              | "owner"
              | "archivedDate"
              | "deletedDate"
              | "issueCount"
              | "-name"
              | "+name"
              | "-issueCount"
              | "+issueCount"
              | "-owner"
              | "+owner"
              | "-category"
              | "+category"
              | "-key"
              | "+key"
              | "lastIssueUpdatedDate"
              | "-lastIssueUpdatedDate"
              | "+lastIssueUpdatedDate"
              | "+archivedDate"
              | "-archivedDate"
              | "+deletedDate"
              | "-deletedDate"

          Order the results by a field.

          • category Sorts by project category. A complete list of category IDs is found using Get all project categories.
          • issueCount Sorts by the total number of issues in each project.
          • key Sorts by project key.
          • lastIssueUpdatedTime Sorts by the last issue update time.
          • name Sorts by project name.
          • owner Sorts by project lead.
          • archivedDate EXPERIMENTAL. Sorts by project archived date.
          • deletedDate EXPERIMENTAL. Sorts by project deleted date.
        • Optionalproperties?: { [key: string]: unknown }[]

          EXPERIMENTAL. A list of project properties to return for the project. This parameter accepts a comma-separated list.

        • OptionalpropertyQuery?: string

          EXPERIMENTAL. A query string used to search properties. The query string cannot be specified using a JSON object. For example, to search for the value of nested from {"something":{"nested":1,"other":2}} use [thepropertykey].something.nested=1. Note that the propertyQuery key is enclosed in square brackets to enable searching where the propertyQuery key includes dot (.) or equals (=) characters. Note that thepropertykey is only returned when included in properties.

        • Optionalquery?: string

          Filter the results using a literal string. Projects with a matching key or name are returned (case insensitive).

        • OptionalstartAt?: number

          The index of the first item to return in a page of results (page offset).

        • Optionalstatus?: ("deleted" | "live" | string & {} | "archived")[]

          EXPERIMENTAL. Filter results by project status:

          • live Search live projects.
          • archived Search archived projects.
          • deleted Search deleted projects, those in the recycle bin.
        • OptionaltypeKey?: string | string[]

          Orders results by the project type. This parameter accepts a comma-separated list. Valid values are business, service_desk, and software.

      • Optionaloptions: RequestOptions

      Returns Promise<
          {
              isLast: boolean;
              maxResults: number;
              nextPage?: string;
              self?: string;
              startAt: number;
              total: number;
              values: {
                  archived?: boolean;
                  archivedBy?: {
                      accountId?: string;
                      accountType?: "unknown"
                      | string & {}
                      | "atlassian"
                      | "app"
                      | "customer";
                      active?: boolean;
                      applicationRoles?: {
                          callback?: { [key: string]: unknown };
                          items?: {
                              defaultGroups?: ...;
                              defaultGroupsDetails?: ...;
                              defined?: ...;
                              groupDetails?: ...;
                              groups?: ...;
                              hasUnlimitedSeats?: ...;
                              key?: ...;
                              name?: ...;
                              numberOfSeats?: ...;
                              platform?: ...;
                              remainingSeats?: ...;
                              selectedByDefault?: ...;
                              userCount?: ...;
                              userCountDescription?: ...;
                              [key: ...]: ...;
                          }[];
                          "max-results"?: number;
                          pagingCallback?: { [key: string]: unknown };
                          size?: number;
                          [key: string]: unknown;
                      };
                      appType?: string;
                      avatarUrls?: {
                          "16x16"?: string;
                          "24x24"?: string;
                          "32x32"?: string;
                          "48x48"?: string;
                          [key: string]: unknown;
                      };
                      displayName?: string;
                      emailAddress?: string;
                      expand?: string;
                      groups?: {
                          callback?: { [key: string]: unknown };
                          items?: { groupId?: ...; name?: ...; self?: ...; [key: ...]: ... }[];
                          "max-results"?: number;
                          pagingCallback?: { [key: string]: unknown };
                          size?: number;
                          [key: string]: unknown;
                      };
                      guest?: boolean;
                      locale?: string;
                      self?: string;
                      timeZone?: string;
                      [key: string]: unknown;
                  };
                  archivedDate?: Date;
                  assigneeType?: string & {}
                  | "PROJECT_LEAD"
                  | "UNASSIGNED";
                  avatarUrls?: {
                      "16x16"?: string;
                      "24x24"?: string;
                      "32x32"?: string;
                      "48x48"?: string;
                      [key: string]: unknown;
                  };
                  components?: {
                      ari?: string;
                      assignee?: {
                          accountId?: string;
                          accountType?: | "unknown"
                          | (...) & (...)
                          | "atlassian"
                          | "app"
                          | "customer";
                          active?: boolean;
                          applicationRoles?: {
                              callback?: ...;
                              items?: ...;
                              "max-results"?: ...;
                              pagingCallback?: ...;
                              size?: ...;
                              [key: ...]: ...;
                          };
                          appType?: string;
                          avatarUrls?: {
                              "16x16"?: ...;
                              "24x24"?: ...;
                              "32x32"?: ...;
                              "48x48"?: ...;
                              [key: ...]: ...;
                          };
                          displayName?: string;
                          emailAddress?: string;
                          expand?: string;
                          groups?: {
                              callback?: ...;
                              items?: ...;
                              "max-results"?: ...;
                              pagingCallback?: ...;
                              size?: ...;
                              [key: ...]: ...;
                          };
                          guest?: boolean;
                          locale?: string;
                          self?: string;
                          timeZone?: string;
                          [key: string]: unknown;
                      };
                      assigneeType?: | string & {}
                      | "PROJECT_DEFAULT"
                      | "COMPONENT_LEAD"
                      | "PROJECT_LEAD"
                      | "UNASSIGNED";
                      description?: string;
                      id?: string;
                      isAssigneeTypeValid?: boolean;
                      lead?: {
                          accountId?: string;
                          accountType?: | "unknown"
                          | (...) & (...)
                          | "atlassian"
                          | "app"
                          | "customer";
                          active?: boolean;
                          applicationRoles?: {
                              callback?: ...;
                              items?: ...;
                              "max-results"?: ...;
                              pagingCallback?: ...;
                              size?: ...;
                              [key: ...]: ...;
                          };
                          appType?: string;
                          avatarUrls?: {
                              "16x16"?: ...;
                              "24x24"?: ...;
                              "32x32"?: ...;
                              "48x48"?: ...;
                              [key: ...]: ...;
                          };
                          displayName?: string;
                          emailAddress?: string;
                          expand?: string;
                          groups?: {
                              callback?: ...;
                              items?: ...;
                              "max-results"?: ...;
                              pagingCallback?: ...;
                              size?: ...;
                              [key: ...]: ...;
                          };
                          guest?: boolean;
                          locale?: string;
                          self?: string;
                          timeZone?: string;
                          [key: string]: unknown;
                      };
                      leadAccountId?: string;
                      metadata?: Record<string, any>;
                      name?: string;
                      project?: string;
                      projectId?: number;
                      realAssignee?: {
                          accountId?: string;
                          accountType?:
                              | "unknown"
                              | (...) & (...)
                              | "atlassian"
                              | "app"
                              | "customer";
                          active?: boolean;
                          applicationRoles?: {
                              callback?: ...;
                              items?: ...;
                              "max-results"?: ...;
                              pagingCallback?: ...;
                              size?: ...;
                              [key: ...]: ...;
                          };
                          appType?: string;
                          avatarUrls?: {
                              "16x16"?: ...;
                              "24x24"?: ...;
                              "32x32"?: ...;
                              "48x48"?: ...;
                              [key: ...]: ...;
                          };
                          displayName?: string;
                          emailAddress?: string;
                          expand?: string;
                          groups?: {
                              callback?: ...;
                              items?: ...;
                              "max-results"?: ...;
                              pagingCallback?: ...;
                              size?: ...;
                              [key: ...]: ...;
                          };
                          guest?: boolean;
                          locale?: string;
                          self?: string;
                          timeZone?: string;
                          [key: string]: unknown;
                      };
                      realAssigneeType?: | string & {}
                      | "PROJECT_DEFAULT"
                      | "COMPONENT_LEAD"
                      | "PROJECT_LEAD"
                      | "UNASSIGNED";
                      self?: string;
                      [key: string]: unknown;
                  }[];
                  deleted?: boolean;
                  deletedBy?: {
                      accountId?: string;
                      accountType?: "unknown"
                      | string & {}
                      | "atlassian"
                      | "app"
                      | "customer";
                      active?: boolean;
                      applicationRoles?: {
                          callback?: { [key: string]: unknown };
                          items?: {
                              defaultGroups?: ...;
                              defaultGroupsDetails?: ...;
                              defined?: ...;
                              groupDetails?: ...;
                              groups?: ...;
                              hasUnlimitedSeats?: ...;
                              key?: ...;
                              name?: ...;
                              numberOfSeats?: ...;
                              platform?: ...;
                              remainingSeats?: ...;
                              selectedByDefault?: ...;
                              userCount?: ...;
                              userCountDescription?: ...;
                              [key: ...]: ...;
                          }[];
                          "max-results"?: number;
                          pagingCallback?: { [key: string]: unknown };
                          size?: number;
                          [key: string]: unknown;
                      };
                      appType?: string;
                      avatarUrls?: {
                          "16x16"?: string;
                          "24x24"?: string;
                          "32x32"?: string;
                          "48x48"?: string;
                          [key: string]: unknown;
                      };
                      displayName?: string;
                      emailAddress?: string;
                      expand?: string;
                      groups?: {
                          callback?: { [key: string]: unknown };
                          items?: { groupId?: ...; name?: ...; self?: ...; [key: ...]: ... }[];
                          "max-results"?: number;
                          pagingCallback?: { [key: string]: unknown };
                          size?: number;
                          [key: string]: unknown;
                      };
                      guest?: boolean;
                      locale?: string;
                      self?: string;
                      timeZone?: string;
                      [key: string]: unknown;
                  };
                  deletedDate?: Date;
                  description?: string;
                  email?: string;
                  entityId?: string;
                  expand?: string;
                  favourite?: boolean;
                  id?: string;
                  insight?: {
                      lastIssueUpdateTime?: Date;
                      totalIssueCount?: number;
                      [key: string]: unknown;
                  };
                  isPrivate?: boolean;
                  issueTypeHierarchy?: {
                      levels?: {
                          hierarchyLevelNumber?: number;
                          issueTypeIds?: (...)[];
                          level?: number;
                          name?: string;
                          [key: string]: unknown;
                      }[];
                      [key: string]: unknown;
                  };
                  issueTypes?: {
                      avatarId?: number;
                      description?: string;
                      entityId?: string;
                      hierarchyLevel?: number;
                      iconUrl?: string;
                      id?: string;
                      name?: string;
                      scope?: {
                          project?: {
                              avatarUrls?: ...;
                              id?: ...;
                              key?: ...;
                              name?: ...;
                              projectCategory?: ...;
                              projectTypeKey?: ...;
                              self?: ...;
                              simplified?: ...;
                              [key: ...]: ...;
                          };
                          type?: (...) & (...)
                          | "PROJECT"
                          | "TEMPLATE";
                          [key: string]: unknown;
                      };
                      self?: string;
                      subtask?: boolean;
                      untranslatedName?: string;
                      [key: string]: unknown;
                  }[];
                  key?: string;
                  landingPageInfo?: {
                      attributes?: Record<string, any>;
                      boardId?: number;
                      boardName?: string;
                      projectKey?: string;
                      projectType?: string;
                      queueCategory?: string;
                      queueId?: number;
                      queueName?: string;
                      simpleBoard?: boolean;
                      simplified?: boolean;
                      url?: string;
                      [key: string]: unknown;
                  };
                  lead?: {
                      accountId?: string;
                      accountType?: "unknown"
                      | string & {}
                      | "atlassian"
                      | "app"
                      | "customer";
                      active?: boolean;
                      applicationRoles?: {
                          callback?: { [key: string]: unknown };
                          items?: {
                              defaultGroups?: ...;
                              defaultGroupsDetails?: ...;
                              defined?: ...;
                              groupDetails?: ...;
                              groups?: ...;
                              hasUnlimitedSeats?: ...;
                              key?: ...;
                              name?: ...;
                              numberOfSeats?: ...;
                              platform?: ...;
                              remainingSeats?: ...;
                              selectedByDefault?: ...;
                              userCount?: ...;
                              userCountDescription?: ...;
                              [key: ...]: ...;
                          }[];
                          "max-results"?: number;
                          pagingCallback?: { [key: string]: unknown };
                          size?: number;
                          [key: string]: unknown;
                      };
                      appType?: string;
                      avatarUrls?: {
                          "16x16"?: string;
                          "24x24"?: string;
                          "32x32"?: string;
                          "48x48"?: string;
                          [key: string]: unknown;
                      };
                      displayName?: string;
                      emailAddress?: string;
                      expand?: string;
                      groups?: {
                          callback?: { [key: string]: unknown };
                          items?: { groupId?: ...; name?: ...; self?: ...; [key: ...]: ... }[];
                          "max-results"?: number;
                          pagingCallback?: { [key: string]: unknown };
                          size?: number;
                          [key: string]: unknown;
                      };
                      guest?: boolean;
                      locale?: string;
                      self?: string;
                      timeZone?: string;
                      [key: string]: unknown;
                  };
                  name?: string;
                  permissions?: { canEdit?: boolean; [key: string]: unknown };
                  projectCategory?: {
                      description?: string;
                      id?: string;
                      name?: string;
                      self?: string;
                      [key: string]: unknown;
                  };
                  projectTypeKey?: | string & {}
                  | "software"
                  | "service_desk"
                  | "business"
                  | "product_discovery"
                  | "customer_service";
                  properties?: Record<string, any>;
                  retentionTillDate?: Date;
                  roles?: Record<string, any>;
                  self?: string;
                  simplified?: boolean;
                  style?: "classic" | string & {} | "next-gen";
                  url?: string;
                  uuid?: string;
                  versions?: {
                      approvers?: {
                          accountId?: (...) | (...);
                          declineReason?: (...) | (...);
                          description?: (...) | (...);
                          status?: (...) | (...);
                          [key: string]: unknown;
                      }[];
                      archived?: boolean;
                      description?: string;
                      driver?: string;
                      expand?: string;
                      id?: string;
                      issuesStatusForFixVersion?: {
                          done?: number;
                          inProgress?: number;
                          toDo?: number;
                          unmapped?: number;
                          [key: string]: unknown;
                      };
                      moveUnfixedIssuesTo?: string;
                      name?: string;
                      operations?: {
                          href?: (...)
                          | (...);
                          iconClass?: (...) | (...);
                          id?: (...) | (...);
                          label?: (...) | (...);
                          styleClass?: (...) | (...);
                          title?: (...) | (...);
                          weight?: (...) | (...);
                          [key: string]: unknown;
                      }[];
                      overdue?: boolean;
                      projectId?: number;
                      released?: boolean;
                      releaseDate?: string;
                      self?: string;
                      startDate?: string;
                      userReleaseDate?: string;
                      userStartDate?: string;
                      [key: string]: unknown;
                  }[];
                  [key: string]: unknown;
              }[];
              [key: string]: unknown;
          },
      >