How to define a default namespace for my service instance?

The things in our service instance are projected to be of various namespaces.
Is there a possibility to define one of the namespaces as a default?


Bosch IoT Things allows a service instance to handle entities of various namespaces.
Since December 2017 we actually encourage the namespace management and try to enforce setting a namespace for all your Thing service related entities.

Find the detailed concept description at Namespace.

There are several points in time when you can define a default namespace:

  • While booking the service at Cloud Foundy you can use the optional SERVICE_DEFAULT_NAMESPACE parmeter.
    In case you omit this step please make sure to define at least one namespace before creating your first thing.
  • The list of namespaces reserved for your service instance is displayed at Manage your solution.
    As soon as you specify the first namespace entry, this will be marked as default.
    To change the default simply edit a new entry and mark it accordingly.

We recommend using the Cloud Foundry command line interface, in case you want to specify a SERVICE_DEFAULT_NAMESPACE within the same statement of creating the service instance.

  1. Login
    cf login -a https:⁄⁄ –skip-ssl-validation
  2. See the offering in the marketplace
    cf marketplace
  3. The result should contain among others the Bosch IoT Things service and its service plans
    things-service   Free, Starter, Standard
  4. Select the org and the space where to book the service instance
    cf target -o "ORG_NAME" -s "SPACE_NAME"
  5. Create a service instance. Via the SERVICE_DEFAULT_NAMESPACE parameter you attach the default namespace to your new service instance.
    cf create-service things-service Free my-new-things -c "{\"SERVICE_DEFAULT_NAMESPACE\":\"org.example01\"}"
  6. Check the service metadata
    cf service my-new-things

Our service broker will ensure that the namespace is globally unique.
In case of collision with an already reserved namespace (by another solution) your instance is not created but a respective error message will show up.

In case you prefer using the UI for booking your service-instance, please use the Add Parameters section to set the SERVICE_DEFAULT_NAMESPACE.