vCenter

 View Only
  • 1.  Only Admins can get vCenter version using REST?

    Posted Jan 28, 2021 05:17 AM

    Hello, 
    I am trying to fetch cVenter 7.0 version using following REST API: 

    GET https://{{vc}}/rest/appliance/system/version

    This works well when I am using Administrator privileges.

    But is throws error when using a user with Read-Only role. I have seen this issue on vCenter 6.7 and 7.0 both. 

    Error I get for a read only user is as follows: 

    {
        'type':'com.vmware.vapi.std.errors.unauthorized',
        'value':{
            'messages':
            [{
                'args':[],
                'default_message':'Unable to authorize user',
                'id':'vapi.security.authorization.invalid'
            ]}
        }
    }

    My question here is, do we need Administrator privilege only to fetch vCenter version using REST?

    Is there any alternative to this to detect vCenter version without using credentials or with read-only privilege?

     

     



  • 2.  RE: Only Admins can get vCenter version using REST?

    Broadcom Employee
    Posted Jun 22, 2021 10:07 AM

    Hi, based on the below document

    https://developer.vmware.com/docs/vsphere-automation/latest/appliance/api/appliance/system/version/get/


    we can infer that vmware-api-session-id is a required Header parameter when trying to get vCenter version using REST


    Thanks,
    Sidharth