Skip to content

Versioning

Versioning is an inherent part of the API Engine's service management. Every deployed service is assigned a version number which is used in both REST and native APIs. Multiple versions of the the same service can coexist in the same Backendless application. Each version of the service runs independently. The system can accommodate infinite number of the service versions.

Version number is assigned automatically by Backendless - the default value is 1.0.0. Service code can also set the version number by using the version property on the service class:

class WeatherService {
  getWeather() {
    return { temperature:70, condition:"sunny" };
  }
}

SampleService.version = "2.5.0";

Backendless.ServerCode.addService(WeatherService);

Backendless Console displays version number for each deployed service:

version-number-in-console.zoom80

REST API

Service's version number is used in the REST API's endpoint URI generated for the service:

https://api.backendless.com/<app ID>/<REST API key>/services/<service name>/<service version>/<path>

Native API

The APIs generated by Backendless hide specifics of the service's remote method invocations. However, the internal implementation uses the version number (and service name) to identify the service:

Backendless.CustomService.invoke( "<service name>", "<service version>", "<method name>", <method arguments> );