Description

Allows a business application to raise one or more events to the Event Hub.

The Event Message(s) is included in the Request Body of the HTTP message.

  • More on Event Messages
URL Structure
{Base URL}/events
HTTP Method POST  
Authentication Required  
Request Headers none
Parameters none  
Request Body
<events xmlns="http://ws.byu.edu/namespace/event-hub/v1">
  <event>  --Repeat this block to submit more than 1 event
    <event_header>
      <domain/>        --required
      <entity/>        --required 
      <event_type/>    --required
      <source_dt/>     --suggested
      <event_dt/>      --leave blank
      <source_id/>     --optional
      <event_id/>      --leave blank
      <dispatch_id/>   --leave blank
    </event_header>
    <filters>
      <filter>   --name:value pairs defined by Event Type
        <filter_name/>
        <filter_value/>
      </filter>
    </filters>
    <event_body>
			-- valid XML,4000 characters max
            -- place non-conforming xml in CDATA block
    </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>edu.byu</domain>
      <entity>AIM WaitListing</entity>
      <event_type>Add Class</event_type>
      <source_dt>2014-05-11T13:45:53.20Z</source_dt>
      <event_dt></event_dt>
      <source_id>3468493</source_id>
      <event_id></event_id>
      <dispatch_id></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>edu.byu</domain>
        <entity>MyMap</entity>
        <event_type>Drop Class</event_type>
        <source_dt>2014-05-11T13:45:52.68Z</source_dt>
        <event_dt>2014-05-11T13:45:53.09Z</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": "edu.byu",
          "entity": "AIM WaitListing",
          "event_type": "Add Class",
          "source_dt": "2014-05-11T13:45:53.20Z",
          "source_id": "3468493"
        },
        "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": "edu.byu",
              "entity": "MyMap",
              "event_type": "Drop Class",
              "source_dt": "2014-05-11T13:45:52.68Z",
              "event_dt": "2014-05-11T13:45:53.09Z",
              "source_id": "AB-45834",
              "event_id":
                "cfa6a732-dce9-2bac-3bc5-ad3cff657231",
              "dispatch_id":
                "bcd2e432-dfe8-3bcb-6a2a-ead9bbe586934"
            }
          }
        ]  
      }
    ]
  }
}

VERSION 3 
{
  "events": {
    "event": [
      {
        "event_header": {
          "domain": "edu.byu",
          "entity": "AIM WaitListing",
          "event_type": "Add Class"
        },
		"anything_json" : "could be anything you want "
	  }
		]
	}
}
Returns
<events_return xmlns="http://ws.byu.edu/namespace/event-hub/v1">
   <event_return>
      <domain></domain>            --from request
      <entity></entity>            --from request
      <event_type></event_type>    --from request
      <source_dt></source_dt>      --from request
      <event_dt></event_dt>        --supplied by Event Hub
      <source_id></source_id>      --from request
      <event_id></event_id>        --generated by Event Hub
      <return_code></return_code>  --see Errors
   </event_return>
</events_return> 
<events_return xmlns="http://ws.byu.edu/namespace/event-hub/v1">
   <event_return>
      <domain>edu.byu</domain>
      <entity>AIM WaitListing</entity>
      <event_type>Add Class</event_type>
      <source_dt>2014-05-11T13:45:53.20Z</source_dt>
      <event_dt>2014-05-11T13:46:01.43Z</event_dt>
      <source_id>3468493</source_id>
      <event_id>
        cea9a774-dfe8-4dfd-8a2a-bb2edc984407
      </event_id>
      <return_code>200</return_code>
   </event_return>
</events_return> 
{
  "events_return": {
    "event_return": [
      {
        "domain": "edu.byu",
        "entity": "AIM WaitListing",
        "event_type": "Add Class",
        "source_dt": "2014-05-11T13:45:53.20Z",
        "event_dt": "2014-05-11T13:46:01.43Z",
        "source_id": "3468493",
        "event_id":
          "cea9a774-dfe8-4dfd-8a2a-bb2edc984407",
        "return_code": "200"
      }
    ]
  }
}
 

Errors

Return Code Additional Explanation
401 EGA is not authorized to raise events with this Entity attribute.
<events_return xmlns="http://ws.byu.edu/namespace/event-hub/v1">
   <event_return>
      <domain>edu.byu</domain>
      <entity>AIM WaitListing</entity>
      <event_type>Add Class</event_type>
      <source_dt>2014-05-11T13:45:53.20Z</source_dt>
      <event_dt>2014-05-11T13:46:01.43Z</event_dt>
      <source_id>3468493</source_id>
      <event_id>
         cea9a774-dfe8-4dfd-8a2a-bb2edc984407
      </event_id>
      <return_code>200</return_code>
   </event_return>
   <event_return>
      <domain>edu.byu</domain>
      <entity></entity>
      <event_type>Drop Class</event_type>
      <source_dt>2014-05-11T13:45:53.20Z</source_dt>
      <event_dt></event_dt>
      <source_id>58493852</source_id>
      <event_id></event_id>
      <return_code>400</return_code>
   </event_return> 
   <event_return>
      <domain>edu.byu</domain>
      <entity>Independent Study</entity>
      <event_type>Add Class</event_type>
      <source_dt>2014-05-11T13:45:53.20Z</source_dt>
      <event_dt></event_dt>
      <source_id>74838472</source_id>
      <event_id></event_id>
      <return_code>401</return_code>
   </event_return>
</events_return> 
{
  "events_return": {
    "event_return": [
      {
        "domain": "edu.byu",
        "entity": "AIM WaitListing",
        "event_type": "Add Class",
        "source_dt": "2014-05-11T13:45:53.20Z",
        "event_dt": "2014-05-11T13:46:01.43Z",
        "source_id": "3468493",
        "event_id": 
          "cea9a774-dfe8-4dfd-8a2a-bb2edc984407",
        "return_code": "200"
      },
      {
        "domain": "edu.byu",
        "event_type": "Drop Class",
        "source_dt": "2014-05-11T13:45:53.20Z",
        "source_id": "58493852",
        "return_code": "400"
      },
      {
        "domain": "edu.byu",
        "entity": "Independent Study",
        "event_type": "Add Class",
        "source_dt": "2014-05-11T13:45:53.20Z",
        "source_id": "74838472",
        "return_code": "401"
      }
    ]
  }
}
Notes
  • There is not a separate fault message on errors. They are returned as part of the normal response message.
  • In the instance where multiple events are raised in the same HTTP request and they have different return codes, the HTTP return code for the entire HTTP request will be a '207'.
  • There is almost no edits performed on incoming messages. The required attributes of the Event Header must be correctly formed in order to properly route the messages, but there is no check that the values of the attributes are "correct".
  • We do check the Entity attribute to make sure that the EGA is authorized to raise the event.