deleteExperimentDefinition method

Future<void> deleteExperimentDefinition({
  1. required String applicationIdentifier,
  2. required String experimentDefinitionIdentifier,
  3. DeleteType? deleteType,
})

Deletes an experiment definition. You can archive the definition to hide it from the active list while preserving it for future reference, or permanently delete it along with all associated run history.

May throw BadRequestException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException.

Parameter applicationIdentifier : The application ID or name.

Parameter experimentDefinitionIdentifier : The experiment definition ID or name.

Parameter deleteType : The type of deletion to perform. Valid values include archive (hide but preserve) and permanent (delete permanently).

Implementation

Future<void> deleteExperimentDefinition({
  required String applicationIdentifier,
  required String experimentDefinitionIdentifier,
  DeleteType? deleteType,
}) async {
  final $query = <String, List<String>>{
    if (deleteType != null) 'delete_type': [deleteType.value],
  };
  await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/applications/${Uri.encodeComponent(applicationIdentifier)}/experimentdefinitions/${Uri.encodeComponent(experimentDefinitionIdentifier)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
}