1 Reply Latest reply on Aug 22, 2017 9:26 AM by shanksVM

    vCloud Usage Meter 3.6 API Access

    darth_cisco Novice

      Hello All!


      I recently started building a backend for work to easily add customers as licensing is issued. After a support call it was realized that there was not a great deal of documentation internally at VMware or otherwise on examples on what the REST API for vcloud usage meter was looking for/responding to. There will be a forth coming KB to document some of these commands/examples, but I figured id start a running document here as I go through them.


      #Get all customers:

      curl -v -k -H x-usagemeter-authorization:<API KEY>



      #Get a specific Customer (see above and between the <id>#</id> tags

      curl -v -k -H x-usagemeter-authorization:<API KEY>



      #Get Customer Rules

      curl -v -k -H x-usagemeter-authorization:<API KEY>



      #Delete a Customer

      curl -v -k -H x-usagemeter-authorization:<API KEY> -X DELETE



      #Create a Customer

      curl -v -k -H Content-Type:application/xml -H x-usagemeter-authorization:<API KEY> -X POST --data '<customer xmlns="http://www.vmware.com/UM"><name>Thomas Thumb</name><country>US</country><postalCode>30318</postalCode></customer>'