getRequestTypes method
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
ordescription
. For example, the strings "Install", "Inst", "Equi", or "Equipment" will match a request type with the name "Equipment Installation Request".
Note: This API will filter out hidden request types (aka.request types
without groups) when searchQuery
is provided.
Permissions required: Permission to access the service desk.
Implementation
Future<PagedDTORequestTypeDTO> getRequestTypes(
{required String serviceDeskId,
int? groupId,
List<String>? expand,
String? searchQuery,
int? start,
int? limit}) async {
return PagedDTORequestTypeDTO.fromJson(await _client.send(
'get',
'rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttype',
pathParameters: {
'serviceDeskId': serviceDeskId,
},
queryParameters: {
if (groupId != null) 'groupId': '$groupId',
if (expand != null) 'expand': expand.map((e) => e).join(','),
if (searchQuery != null) 'searchQuery': searchQuery,
if (start != null) 'start': '$start',
if (limit != null) 'limit': '$limit',
},
));
}