In case you encounter the same error as what I encountered, this is what I did to resolve the issue.
The entry ou=people,dc=example,dc=com specified as the search base does not exist in the Directory Server.
Kind of strange to me initially. When I installed OpenDJ, I have explicitly configured my root suffix to be dc=azlabs, dc=sg. How come the Rest2Ldap interface is responding with a "dc=example,dc=com" error message?
Then I remember there is a configuration file http-config.json - which I said is the "soul" of Rest2Ldap.
There you are... by default, the http-config.json consists of mapping to "dc=example,dc=com".
All I needed to do is to change all references of "dc=example,dc=com" to "dc=azlabs,dc=sg".
After that, stop-ds followed by start-ds. Fire a curl again.
Ops! Mine was a hacker's act. For a production system, please do the following to reload the http-config.json.
Force the HTTP Connection Handler to reread its configuration.