Function: getRequestTypes()
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:
groupIdwhich filters the results to items in the customer request type group.searchQuerywhich is matched against request types'nameordescription. 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
| Parameter | Type | Description |
|---|---|---|
client | Client | - |
parameters | { expand?: string[]; groupId?: number; includeHiddenRequestTypesInSearch?: boolean; limit?: number; restrictionStatus?: string; searchQuery?: string; serviceDeskId: string; start?: number; } | - |
parameters.expand? | string[] | - |
parameters.groupId? | number | Filters results to those in a customer request type group. |
parameters.includeHiddenRequestTypesInSearch? | boolean | Whether to include hidden request types when searching with searchQuery. |
parameters.limit? | number | The maximum number of items to return per page. Default: 50. See the Pagination section for more details. |
parameters.restrictionStatus? | string | Request type restriction status (open or restricted) used to filter the results. |
parameters.searchQuery? | string | The string to be used to filter the results. |
parameters.serviceDeskId? | string | The ID of the service desk whose customer request types are to be returned. This can alternatively be a project identifier. |
parameters.start? | number | The 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[]; }>