The switchboard service allows for a single application to be remotely configured based on version or unique device serial number. Allowing the same application build to at first be configured for QA servers, then after a data clear, can be configured to talk with production. All without having to reinstall the application nor install a different copy of the application.
To achieve this result, the application will use the switchboard API to retrieve a set of configuration items. It is assumed this is done upon first launch only, when configuration items are not set in the application yet.
To obtain the configuration block for a given project/app version/device id, the application will make an HTTPS request to the following URL:
|3||project_id||The unique project identifier created in the Switchboard Service, it is unique to your project.|
|2||app_version_number||The application version number. This must match the application version number specified in the Switchboard Application.|
|1||device_id||The unique device ID for the calling application. This must match the entry specified in the Switchboard Application. You can make it whatever ID you want, but the intent is to specify something unique to the calling device.|
When a call is made to the Project API, the device ID is queried first. If found, values for that device are returned. If not found, then the app version number is queried. If found, then values for the app version are returned. Otherwise, the project default values are returned.
The return for each call will be the full configuration block relative to the application version and device ID, return as a JSON payload: