How to detect the version of the OX backend/server?

Collapse
X
Collapse
+ More Options
Posts
 
  • Time
  • Show
Clear All
new posts
  • tking
    Member
    • Nov 2011
    • 41

    #1

    How to detect the version of the OX backend/server?

    Dear OX Team,

    I am developing a small tool to extract the tasks of a folder. As I want to run the tool against different versions of the OX backend/server I would like to know if there is a convenient HTTP request to extract the version. From the HTTP API documentation I could not find anything obvious to exploit. :-) However, the OX GUI provides the "About" screen which shows the backend/server version so I assume there should be a decent HTTP request for this! :-)

    Could you please give me an hint on this?

    Best regards,
    Thomas
    Last edited by tking; 07-31-2012, 11:03 PM. Reason: typo
  • Wolfgang Rosenauer
    Open-Xchange Professional Services
    • Sep 2007
    • 648

    #2
    Try:

    https://OX/ajax/config/serverVersion with a valid session parameter

    Comment

    • Viktor Pracht
      Open-Xchange Developer
      • Feb 2007
      • 253

      #3
      Why do you need to know the version in the first place? The HTTP API is backwards compatible, so that if your tool works now, it should continue to work in the future, too.

      Comment

      • tking
        Member
        • Nov 2011
        • 41

        #4
        Thx! :-) .

        Comment

        • tking
          Member
          • Nov 2011
          • 41

          #5
          Unfortunately, the HTTP API is not backward compatible in the sense that if your request ids that are introduced in later versions of OX the older versions reply with an error message. A good example for this are ids 224-226 of the "Detailed task and appointment data" structure which are only available in OX 6.20.1 or greater. If you talk to older systems an error message occurs.

          So, the solution for me is to check the server version before I request ids. Or do you see another solution?

          Best regards,
          Thomas

          Comment

          • Viktor Pracht
            Open-Xchange Developer
            • Feb 2007
            • 253

            #6
            Compatibility with newer clients is called "forward compatibility", and no, the API is not forward-compatible. Being both fully backward and forward compatible would mean no changes at all. Partial forward compatibility (e.g. returning null for unknown fields) would be possible, but an unknown field is far more often the symptom of a bug. Therefore, we decided to report this as an error instead of assuming that the client is newer than the server.

            Depending on how much data you are retrieving, you could use action=get to retrieve all available fields of a single object. But if you are transferring many objects at once, then checking the version might be the only performant solution.

            Comment

            • tking
              Member
              • Nov 2011
              • 41

              #7
              Thanks for your detailed description! This is what I was thinking.

              Comment

              Working...