Activity Webhook REST API Interface
Resource URL Summary
Activity Export Notification
POST <REST Endpoint URI>/Activities/
HTTP Headers
ServiceMobility will set both of the Standard HTTP Headers when calling this REST API Interface.
That is:
- The
Content-Type
header will be set toapplication/json
; and - The
x-access-token
header will be set to the JWT that was used in the call to the API that triggered ServiceMobility to call the configured endpoint that implements this interface.
The x-access-token
header will either be the JWT issued by ServiceMobility, or by the endpoint that implements the Authentication REST API Interface that ServiceMobility has been configured to use.
Implementations of this interface may evaluate the JWT supplied, if required, but please note that ServiceMobility will have already authenticated the JWT in the initial API call before passing the call on to the configured endpoint.
API Specifics
Activity Export Notification
URL
POST <REST Endpoint URI>/Activities/
HTTP Request Body
The HTTP request body will contain a valid Webhook Request Object. Within the data
property of the Webhook Request Object will be a valid Activity Export API Object.
Webhook Request Object Formats
Webhook Request Object Properties
Required properties are in bold.
Property | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id | string | ID representing this unique payload. Subsequent requests with duplicate IDs should be disregarded. | ||||||||||||||||||||
type | string | The object type represented by the data field. Valid values are:
| ||||||||||||||||||||
specversion | string | The CloudEvents spec version that this payload complies with. | ||||||||||||||||||||
source | string | The ID of the webhook that generated this message. | ||||||||||||||||||||
subject | string | Not used. | ||||||||||||||||||||
time | string | Time that this webhook execution was generated. | ||||||||||||||||||||
datacontenttype | string | The format of the data object. Valid values are:
| ||||||||||||||||||||
action | string | Additional information and context for this webhook call. | ||||||||||||||||||||
data | object | The data payload, matching the format of the object type specified in
|
Activity Export Notification Object
HTTP Response
Response Codes
HTTP Code | Description |
---|---|
200 | OK. The Activity request was received successfully. |
401 | Invalid Logon. |
500 | Server error. An error occurred while processing the request. The HTTP response body should have more details as to the possible cause. |
On success, an HTTP response code of 200 must be returned.