@PreAuthorize("hasRole('CONNECTOR_CREATE')")
@RequestMapping(method = RequestMethod.POST, value = "/create")
public ConnInstanceTO create(final HttpServletResponse response, @RequestBody final ConnInstanceTO connInstanceTO) {
LOG.debug("ConnInstance create called with configuration {}", connInstanceTO);
ConnInstance connInstance = binder.getConnInstance(connInstanceTO);
try {
connInstance = connInstanceDAO.save(connInstance);
auditManager.audit(Category.connector, ConnectorSubCategory.create, Result.success,
"Successfully created connector instance: " + connInstance.getDisplayName());
} catch (Exception e) {
auditManager.audit(Category.connector, ConnectorSubCategory.create, Result.failure,
"Could not create connector instance: " + connInstanceTO.getDisplayName(), e);
SyncopeClientCompositeErrorException scce =