Class VersionResources
- java.lang.Object
-
- org.exoplatform.social.service.rest.api.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
-
-
Field Summary
Fields Modifier and Type Field Description static StringLATEST_VERSIONThe latest social rest api version.static List<String>SUPPORTED_VERSIONSThe supported versionsstatic StringVERSION_ONE
-
Constructor Summary
Constructors Constructor Description VersionResources()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.ResponsegetLatestVersion(javax.ws.rs.core.UriInfo uriInfo, String format)Gets the latest REST API version of eXo Platform.javax.ws.rs.core.ResponsegetSupportedVersions(javax.ws.rs.core.UriInfo uriInfo, String format)Gets eXo Platform REST service versions that are supported.
-
-
-
Field Detail
-
LATEST_VERSION
public static final String LATEST_VERSION
The latest social rest api version.- See Also:
- Constant Field Values
-
VERSION_ONE
public static final String VERSION_ONE
- See Also:
- Constant Field Values
-
-
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>
-
-