VMware Cloud Community
gjanardh
Contributor
Contributor

vrops-export tool usage

I am able to login to the VR Ops UI using my local userid and password. But, unable to use the same for vrops -export (http 401). Any ideas to fix this authentication issue?

exporttool.bat  -d ../samples/vmfields.yaml -u apiuser -p pwd123 -H https://vopspoc.ve.com/

Exception in thread "main" org.apache.http.HttpException: HTTP Error: 401 Reason: 401
        at net.virtualviking.vropsexport.Client.checkResponse(Client.java:179)
        at net.virtualviking.vropsexport.Client.postJsonReturnStream(Client.java:156)
        at net.virtualviking.vropsexport.Client.<init>(Client.java:105)
        at net.virtualviking.vropsexport.Exporter.<init>(Exporter.java:118)
        at net.virtualviking.vropsexport.Main.createExporter(Main.java:192)
        at net.virtualviking.vropsexport.Main.main(Main.java:169)

Also, I have another user in non-local auth, who is receiving http 403 error. Are there any special roles or privileges that needs to be granted for API access.

exporttool.bat  -d ../samples/vmfields.yaml  -u userid@server.domain.com -p pwd  -H https://vopspoc.ve.com/
Exception in thread "main" org.apache.http.HttpException: HTTP Error: 403 Reason: 403
        at net.virtualviking.vropsexport.Client.checkResponse(Client.java:179)
        at net.virtualviking.vropsexport.Client.getJson(Client.java:139)
        at net.virtualviking.vropsexport.Client.getJson(Client.java:167)
        at net.virtualviking.vropsexport.Exporter.fetchResources(Exporter.java:266)
        at net.virtualviking.vropsexport.Exporter.exportTo(Exporter.java:172)
        at net.virtualviking.vropsexport.Main.main(Main.java:171)

Thanks for your assistance.

0 Kudos
4 Replies
daphnissov
Immortal
Immortal

Since this is just a fling, are you using admin? This is what I know works.

0 Kudos
sxnxr
Commander
Commander

I just tried this with the local admin user and works fine for me. All i did was change the password and the vrops web address.

0 Kudos
sxnxr
Commander
Commander

And to answer you question yes there is an API section when creating the roles

pastedImage_0.png

0 Kudos
gjanardh
Contributor
Contributor

Thanks Everyone, with proper access I am able to run the export tool now.

0 Kudos