Skip to main content

1E 23.7 (SaaS)

EventSubscriptions

Entity - EventSubscriptions - handles Event Subscriptions

Minimum API version 5.0

General note for version 8.0

As of API version 8.0, all the EventSubscriptions APIs that access the assigned Management Groups "hide" from the caller any Management Group on which the caller does not have any Role assignment. This is intended for delegation of administration where the user is supposed to only manage a subset of endpoints, which are specified by means of Management Groups. The delegated administrator should only be able to see information related to his or her Management Groups, and not anything else in the organization. This is done transparently by the APIs unless otherwise noted, i.e., the API is called in the normal way as in previous versions, but the returned results are the ones that you would get if the only existing Management Groups were those on which you have any Role assignment. In other words, trying to access a specific information about event subscriptions on which you have no rights on an assigned Management Group will return an error, and retrieving information about the event subscription will return only the assigned Management Groups that are accessible to the calling user.

Verb

Request

Notes

Permissions required

GET

/Consumer/EventSubscriptions

Returns all Event Subscriptions within the system.

Read on EventSubscription

GET

/Consumer/EventSubscriptions/{id}

Returns a single Event Subscription.

Example data returned:

Example response

{
    "Id": 2,
    "ConsumerId": 2,
    "Topic": "1E.Performance.*",
    "Url": "https://target.acme.lab/Test",
    "Strategy": 0,
    "Bookmark": null,
    "Status": 1
}

Read on EventSubscription

POST

/Consumer/EventSubscriptions

Adds an Event Subscription

Write on EventSubscription

PUT

/Consumer/EventSubscriptions

Modifies an existing Event Subscription

Write on EventSubscription

POST

/Consumer/EventSubscriptions/Search

Gets a list of filtered and sorted event subscriptions.

Example Request

{
    "filter":{
        "Operator": "AND",
        "Operands": [ 
            { 
                "Attribute": "ConsumerId",
                "Operator": "==",
                "Value": 2
            },
            { 
                "Attribute": "Status",
                "Operator": "==",
                "Value": 1
            }
        ]
    },
    "start": 1,
    "pageSize": 10,
    "sort": [
        {
            "Column": "Topic",
            "Direction": "ASC"
        },
        {
            "Column": "Url",
            "Direction": "ASC"
        }
    ]
}
  • filter - filter expression.To learn about how to define filter check Using scope and filter expressions page.

  • start - starting index to support pagination. Begins from 1.

  • pagesize - number of results to fetch

  • sort - sort expression. To learn about how to define sort criteria check Sort Definition page.

Allowed filter columns:

  • Id

  • ConsumerId

  • Topic

  • Url

  • Strategy

  • Status

Allowed sortable columns

  • ConsumerId

  • Topic

  • Url

  • Strategy

  • Status

Read on EventSubscription

DELETE

/Consumer/EventSubscriptions/{id}

Removes an Event Subscription given its Id

Delete on EventSubscription

POST

/Consumer/EventSubscriptions/{id}/Assignments

Assigns selected Management groups to an Event Subscription

Write on EventSubscription

PUT

/Consumer/EventSubscriptions/{id}/Assignments

Replaces all Management groups assigned to the Event Subscription with supplied Management groups

Write on EventSubscription

GET

/Consumer/EventSubscriptions/{id}/Assignments

Returns Management groups assigned to a given Event Subscription

Read on EventSubscription

DELETE

/Consumer/EventSubscriptions/{id}/Assignments

Unassigns specified Management groups from a given Event Subscription

Write on EventSubscription