Description

Allows a business application to retrieve its next group of events from the Event Hub.

  • More on Event Messages
URL Structure
{Base URL}/events?{count=}&{acknowledge=false}
HTTP Method GET  
Authentication Required  
Request Headers none
Parameters
count_parameter Required? Explanation
count= Optional Defines how many events to return. Defaults to 1.
acknowledge= Optional

If true will auto-acknowledge the message returned, if false you need to make a separate request to acknowledge.

Default is true (Available in version 3)

Example Invocations

{Base URL}/events?count=1
{Base URL}/events?count=50
 
Request Body none  
Returns
<events xmlns="http://ws.byu.edu/namespace/event-hub/v1">
  <event>             --repeated for each event
    <event_header>
      <domain/>       --required
      <entity/>       --required 
      <event_type/>   --required
      <source_dt/>    --optional
      <event_dt/>     --supplied by Event Hub
      <source_id/>    --optional
      <event_id/>     --supplied by Event Hub
      <dispatch_id/>  --supplied by Event Hub
    </event_header>
    <filters>
      <filter>   --name:value pairs defined by Event Type
        <filter_name/>
        <filter_value/>
      </filter>
    </filters>
    <event_body>
      <?></?>   --attributes defined by Event Type
    </event_body>
    <history>
      <event_header/>  --the application that raises the
                       --event may include a trail of
                       --Event Headers for audit purposes
    </history>
  </event>
</events> 
<events xmlns="http://ws.byu.edu/namespace/event-hub/v1">
  <event>
    <event_header>
      <domain>byu.edu</domain>
      <entity>AIM WaitListing</entity> 
      <event_type>Add Class</event_type>
      <source_dt>2014-03-02T10:24:13.68Z</source_dt>
      <event_dt>2014-03-02T10:24:13.79Z</event_dt>
      <source_id>3468493</source_id>
      <event_id>
        bfa5a232-dfe9-2cda-4bc5-ae3c22ea7231
      </event_id>
      <dispatch_id>
        bcd2e432-dfe8-3bcb-6a2a-ead9bbe586934
      </dispatch_id>
    </event_header>
    <filters>
      <filter>
        <filter_name>college</filter_name>
        <filter_value>1017</filter_value>
      </filter>
      <filter>
        <filter_name>department</filter_name>
        <filter_value>1326</filter_value>
      </filter>
      <filter>
         <filter_name>year_term</filter_name>
         <filter_value>20141</filter_value>
      </filter>
      <filter>
         <filter_name>curriculum_id</filter_name>
         <filter_value>06387</filter_value>
      </filter>
      <filter>
         <filter_name>title_code</filter_name>
         <filter_value>001</filter_value>
      </filter>
      <filter>
         <filter_name>teaching_area</filter_name>
         <filter_value>MATH</filter_value>
      </filter>
      <filter>
         <filter_name>catalog_number</filter_name>
         <filter_value>110</filter_value>
      </filter>
      <filter>
         <filter_name>section_number</filter_name>
         <filter_value>001</filter_value>
      </filter>
    </filters>
    <event_body>
      <person_id>585241162</person_id>
      <student_name>Ithaca, Bugs Bunny</student_name>
      <year_term>20141</year_term>
      <curriculum_id>06387</curriculum_id>
      <title_code>001</title_code>
      <section_number>001</section_number>
      <teaching_area>MATH</teaching_area>
      <catalog_number>110</catalog_number>
      <credit_hours>3.0</credit_hours>
    </event_body>
    <history>
      <event_header>
        <domain>byu.edu</domain>
        <entity>MyMap</entity>
        <event_type>Drop Class</event_type>
        <source_dt>2014-03-02T10:21:45.32Z</source_dt>
        <event_dt>2014-03-02T10:21:49.36Z</event_dt>
        <source_id>AB-45834</source_id>
        <event_id>
          cfa6a732-dce9-2bac-3bc5-ad3cff657231
        </event_id>
        <dispatch_id>
          bcd2e432-dfe8-3bcb-6a2a-ead9bbe586934
        </dispatch_id> 
      </event_header>           
    </history>
  </event>
</events> 
{
  "events": {
    "event": [
      {
        "event_header": {
          "domain": "byu.edu",
          "entity": "AIM WaitListing",
          "event_type": "Add Class",
          "source_dt": "2014-03-02T10:24:13.68Z",
          "event_dt": "2014-03-02T10:24:13.79Z",
          "source_id": "3468493",
          "event_id":
            "bfa5a232-dfe9-2cda-4bc5-ae3c22ea7231",
          "dispatch_id":
            "bcd2e432-dfe8-3bcb-6a2a-ead9bbe586934"
        },
        "filters": {
          "filter": [
            {
              "filter_name": "college",
              "filter_value": "1017"
            },
            {
              "filter_name": "department",
              "filter_value": "1326"
            },
            {
              "filter_name": "year_term",
              "filter_value": "20141"
            },
            {
              "filter_name": "curriculum_id",
              "filter_value": "06387"
            },
            {
              "filter_name": "title_code",
              "filter_value": "001"
            },
            {
              "filter_name": "teaching_area",
              "filter_value": "MATH"
            },
            {
              "filter_name": "catalog_number",
              "filter_value": "110"
            },
            {
              "filter_name": "section_number",
              "filter_value": "001"
            }
          ]
        },
        "event_body": {
          "person_id": "585241162", 
          "student_name": "Ithaca, Bugs Bunny",
          "year_term": "20141",
          "curriculum_id": "06387",
          "title_code": "001",
          "section_number": "001",
          "teaching_area": "MATH",
          "catalog_number": "110",
          "credit_hours": "3.0"
        },
        "history": {
          "event_header": [ 
            {
              "domain": "byu.edu",
              "entity": "MyMap",
              "event_type": "Drop Class",
              "source_dt": "2014-03-02T10:21:45.32Z",
              "event_dt": "2014-03-02T10:21:49.36Z",
              "source_id": "AB-45834",
              "event_id":
                "cfa6a732-dce9-2bac-3bc5-ad3cff657231",
              "dispatch_id":
                "bcd2e432-dfe8-3bcb-6a2a-ead9bbe586934"
            }
          ]
        }
      }
    ]
  }
}

Errors

none
Notes
  • The Event Hub returns the same messages until an 'Acknowledge Events' message is returned.
  • If there are no messages to be returned, an HTTP return code of '204' is returned.