create Method

Create a GlobalEventSubscription. You can use this to get or update the existing subscription instance, if you only have the original subscriptionId.

create(requestContext: AuthorizedClientRequestContext, subscriptionId: GuidString, globalEvents: GlobalEventType[]): Promise<GlobalEventSubscription>

throws IModelHubError with IModelHubStatus.EventSubscriptionAlreadyExists if GlobalEventSubscription already exists with the specified subscriptionId.

throws Common iModelHub errors

Parameter Type Description
requestContext AuthorizedClientRequestContext The client request context
subscriptionId GuidString Guid to be used by global event subscription. It will be a part of the resulting subscription id.
globalEvents GlobalEventType[] Array of GlobalEventTypes to subscribe to.

Returns - Created GlobalEventSubscription instance.

Defined in

Last Updated: 08 January, 2020