Introduction
The Callback Resource provides event-driven interoperability between Compendium Blogware and other applications. In software development, the term callback refers to a pre-specified operation that should take place as the side effect of the occurrence of an event. Within the context of Compendium Blogware, a callback is implemented as an HTTP POST operation to a pre-specified URL hosted by a third party, usually the owner of the network or an OEM partner. The request contains data about the event itself as well as data to verify the authenticity of the message.
To employ the Callback resource, an organization with a blog network must do the following:
POST request.The rest of this document is devoted to a discussion of the implementation details. In the discussion that follows, the term event request refers to the HTTP request submitted by Compendium Blogware to a third party web server, containing data about the occurrence of an event.
Event Types
Resource operations which fire events will have information about those events and their payloads in their reference documentation.
Callback Management
Compendium Blogware provides a Callback resource for adding and removing callbacks as well as retrieving information about existing callbacks on an individual or group basis.
Only JSON is supported as an output type for callback management operations. This SHOULD be specified via the HTTP Accept header, but it can also be made via the URI, e.g. /app/callback/json.
Registration requests require that an access key be available for the user making the request. Keys are available only to networks where API access is enabled. Contact your account manager to learn more about getting access to this feature.
Callback Descriptors
Information about a callback's parameters is expressed as a callback descriptor. This structure is used both in registration of new callbacks and retrieval of information about existing callbacks. The callback descriptor specifies any number of required attributes for successfully executing the callback. The validity of the descriptor is dependent upon the callback version number.
Variable substitution is supported in the descriptor, use the format $VariableName where VariableName is the name of the variable to substitute. Variable names and their potential values are documented at each service endpoint. If a field in the callback descriptor can use variable replacement it is noted in the version format specifier below.
Version 1 Callback Descriptor Format
| Field | Type | Description |
|---|---|---|
CallbackUrl |
string |
URL to which Compendium will submit the notification message. Can use variable substitution. |
ContentType |
string |
A MIME media type specifying how the callback data is to be serialized. |
Version 2 Callback Descriptor Format
This version is not currently supported, but will be in subsequent releases.
| Field | Type | Description |
|---|---|---|
CallbackType |
string |
asynchronous or synchronous |
CallbackUrl |
string |
URL to which we will post the notification format. Can use variable substitution. |
ContentType |
string |
A MIME media type specifying how the callback data is to be serialized. |