VMware Cloud Community
vamsee83
Contributor
Contributor

vCAC REST API's

Hi,

I got the documentation for vCAC REST API's from VMware vCloud Automation Center Documentation . I think it has updated recently. I was looking into that document but could not figure out how to establish connection to vCAC server using this API's. I used basic authentication and hitting this URI https://<vcac-server host name>/catalog-service/api  but the server is throwing back the below response, looks like i need to attach a authentication token to the header. How to get this token?


  • <pre>java.lang.IllegalArgumentException: The HTTP token has invalid syntax arround index 0
  • com.vmware.vim.sso.http.impl.ChunkParser.throwParseEx(ChunkParser.java:92)
  • com.vmware.vim.sso.http.impl.ChunkParser.lookAt(ChunkParser.java:86)
  • com.vmware.vim.sso.http.impl.ChunkParser.lookingAtPrefix(ChunkParser.java:74)
  • com.vmware.vim.sso.http.impl.ChunkParser.next(ChunkParser.java:54)
  • com.vmware.vim.sso.http.impl.TokenFormatter.parse(TokenFormatter.java:140)
  • com.vmware.vim.sso.http.impl.InternalSamlDecoder.decode(InternalSamlDecoder.java:19)
  • com.vmware.vcac.authentication.http.tenancy.SamlTenantIdentificationStrategy.identifyTenant(SamlTenantIdentificationStrategy.java:67)
  • com.vmware.vcac.authentication.http.tenancy.TenancyContextFilter.determineTenancyContext(TenancyContextFilter.java:65)
  • com.vmware.vcac.authentication.http.tenancy.TenancyContextFilter.doFilter(TenancyContextFilter.java:41)
  • org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  • org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)
  • org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  • org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  • org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
  • org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
  • org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
  • org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
  • org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
  • org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
  • org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
  • org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
0 Kudos
4 Replies
qc4vmware
Virtuoso
Virtuoso

Same here.  I am guessing we need to obtain a saml token from the SSO server?

0 Kudos
admin
Immortal
Immortal

Hi,

Currently vCAC 6.0.X API's are in BETA state, and you'll only have access with a valid SSO token. Thing is, it isn't easy to generate one at the moment since not all the API's for authentication are complete.
If you want to use vCAC's current API, i'd recommend installing the vCAC 6 plugin for vCO , and using REST based workflows from there, since the plugin handles the authentication seamlessly.

Also, you can explore the different objects / commands/ structure of the API , from vCO's 'API Explorer' - the left side pane when opening a scriptable task.

I hope this helps.

vamsee83
Contributor
Contributor

Thank You oKushmaro for taking the time out and replying to my question.

Hopefully VMware will add all authentication API's soon. Anyhow, as you suggested i downloaded and installed the vCAC 6 plugin for vCO. It came with lot of workflows by default, you mean this are REST based workflows for interaction with vCAC? or your pointing to any different workflows.

vCO vCAC Plugin.png

0 Kudos
admin
Immortal
Immortal

Hi,

I took the time to write 2 detailed posts on how to use the REST APIs. Find the here:

http://elasticskies.com/using-vcac-6-rest-api-part-1/

Using vCAC 6.0 REST APIs - Part 2 - Elastic Skies

0 Kudos