throw new Exception("creation of attachment is not supported");
} else {
// Create a document
BufferedReader reader = req.getReader();
JSONTokener tokener = new JSONTokener(reader);
Object obj = tokener.nextValue();
if( obj instanceof JSONObject ){
JSONObject doc = (JSONObject)obj;
JSONObject result = actions.modifyDocument(authContext, dbIdentifier, docId, doc);
sendJsonResponse(resp, result);