With the introduction of our Environments feature, all mtribes Spaces are now available in Development, Staging, and Production variants. To complement this, we've made some changes to our SDKs and the Platform API.
Continue reading to learn about the new changes and how to upgrade to the latest SDK and Platform API.
You are now required to specify the target environment when initializing a client SDK. To do so, provide the API key associated with the target environment, found on your Space settings page.
If you haven't done so and are using the Browser SDK, an error will be logged and default fallback states will be served. If you're using Android or iOS, you will receive a compiler error.
Note: Regardless of what environment API key you specify, any fallbacks served will always be for the Production environment. Learn more about fallbacks in our SDKs.
To learn more about how to upgrade your code to use the environments feature, see the following guides:
Note: Currently, the Roku SDK does not support configuration of the target environment, so it will default to Production.
You will need to ‘Publish’ any pre-existing Collections in the Staging & Development environments for them to work correctly.
The biggest difference between our Platform API V1 and V2 is the addition of the Environment Resource. There have also been some changes to the existing User Resource as users and visitors are now scoped at the environment level.
The Environment Resource lists environments available for your Space (Development, Staging or Production):
The User resource has been moved to underneath the Environment resource. To manage users belonging to a particular environment, you must specify the API key for that environment in path parameters:
Switch to the Platform API V2.
v2in the request URL.
Include the environment keyword when managing users.
For User Resource requests, include the environment keyword in the path:
Manage users and visitors in different environments.
If you wish to manage users on a different environment to
production, use either
developmentas the environment keyword in the request path.
Learn more about the Platform API.
The Platform API V1 will be deprecated by February 2022. If you still require access to this version of the API, refer to the Platform API Documentation V1.