XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Talk to xo-server with PHP?

    Scheduled Pinned Locked Moved Xen Orchestra
    5 Posts 2 Posters 538 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jedimarcusJ Offline
      jedimarcus
      last edited by

      Before wasting too much time trying to get this working, can someone just confirm that it should work? Can I connect to xo-server with JsonRPC using PHP? Or are there some websocket reasons why this can't work?

      1 Reply Last reply Reply Quote 0
      • olivierlambertO Online
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        No problem to use PHP to talk to XO API 🙂 (just use a PHP JSON RPC lib)

        jedimarcusJ 1 Reply Last reply Reply Quote 0
        • jedimarcusJ Offline
          jedimarcus @olivierlambert
          last edited by

          You don't happen to have an example handy? Even if it's not PHP.

          Either the libraries I'm trying are 💩 or my brain is too much used to REST to get the JSON RPC working.

          1 Reply Last reply Reply Quote 0
          • olivierlambertO Online
            olivierlambert Vates 🪐 Co-Founder CEO
            last edited by

            https://mickael-baron.fr/blog/2021/05/28/xo-server-websocket-jsonrcp

            An exemple in JS: https://github.com/vatesfr/xen-orchestra/tree/master/packages/xo-lib

            1 Reply Last reply Reply Quote 0
            • olivierlambertO Online
              olivierlambert Vates 🪐 Co-Founder CEO
              last edited by

              See also https://xcp-ng.org/forum/topic/4538/xoa-json-rpc-call-basic-exemple

              1 Reply Last reply Reply Quote 0
              • First post
                Last post