XCP-ng

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Talk to xo-server with PHP?

    Xen Orchestra
    2
    5
    211
    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.
    • jedimarcus
      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
      • olivierlambert
        olivierlambert Vates 🪐 Founder & CEO 🦸 last edited by

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

        jedimarcus 1 Reply Last reply Reply Quote 0
        • jedimarcus
          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
          • olivierlambert
            olivierlambert Vates 🪐 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
            • olivierlambert
              olivierlambert Vates 🪐 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