createCustomerRequest method

Future<CustomerRequestDTO> createCustomerRequest({
  1. required RequestCreateDTO body,
})

This method creates a customer request in a service desk.

The JSON request must include the service desk and customer request type, as well as any fields that are required for the request type. A list of the fields required by a customer request type can be obtained using servicedesk/{serviceDeskId}/requesttype/{requestTypeId}/field.

The fields required for a customer request type depend on the user's permissions:

  • raiseOnBehalfOf is not available to Users who have the customer permission only.
  • requestParticipants is not available to Users who have the customer permission only or if the feature is turned off for customers.

requestFieldValues is a map of Jira field IDs and their values. See Field input formats, for details of each field's JSON semantics and the values they can take.

Permissions required: Permission to create requests in the specified service desk.

Implementation

Future<CustomerRequestDTO> createCustomerRequest(
    {required RequestCreateDTO body}) async {
  return CustomerRequestDTO.fromJson(await _client.send(
    'post',
    'rest/servicedeskapi/request',
    body: body.toJson(),
  ));
}