That can be used for provisioning. When writing scripts, be sure to set up an IDE environment. That will let you use code completion, and also let you browse directly from your code into ours. It makes things a lot easier.
There are also some rest apis you can use, but the coverage for provisioning is pretty low at the moment. Check out Admin > System > Api to see what is available in your version of nexus repository manager.