created mongoose api plugin