instanceId

instanceId(app) returns admin.instanceId.InstanceId

Gets the InstanceId service for the default app or a given app.

admin.instanceId() can be called with no arguments to access the default app's InstanceId service or as admin.instanceId(app) to access the InstanceId service associated with a specific app.

Parameter

app

Optional

admin.app.App

Optional app whose InstanceId service to return. If not provided, the default InstanceId service will be returned.

Value must not be null.

Returns

non-null admin.instanceId.InstanceId The default InstanceId service if no app is provided or the InstanceId service associated with the provided app.

Examples

// Get the Instance ID service for the default app
var defaultInstanceId = admin.instanceId();
// Get the Instance ID service for a given app
var otherInstanceId = admin.instanceId(otherApp);

Interface