The URI Broker is an object in the application plug-in web framework, which facilitates calls to the Zowe Application Server by constructing URIs that use the context from the calling application plug-in.
The URI Broker is accessible independent of other frameworks involved such as Angular, and is also accessible through iframe. This is because it is attached to a global when within the Zowe Desktop. For more information, see Zowe Desktop and window management. Access the URI Broker through one of two locations:
In an iframe:
The URI Broker builds the following categories of URIs depending upon what the application plug-in is designed to call.
Dataservices can be based on HTTP (REST) or Websocket. For more information, see Dataservices.
pluginRESTUri(plugin:ZLUX.Plugin, serviceName: string, relativePath:string): string
Returns: A URI for making an HTTP service request.
pluginWSUri(plugin: ZLUX.Plugin, serviceName:string, relativePath:string): string
Returns: A URI for making a Websocket connection to the service.
Defaults and user storage might exist for an application plug-in such that they can be retrieved through the Configuration Dataservice.
There are different scopes and actions to take with this service, and therefore there are a few URIs that can be built:
pluginConfigUri(pluginDefinition: ZLUX.Plugin, resourcePath:string, resourceName?:string): string
Returns: A URI for accessing the requested resource under the user's storage.
pluginConfigForScopeUri(pluginDefinition: ZLUX.Plugin, scope: string, resourcePath:string, resourceName?:string): string
Returns: A URI for accessing a specific scope for a given resource.
Content under an application plug-in's
web directory is static content accessible by a browser.
This can be accessed through:
pluginResourceUri(pluginDefinition: ZLUX.Plugin, relativePath: string): string
Returns: A URI for getting static content.
For more information about the
web directory, see Application plug-in filesystem structure.
Static content and services are accessed off of the root URI of an application plug-in. If there are other points that you must access on that application plug-in, you can get the root:
pluginRootUri(pluginDefinition: ZLUX.Plugin): string
Returns: A URI to the root of the application plug-in.
A client can find different information about a server's configuration or the configuration as seen by the current user by accessing specific APIs.
pluginListUri(pluginType: ZLUX.PluginType): string
Returns: A URI, which when accessed returns the list of existing plug-ins on the server by type, such as "Application" or "all".