deleteProject method

Future<void> deleteProject({
  1. required String projectIdOrKey,
  2. bool? enableUndo,
})

Deletes a project.

You can't delete a project if it's archived. To delete an archived project, restore the project and then delete it. To restore a project, use the Jira UI.

Permissions required: Administer Jira global permission.

Implementation

Future<void> deleteProject(
    {required String projectIdOrKey, bool? enableUndo}) async {
  await _client.send(
    'delete',
    'rest/api/3/project/{projectIdOrKey}',
    pathParameters: {
      'projectIdOrKey': projectIdOrKey,
    },
    queryParameters: {
      if (enableUndo != null) 'enableUndo': '$enableUndo',
    },
  );
}