1 Reply Latest reply on Jul 18, 2017 7:52 PM by lamw

    REST vmdaemon

    wila Guru
    vExpertUser ModeratorsCommunity Warriors

      The first option in the list when you open it in swagger is daemon and you can turn it on/off


      Except you can't.


      possible state values are "on" / "off"


      So I just enter "off" (without the quotes) and press "Try it"


      Always get back:

      Response Body

      { "Code": 6, "Message": "Content type not supported" }

      Response Code


      Response Headers

        "access-control-allow-origin": "*",
        "content-type": "application/vnd.vmware.vmw.rest-v1+json",
        "date": "Tue, 18 Jul 2017 21:29:29 GMT",
        "content-length": "59"

      I tried on/off/1/0/true/false/OFF

      with quotes / without.

      So that appears not to work.

      I can see the vmdaemon running in activity monitor.


      Next question is... what does it do? AFAIK vmdaemon is new.

      I think I saw mentioned by William that the REST interface originally comes from AppCatalyst.

      Is there some doc about the interface?




      | Author of Vimalin. The virtual machine Backup app for VMware Desktop Products
      | Vimalin : Automated backups for VMware Fusion and VMware Workstation Professional
      | More info at https://www.vimalin.com
      | Twitter @wilva
      | VMware Wiki at http://www.vi-toolkit.com
        • 1. Re: REST vmdaemon
          lamw Guru
          VMware EmployeesCommunity Warriors

          This actually works for me using either the Swagger (on/off is no quotes) and/or API (via cURL) interface. Have you tried killing the vmrest and restarting it, maybe it was just acting up. I've had a few cases where it did some weird stuff. If you can repro, we definitely should get more logs


          I'm not exactly sure about what this is used for, but it seems to allow you to disable the REST API endpoint (see example below, once its "off", you can no longer use API until you re-enable).


          Disable REST API endpoint


          ┌─[lamw] - [~] - [2017-07-18 07:46:11]
          └─[0] <> curl -X PUT -d 'off' -H "Content-Type: application/vnd.vmware.vmw.rest-v1+json"
            "state": "off"


          Try to query REST API


          ┌─[lamw] - [~] - [2017-07-18 07:46:18]
          └─[0] <> curl
            "Code": 3,
            "Message": "The server is currently unable to handle the request"


          Enable REST API endpoint


          ┌─[lamw] - [~] - [2017-07-18 07:46:20]
          └─[0] <> curl -X PUT -d 'on' -H "Content-Type: application/vnd.vmware.vmw.rest-v1+json"
            "state": "on"