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 1.1k 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 Offline
        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 Offline
            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 Offline
              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

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post