Czernobog
Expert
Expert

I found the source of the issue. The documentation tells you to pass on the token and cooke file with each request:

NSX-T Data Center REST API - VMware API Explorer - VMware {code}

This can be done in the uri module with the Cookie header, it should look like this:

headers:
Content-Type: application/json
X-XSRF-TOKEN: "{{ nsx_login.x_xsrf_token }}"
Cookie: "{{ nsx_login.cookies_string }}"

This way the authentication works fine, it's a bit faster than with basic authentication too.

 

View solution in original post

Reply
0 Kudos