Rest api usage


I’m evaluating Nexus3 OSS and would like to create a little webpage which fetches information from your rest api using Ajax / Fetch javascript facilities.

I’m running into the problem of CORS(*), which I would just circumvent by placing those scripts in $NEXUS_HOME/nexus-version/public/, where other static content is served (if this is “allowed” legally?) - like this it would be served from the same server and CORS wouldn’t be a problem.

Rest API calls from curl, like promoted in the Nexus repository manager administration UI, work on command line without additional configuration. I would just like to query for some artifacts, build some UI, nothing too fancy.

Or is there some other way I’m not yet aware of?

thank you.

(*) Same-origin policy - Web security | MDN

We don’t allow cross-origin browser requests because it requires significant additional security considerations and the intent of the REST API is really for integration into tools & workflows.

For Nexus 3 you would need to build a plugin to contribute to the UI. If you’re attempting to avoid extjs we’ve recently started adding some react based views so you could also look at those.