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

    vCloud Usage Meter 3.6 API Access

    darth_cisco Novice
    vExpert

      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> https://00.00.00.00:8443/um/api/customers

       

       

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

      curl -v -k -H x-usagemeter-authorization:<API KEY> https://00.00.00.00:8443/um/api/customer/#

       

       

      #Get Customer Rules

      curl -v -k -H x-usagemeter-authorization:<API KEY> https://00.00.00.00:8443/um/api/customer/#/rules

       

       

      #Delete a Customer

      curl -v -k -H x-usagemeter-authorization:<API KEY> -X DELETE https://00.00.00.00:8443/um/api/customer/3

       

       

      #Create a Customer

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