Skip to content

Function: getRequestTypes() ​

ts
function getRequestTypes(
   client, 
   parameters, 
   options?
): Promise<{
[key: string]: unknown;
  _expands?: string[];
  _links?: {
   [key: string]: unknown;
     base?: string;
     context?: string;
     next?: string;
     prev?: string;
     self?: string;
  };
  isLastPage?: boolean;
  limit?: number;
  size?: number;
  start?: number;
  values?: object[];
}>;

Defined in: src/serviceDesk/api/servicedesk.ts:293

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 ​

ParameterTypeDescription
clientClient-
parameters{ expand?: string[]; groupId?: number; includeHiddenRequestTypesInSearch?: boolean; limit?: number; restrictionStatus?: string; searchQuery?: string; serviceDeskId: string; start?: number; }-
parameters.expand?string[]-
parameters.groupId?numberFilters results to those in a customer request type group.
parameters.includeHiddenRequestTypesInSearch?booleanWhether to include hidden request types when searching with searchQuery.
parameters.limit?numberThe maximum number of items to return per page. Default: 50. See the Pagination section for more details.
parameters.restrictionStatus?stringRequest type restriction status (open or restricted) used to filter the results.
parameters.searchQuery?stringThe string to be used to filter the results.
parameters.serviceDeskId?stringThe ID of the service desk whose customer request types are to be returned. This can alternatively be a project identifier.
parameters.start?numberThe starting index of the returned objects. Base index: 0. See the Pagination section for more details.
options?RequestOptions-

Returns ​

Promise<{ [key: string]: unknown; _expands?: string[]; _links?: { [key: string]: unknown; base?: string; context?: string; next?: string; prev?: string; self?: string; }; isLastPage?: boolean; limit?: number; size?: number; start?: number; values?: object[]; }>