Class VersionResources

  • All Implemented Interfaces:
    org.exoplatform.services.rest.resource.ResourceContainer

    public class VersionResources
    extends Object
    implements org.exoplatform.services.rest.resource.ResourceContainer
    Provides the latest REST service version.
    eXo anchor for generated doc on REST API
    VersionResources
    • Constructor Detail

      • VersionResources

        public VersionResources()
    • Method Detail

      • getLatestVersion

        public javax.ws.rs.core.Response getLatestVersion​(@Context
                                                          javax.ws.rs.core.UriInfo uriInfo,
                                                          String format)
        Gets the latest REST API version of eXo Platform. This version number should be used as the latest and stable one which is considered to include all new features and updates of eXo Platform REST services.
        Parameters:
        uriInfo - The URI information.
        format - The format of the returned result, for example, JSON or XML.
        Returns:
        The information of the latest REST version.
        eXo level API
        Platform
        eXo anchor for generated doc on REST API
        VersionResources.getLatestVersion
        eXo anchor for generated doc on REST API
        GET http://localhost:8080/rest/api/social/version/latest.json or GET http://localhost:8080/rest/api/social/version/latest.xml
        eXo response for generated doc on REST API
        {"version": "v1-alpha3"} or <version>v1-alpha3</version>
      • getSupportedVersions

        public javax.ws.rs.core.Response getSupportedVersions​(@Context
                                                              javax.ws.rs.core.UriInfo uriInfo,
                                                              String format)
        Gets eXo Platform REST service versions that are supported. This is for backward compatibility. If a client application is using an older eXo Platform REST APIs version, all APIs of the version still can work. The array MUST have the latest to oldest order. For example, {{{[v2, v1, v1-beta3]}}}, but not {{{[v1, v2, v1-beta3]}}}.
        Parameters:
        uriInfo - The URI information.
        format - The expected returned format.
        Returns:
        The information of the REST service versions supported by eXo Platform.
        eXo level API
        Platform
        eXo anchor for generated doc on REST API
        VersionResources.getSupportedVersions
        eXo anchor for generated doc on REST API
        GET http://localhost:8080/rest/api/social/version/supported.json or GET http://localhost:8080/rest/api/social/version/supported.xml
        eXo response for generated doc on REST API
        {"versions": ["v1-alpha3"]} or <versions> <version>v1-alpha3</version> </versions>