Notification: Create change subscription

Note: LOCKED.
This API is extremely reliable and will not be broken unless absolutely necessary.

Method

POST

Path

/qrs/notification?name={typename}&id={id}&filter={filter}&condition={condition}&changetype={changeType}&propertyName={propertyName}

Description

Add a change subscription that makes the QRS call a URL when the specified entity has changed.

  • {typename}: To target a specific entity type, use {typename}.
  • {id}: To target a specific entity, use {id}.
  • {filter}: To target several entities (for example, all apps where the app name starts with “sales”), use {filter}. The filtering is limited to properties of the entity type, single references, and any depth of single children. The {propertyName} parameter supports base types, but not references or children. See Filtering.

    Note:

    The filter does not apply to deletion notifications. Notifications will be sent for all deletions affecting the entity type. For example, if you set filter=executingNodeName eq 'somehost.qliktech.com' and subscribe to deletion notifications for ExecutionResult, notifications will be sent for deletions of any ExecutionResult entity, not just for the ExecutionResult with the specified executingNodeName.

  • {condition}: To add a condition for activating the change subscription (for example, add a subscription to an app, if published = true), use {condition}.
  • Note: This functionality is under development and may change without prior notice.

  • {changeType}: To define the type of change to subscribe to, use {changeType}.
  • For example, to subscribe to updates with a specific filter use:To add a condition for activating the change subscription (for example, add a subscription to an app, if published = true), use {condition}.

    public enum ChangeType
           {
                  Undefined,
                  Add,
                  Update,
                  Delete
           }
  • {propertyName}: To target a specific property or de-select a property in favor of all other properties, use {propertyName}.
  • Examples:  

    Add a change subscription for apps with propertyName = "published" to call the URL whenever the published field is changed.

    Add a change subscription for apps with propertyName = "!published" to call the URL whenever anything other than the published flag and the ModifiedDate and ModifiedByUserName fields are changed.

    Note: The {propertyName} parameter supports base types, but not references or children.

    Add a change subscription for users whose names start with 'J' to call the URL whenever the user info is updated:

    https://<hostname>/qrs/notification?name=user&filter=Name sw 'J'&changetype=update&xrfkey=<yourXRFkey>

Body

string

The string contains a URL surrounded by double quotes. The URL represents an endpoint that can accept Post requests, for example, http://localhost:8080/notifyme.

Return value

A GUID, which is the {handle} of the notification. You can use it to remove the notification subscription. See Notification: Remove change subscription.

Did this information help you?

Can you tell us why it did not help you and how we can improve it?