Description

Defines a new Domain. We are using Internet accepted domains. Event Types are grouped in Domains and then Entities.

This makes the new Domain visible on the Administrative Portal. The Administrative Portal is used by developers to manage their subscriptions.

 
URL Structure
{Base URL}/domains
HTTP Method POST  
Authentication Required  
Request Headers none
Parameters none  
Request Body
<domain_definition xmlns="http://ws.byu.edu/namespace/event-hub/v1">
   <domain/>              --required
   <description/>         --optional
</domain_definition>
<domain_definition xmlns="http://ws.byu.edu/namespace/event-hub/v1">
   <domain>byu.edu</domain>          
   <description>Brigham Young University</description>  
</domain_definition>
{
  "domain_definition": {
    "domain": "byu.edu",
    "description": "Brigham Young University"
   }
}
Returns
<domain_definition xmlns="http://ws.byu.edu/namespace/event-hub/v1">
   <domain/>         --from request
   <description/>    --from request
</domain_definition>
<domain_definition xmlns="http://ws.byu.edu/namespace/event-hub/v1">
   <domain>byu.edu</domain>          
   <description>Brigham Young University</description>
</domain_definition>
{
  "domain_definition": {
    "domain": "byu.edu",
    "description": "Brigham Young University"
  }
}

Errors

Return Code Additional Explanation
400 Missing Key Value
409 Domain already exists.
<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>403</return_code>
   <explanation>
      Domain already exists
   </explanation>
   <error_data>byu.edu</error_data>
</fault_message>
{
  "fault_message": {
    "return_code": "409",
    "explanation": "Domain already exists",
    "error_data": "byu.edu"
  }
}
Notes A domain may only be defined by an Event Hub administrator.