jira.js
    Preparing search index...

    Function getRequestTypes

    • This method returns all customer request types from a service desk. There are two parameters for filtering the returned list:

      • groupId which filters the results to items in the customer request type group.
      • searchQuery which is matched against request types' name or description. For example, the strings "Install", "Inst", "Equi", or "Equipment" will match a request type with the name "Equipment Installation Request".

      Note: This API by default will filter out request types hidden in the portal (i.e. request types without groups and request types where a user doesn't have permission) when searchQuery is provided, unless includeHiddenRequestTypesInSearch is set to true. Restricted request types will not be returned for those who aren't admins.

      Permissions required: Permission to access the service desk.

      Parameters

      • client: Client
      • parameters: {
            expand?: string[];
            groupId?: number;
            includeHiddenRequestTypesInSearch?: boolean;
            limit?: number;
            restrictionStatus?: string;
            searchQuery?: string;
            serviceDeskId: string;
            start?: number;
        }
        • Optionalexpand?: string[]
        • OptionalgroupId?: number

          Filters results to those in a customer request type group.

        • OptionalincludeHiddenRequestTypesInSearch?: boolean

          Whether to include hidden request types when searching with searchQuery.

        • Optionallimit?: number

          The maximum number of items to return per page. Default: 50. See the Pagination section for more details.

        • OptionalrestrictionStatus?: string

          Request type restriction status (open or restricted) used to filter the results.

        • OptionalsearchQuery?: string

          The string to be used to filter the results.

        • serviceDeskId: string

          The ID of the service desk whose customer request types are to be returned. This can alternatively be a project identifier.

        • Optionalstart?: number

          The starting index of the returned objects. Base index: 0. See the Pagination section for more details.

      • Optionaloptions: RequestOptions

      Returns Promise<
          {
              _expands?: string[];
              _links?: {
                  base?: string;
                  context?: string;
                  next?: string;
                  prev?: string;
                  self?: string;
                  [key: string]: unknown;
              };
              isLastPage?: boolean;
              limit?: number;
              size?: number;
              start?: number;
              values?: {
                  _expands?: string[];
                  _links?: { self?: string; [key: string]: unknown };
                  canCreateRequest?: boolean;
                  description?: string;
                  fields?: {
                      canAddRequestParticipants?: boolean;
                      canRaiseOnBehalfOf?: boolean;
                      requestTypeFields?: {
                          defaultValues?: (...) | (...);
                          description?: (...) | (...);
                          fieldId?: (...) | (...);
                          jiraSchema?: (...) | (...);
                          name?: (...) | (...);
                          presetValues?: (...) | (...);
                          required?: (...) | (...) | (...);
                          validValues?: (...) | (...);
                          visible?: (...) | (...) | (...);
                          [key: string]: unknown;
                      }[];
                      [key: string]: unknown;
                  };
                  groupIds?: string[];
                  helpText?: string;
                  icon?: {
                      _links?: { iconUrls?: Record<(...), (...)>; [key: string]: unknown };
                      id?: string;
                      [key: string]: unknown;
                  };
                  id?: string;
                  issueTypeId?: string;
                  name?: string;
                  portalId?: string;
                  practice?: string;
                  restrictionStatus?: string & {}
                  | "OPEN"
                  | "RESTRICTED";
                  serviceDeskId?: string;
                  [key: string]: unknown;
              }[];
              [key: string]: unknown;
          },
      >