code: @PUT
      @Path("/{variantId}/reset")
      @Consumes(MediaType.APPLICATION_JSON)
      @Produces(MediaType.APPLICATION_JSON)
      public Response resetSecret(@PathParam("variantId") String variantId) {
  
          Variant variant = variantService.findByVariantID(variantId);
  
          if (variant == null) {
              return Response.status(Response.Status.NOT_FOUND).entity("Could not find requested Variant").build();
          }
  
          if (!type.isInstance(variant)) {
              return Response.status(Response.Status.BAD_REQUEST).entity("Requested Variant is of another type/platform").build();
          }
  
          logger.trace("Resetting secret for: {}", variant.getName());
  
          // generate the new 'secret' and apply it:
          String newSecret = UUID.randomUUID().toString();
          variant.setSecret(newSecret);
          variantService.updateVariant(variant);
  
          return Response.ok(variant).build();
  
      }
docs: Secret Reset
  
  @param variantId id of {@link Variant}
  @return          {@link Variant} with new secret
  
  @statuscode 200 The secret of Variant reset successfully
  @statuscode 400 The requested Variant resource exists but it is not of the given type
  @statuscode 404 The requested Variant resource does not exist