A subscription defines criteria for matching events and how the subscription's subscriber should be notified about those events.

interface NotificationSubscription {
    _links?: any;
    adminSettings?: SubscriptionAdminSettings;
    channel?: ISubscriptionChannel;
    description?: string;
    diagnostics?: SubscriptionDiagnostics;
    extendedProperties?: { [key: string]: string };
    filter: ISubscriptionFilter;
    flags?: SubscriptionFlags;
    id?: string;
    lastModifiedBy?: IdentityRef;
    modifiedDate?: Date;
    permissions?: SubscriptionPermissions;
    scope?: SubscriptionScope;
    status?: SubscriptionStatus;
    statusMessage?: string;
    subscriber?: IdentityRef;
    url?: string;
    userSettings?: SubscriptionUserSettings;
}

Properties

_links?: any

Links to related resources, APIs, and views for the subscription.

Admin-managed settings for the subscription. Only applies when the subscriber is a group.

Channel for delivering notifications triggered by the subscription.

description?: string

Description of the subscription. Typically describes filter criteria which helps identity the subscription.

Diagnostics for this subscription.

extendedProperties?: { [key: string]: string }

Any extra properties like detailed description for different contexts, user/group contexts

Matching criteria for the subscription. ExpressionFilter

Read-only indicators that further describe the subscription.

id?: string

Subscription identifier.

lastModifiedBy?: IdentityRef

User that last modified (or created) the subscription.

modifiedDate?: Date

Date when the subscription was last modified. If the subscription has not been updated since it was created, this value will indicate when the subscription was created.

The permissions the user have for this subscriptions.

The container in which events must be published from in order to be matched by the subscription. If empty, the scope is the current host (typically an account or project collection). For example, a subscription scoped to project A will not produce notifications for events published from project B.

Status of the subscription. Typically indicates whether the subscription is enabled or not.

statusMessage?: string

Message that provides more details about the status of the subscription.

subscriber?: IdentityRef

User or group that will receive notifications for events matching the subscription's filter criteria.

url?: string

REST API URL of the subscription.

User-managed settings for the subscription. Only applies when the subscriber is a group. Typically used to indicate whether the calling user is opted in or out of a group subscription.