UDMI / Docs / Tools / Project Spec
The Project Specification (project_spec) is a string format used by UDMI tools, primarily the registrar and validator, to dynamically configure the target IoT environment, provider semantics, and namespace isolation.
The string is evaluated according to the following regular expression:
^(//([a-z]+)/)?([a-z-]+)(/([a-z0-9]+))?(\+([a-z0-9-]+))?$
Note: The actual implementation in Java uses (//([a-z]+)/)?(([a-z-]+))(/([a-z0-9]+))?(\\+([a-z0-9-]+))? with specific capture groups.
The structure can be conceptualized as:
[//provider/]project[/namespace][+user]
provider (Group 2, Optional)The provider designates the primary IoT backend or protocol used by the tool.
(//([a-z]+)/)?). If omitted, the ExecutionConfiguration’s iot_provider will not be overridden by the project spec, although tools may assume a default based on external configurations.gbos: Uses reflector client through IoT Core.gref: Uses reflector client through GCP PubSub.mqtt: Uses reflector client through an MQTT broker.pubsub: Uses direct access through PubSub (primarily for validator).clearblade: Connects to ClearBlade IoT Core.local, dynamic, implicit, etcd, jwt.project (Group 3/4, Required)The project identifier is the core mandatory component of the spec. Its specific meaning depends heavily on the chosen provider.
gbos, clearblade: IoT Core project ID.gref, pubsub: GCP project ID.mqtt: Broker hostname (e.g., localhost).no-site): The exact string no-site is mapped to a null project_id internally, signaling the tool to operate entirely locally or disconnected from a remote project.namespace (Group 6, Optional)The namespace allows for multiple parallel instances within the same project.
~).user (Group 8, Optional)The user component suffix designates concurrent execution domains for different users on the same project without colliding on subscriptions or sessions.
gref, pubsub: Supported. If not explicitly specified, defaults to debug.gbos, mqtt: Not supported. Specifying a user here will result in a runtime error or undefined behavior as only a single client connection is logically mapped.registrarThe registrar tool uses the project_spec to determine how to connect to the target environment to register devices, update metadata, and map physical topology into cloud constructs.
ExecutionConfiguration, overriding fields like iot_provider, project_id, udmi_namespace, and user_name.CloudIotManager or PubSubPusher, the extracted project and namespace guide topic creation and registry API targeting.While this document aims to be an authoritative specification, developers should be aware of the following discrepancies between documentation and current code implementation:
//provider/project was mandatory. The regex (//([a-z]+)/)? allows dropping the provider (e.g., simply my-project). In such cases, the provider may default or fail depending on tool-specific initialization logic.IotProvider enum (like clearblade, local, dynamic) than what was originally formalized.[a-z0-9]+) and user segments ([a-z0-9-]+), ensuring valid resource IDs downstream. Hyphens are allowed in project and user but excluded from namespace.//gbos/bos-platform-dev
bos-platform-dev, registry: UDMI-REFLECT, device: ZZ-TRI-FECTA//gbos/bos-platform-dev+debug
gbos//gbos/bos-platform-dev/faucetsdn
bos-platform-dev, registry: faucetsdn~UDMI-REFLECT, device: faucetsdn~ZZ-TRI-FECTA//gref/bos-platform-dev
projects/bos-platform-dev/topics/udmi_reflectprojects/bos-platform-dev/subscriptions/udmi_reply+debug (Defaults to debug)//gref/bos-platform-dev+username
projects/bos-platform-dev/topics/udmi_reflectprojects/bos-platform-dev/subscriptions/udmi_reply+username//gref/bos-platform-dev/faucetsdn+username
projects/bos-platform-dev/topics/faucetsdn~udmi_reflectprojects/bos-platform-dev/subscriptions/faucetsdn~udmi_reply+username//mqtt/localhost
/r/UDMI-REFLECT/d/ZZ-TRI-FECTA//mqtt/localhost+debug
mqtt//pubsub/bos-platform-dev
projects/bos-platform-dev/subscriptions/udmi_target+debugprojects/bos-platform-dev/topics/udmi_target//pubsub/bos-platform-dev/faucetsdn+username
projects/bos-platform-dev/subscriptions/faucetsdn~udmi_target+usernameprojects/bos-platform-dev/topics/faucetsdn~udmi_target