Description Modifies the URL and/or settings associated with my Webhook. The Event Hub will push Events to the new URL.
  • More on Event Messages
URL Structure
{Base URL}/webhooks
HTTP Method PUT  
Authentication Required  
Request Headers none
Parameters none  

Request Body

<webhook xmlns="http://ws.byu.edu/namespace/event-hub/v1">
   <identity_id/>       --leave blank
   <identity_name/>     --leave blank
   <endpoint/>          --required
   <push_option/>       --required 
   <security_option/>   --required
   <security_key/>      --leave blank
   <content_type/>      --required
</webhook>
<webhook xmlns="http://ws.byu.edu/namespace/event-hub/v1">
   <identity_id/>
   <identity_name/>
   <endpoint>https://hr.byu.edu/example/endpoint</endpoint>
   <push_option>Push Message</push_option>
   <security_option>HMAC</security_option>
   <security_key/>
   <content_type/>
</webhook>
{
  "webhook": {
    "endpoint": "https://hr.byu.edu/example/endpoint",
    "push_option": "Push Message",
    "security_option": "HMAC",
    "content_type": "application/json"
   }
} 
Returns
<webhook xmlns="http://ws.byu.edu/namespace/event-hub/v1">
   <identity_id/>       --from authentication or request
   <identity_name/>     --retrieved from PRO
   <endpoint/>          --from request
   <push_option/>       --from request 
   <security_option/>   --from request
   <security_key/>      --supplied by Event Hub
   <content_type/>      --from request
</webhook>
<webhook xmlns="http://ws.byu.edu/namespace/event-hub/v1">
   <identity_id>388211692</identity_id>
   <identity_name>HR Benefits System</identity_name>
   <endpoint>https://hr.byu.edu/example/endpoint</endpoint>
   <push_option>Push Message</push_option>
   <security_option>HMAC</security_option>
   <security_key>22a4b85c945ef423</security_key>
   <content_type>application/json</content_type>
</webhook>
{
  "webhook": {
    "identity_id": "388211692",
    "identity_name": "HR Benefits System",
    "endpoint": "https://hr.byu.edu/example/endpoint",
    "push_option": "Push Message",
    "security_option": "HMAC",
    "security_key": "22a4b85c945ef423",
    "content_type": "application/json"
  }
} 

Errors

Return Code Additional Explanation
401 Only Event Hub Administrators may modify a Webhook for another Entity.
404 Webhook was never defined.
409 Invalid Push Option requested - select 'HMAC' or 'None'
409 Invalid Security Option requested - only 'HMAC' or 'None' is currently supported
409 Invalid Content Type requested - only 'application/json' and 'application/xml' supported
<fault_message xmlns="http://ws.byu.edu/namespace/event-hub/v1">
  <return_code/>   -- http return code
  <explanation/>   -- see the table above
  <error_data/>    -- from request
</fault_message>
<fault_message xmlns="http://ws.byu.edu/namespace/event-hub/v1">
   <return_code>409</return_code>
   <explanation>
      Invalid Push Option requested - select 'Push Message' or 'Push Alert'
   </explanation>
   <error_data>Push Notification</error_data>
</fault_message>
{
  "fault_message": {
    "return_code": "409",
    "explanation": 
      "Invalid Push Option requested - select 'Push Message' or 'Push Alert'",
    "error_data": "Push Notification"
  }
}
Notes

This service may be invoked by an Event Hub administrator in behalf of an Event Consuming Application.

The URL Structure is modified in the following fashion:

{Base URL}/webhooks/{identity_id}

The identity_id is currently defined as the person_id associated with the Event Consuming Application.