1. Overview
The Webhook Configuration Service Meta API provides RESTful endpoints to create, read, update, and remove webhook configurations. For more information, see Webhook Configurations
1.1. Version information
Version : 1.0.0
1.2. URI scheme
Host : localhost:9002
BasePath : /odata2webservices/WebhookService
Schemes : HTTPS
1.3. Tags
-
Metadata : Requests for EDMX documents. The metadata is an Entity Data Model XML (EDMX) document that describes the entity types and their properties.
-
Webhook Configurations : Requests for information about Webhook Configurations that exist in the system.
1.4. Consumes
-
application/json
1.5. Produces
-
application/json
1.6. External Docs
Description : WebhookService Convenience API
URL : https://help.sap.com/viewer/50c996852b32456c96d3161a95544cdb/latest/en-US/a39142a1e6fb4c6780d8c0781fe06117.html
2. Paths
2.1. View the EDMX document for WebhookService Webhook Configurations
GET /$metadata
2.1.1. Description
Requests for EDMX documents. The metadata is an Entity Data Model XML (EDMX) document that describes the entity types and their properties.
2.1.2. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
A valid EDMX schema. |
No Content |
401 |
Unauthorized exception responses |
|
403 |
Forbidden exception responses |
2.1.3. Produces
-
application/xml
2.1.4. Tags
-
Metadata
2.2. Create/Update WebhookConfigurations.
POST /WebhookConfigurations
2.2.1. Description
Creates a new Webhook Configuration or updates an existing Webhook Configuration if a corresponding one is found. For more information about the post behavior see Webhook Configuration Examples
2.2.2. Parameters
Type | Name | Description | Schema |
---|---|---|---|
Header |
Post-Persist-Hook |
The execute method for the PostPersistHook invokes right after the item persists in the SAP Commerce platform. For more details see Persistence Hooks |
string |
Header |
Pre-Persist-Hook |
The execute method for the PrePersistHook invokes right before the Webhook Configuration sent in the POST or PATCH request persists in the SAP Commerce platform. For more details see Persistence Hooks |
string |
Header |
integrationMessageId |
The integrationMessageId header allows the user to trace any InboundRequest back to the original POST, PATCH or DELETE request. |
string |
Body |
body |
2.2.3. Responses
HTTP Code | Description | Schema |
---|---|---|
201 |
Indicates the Webhook Configuration has been successfully created/updated. |
|
400 |
Error responses that may occur due to an error occurring during an attempt to create a new Item. |
|
401 |
Unauthorized exception responses |
|
403 |
Forbidden exception responses |
|
415 |
Provided Media-Type is not supported |
2.2.4. Consumes
-
application/json
2.2.5. Produces
-
application/json
2.2.6. Tags
-
Webhook Configurations
2.2.7. Example HTTP response
Response 400
{
"error" : {
"code" : "invalid_key",
"message" : {
"lang" : "en",
"value" : "Key [payloadKey] in the payload does not match the key [pathKey] in the path."
}
}
}
Response 401
{
"error" : {
"code" : "unauthorized",
"message" : {
"lang" : "en",
"value" : "user must be authenticated"
}
}
}
Response 403
{
"error" : {
"code" : "forbidden",
"message" : {
"lang" : "en",
"value" : "user is not authorized for the operation"
}
}
}
Response 415
{
"error" : {
"code" : "null",
"message" : {
"lang" : "en",
"value" : "Media type [application/x-www-form-urlencoded] is not supported."
}
}
}
2.3. View WebhookConfigurations.
GET /WebhookConfigurations
2.3.1. Description
View details about WebhookConfigurations.
2.3.2. Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
$expand |
Specifies navigation properties for associated entries that will be inlined in the response body. By default, these navigation properties are represented as deferred links pointing to the item resource. See $expand |
string |
Query |
$filter |
A predicate expression for selecting a subset of the items identified by the resource path. See $filter |
string |
Query |
$inlinecount |
Specifies if the total number of items should be included in the response. See $inlinecount |
enum (allpages, none) |
Query |
$skip |
The number of matching items to skip over before returning the result set. If skip is larger than the number of matching items then no items will be returned. See $skip |
integer (int32) |
Query |
$top |
The maximum number of items to return. If it’s greater than or equal to the number of matching items existing in the platform, then all items will be returned. If it’s less than the number of matching items in the platform, a subset containing top number of items will be returned. See $top |
integer (int32) |
2.3.3. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
A collection of 0 or more WebhookConfigurations. |
|
400 |
Error responses that may occur due to an exception related to the filter query parameter. |
|
401 |
Unauthorized exception responses |
|
403 |
Forbidden exception responses |
|
404 |
Not Found exception responses for GET operations. |
2.3.4. Produces
-
application/json
2.3.5. Tags
-
Webhook Configurations
2.3.6. Example HTTP response
Response 400
{
"error" : {
"code" : "filter_not_supported",
"message" : {
"lang" : "en",
"value" : "Nested filter [destination/url] of more than one level is not supported."
}
}
}
Response 401
{
"error" : {
"code" : "unauthorized",
"message" : {
"lang" : "en",
"value" : "user must be authenticated"
}
}
}
Response 403
{
"error" : {
"code" : "forbidden",
"message" : {
"lang" : "en",
"value" : "user is not authorized for the operation"
}
}
}
Response 404
{
"error" : {
"code" : "null",
"message" : {
"lang" : "en",
"value" : "Could not find property with name: 'nonExistingItemAttributeName'."
}
}
}
2.4. View an individual WebhookConfiguration.
GET /WebhookConfigurations('{integrationKey}')
2.4.1. Description
Retrieves an WebhookConfiguration by its integrationKey.
2.4.2. Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
integrationKey |
key: integrationKey |
string |
Query |
$expand |
Specifies navigation properties for associated entries that will be inlined in the response body. By default, these navigation properties are represented as deferred links pointing to the item resource. See $expand |
string |
2.4.3. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success response with the retrieved WebhookConfiguration. |
|
400 |
Error responses that may occur when a DELETE request is made in an attempt to delete an item. |
|
401 |
Unauthorized exception responses |
|
403 |
Forbidden exception responses |
|
404 |
Not Found exception responses for GET operations. |
2.4.4. Produces
-
application/json
2.4.5. Tags
-
Webhook Configurations
2.4.6. Example HTTP response
Response 400
{
"error" : {
"code" : "invalid_key",
"message" : {
"lang" : "en",
"value" : "The integration key [0215Cssss%7C] is invalid. Please consult the IntegrationKey definition of [WebhookConfiguration] for configuration details."
}
}
}
Response 401
{
"error" : {
"code" : "unauthorized",
"message" : {
"lang" : "en",
"value" : "user must be authenticated"
}
}
}
Response 403
{
"error" : {
"code" : "forbidden",
"message" : {
"lang" : "en",
"value" : "user is not authorized for the operation"
}
}
}
Response 404
{
"error" : {
"code" : "not_found",
"message" : {
"lang" : "en",
"value" : "[WebhookConfiguration] with integration key [CDId|DestTargetId|IOCode|WebhookConfigEventType] was not found."
}
}
}
2.5. Delete an WebhookConfiguration.
DELETE /WebhookConfigurations('{integrationKey}')
2.5.1. Description
Deletes the WebhookConfiguration with the corresponding integrationKey.
2.5.2. Parameters
Type | Name | Description | Schema |
---|---|---|---|
Header |
integrationMessageId |
The integrationMessageId header allows the user to trace any InboundRequest back to the original POST, PATCH or DELETE request. |
string |
Path |
integrationKey |
key: integrationKey |
string |
2.5.3. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Indicates that the Webhook Configuration was successfully deleted. |
No Content |
400 |
Error responses that may occur when a DELETE request is made in an attempt to delete an item. |
|
401 |
Unauthorized exception responses |
|
403 |
Forbidden exception responses |
|
404 |
Not Found exception responses for PATCH and DELETE operations. |
2.5.4. Produces
-
application/json
2.5.5. Tags
-
Webhook Configurations
2.5.6. Example HTTP response
Response 400
{
"error" : {
"code" : "invalid_key",
"message" : {
"lang" : "en",
"value" : "The integration key [0215Cssss%7C] is invalid. Please consult the IntegrationKey definition of [WebhookConfiguration] for configuration details."
}
}
}
Response 401
{
"error" : {
"code" : "unauthorized",
"message" : {
"lang" : "en",
"value" : "user must be authenticated"
}
}
}
Response 403
{
"error" : {
"code" : "forbidden",
"message" : {
"lang" : "en",
"value" : "user is not authorized for the operation"
}
}
}
Response 404
{
"error" : {
"code" : "not_found",
"message" : {
"lang" : "en",
"value" : "[WebhookConfiguration] with integration key [CDId|DestTargetId|IOCode|WebhookConfigEventType] was not found."
}
}
}
2.6. Update an existing WebhookConfiguration.
PATCH /WebhookConfigurations('{integrationKey}')
2.6.1. Description
Updates the WebhookConfiguration with the corresponding integrationKey. For more information about the patch behavior see Webhook Configuration Examples
2.6.2. Parameters
Type | Name | Description | Schema |
---|---|---|---|
Header |
Post-Persist-Hook |
The execute method for the PostPersistHook invokes right after the item persists in the SAP Commerce platform. For more details see Persistence Hooks |
string |
Header |
Pre-Persist-Hook |
The execute method for the PrePersistHook invokes right before the Webhook Configuration sent in the POST or PATCH request persists in the SAP Commerce platform. For more details see Persistence Hooks |
string |
Header |
integrationMessageId |
The integrationMessageId header allows the user to trace any InboundRequest back to the original POST, PATCH or DELETE request. |
string |
Path |
integrationKey |
key: integrationKey |
string |
Body |
body |
2.6.3. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Indicates the Webhook Configuration has been successfully updated. |
|
400 |
Error responses that may occur when a PATCH request is made in an attempt to update an item. |
|
401 |
Unauthorized exception responses |
|
403 |
Forbidden exception responses |
|
404 |
Not Found exception responses for PATCH and DELETE operations. |
|
415 |
Provided Media-Type is not supported |
2.6.4. Consumes
-
application/json
2.6.5. Produces
-
application/json
2.6.6. Tags
-
Webhook Configurations
2.6.7. Example HTTP response
Response 400
{
"error" : {
"code" : "invalid_key",
"message" : {
"lang" : "en",
"value" : "The integration key [0215Cssss%7C] is invalid. Please consult the IntegrationKey definition of [WebhookConfiguration] for configuration details."
}
}
}
Response 401
{
"error" : {
"code" : "unauthorized",
"message" : {
"lang" : "en",
"value" : "user must be authenticated"
}
}
}
Response 403
{
"error" : {
"code" : "forbidden",
"message" : {
"lang" : "en",
"value" : "user is not authorized for the operation"
}
}
}
Response 404
{
"error" : {
"code" : "not_found",
"message" : {
"lang" : "en",
"value" : "[WebhookConfiguration] with integration key [CDId|DestTargetId|IOCode|WebhookConfigEventType] was not found."
}
}
}
Response 415
{
"error" : {
"code" : "null",
"message" : {
"lang" : "en",
"value" : "Media type [application/x-www-form-urlencoded] is not supported."
}
}
}
2.7. View the total count of all WebhookConfigurations.
GET /WebhookConfigurations/$count
2.7.1. Description
Displays the total count of all WebhookConfigurations.
2.7.2. Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
A success response displaying the total count of WebhookConfigurations. |
string |
2.7.3. Produces
-
text/plain
2.7.4. Tags
-
Webhook Configurations
3. Definitions
3.1. $inlinecount
Type : enum (allpages, none)
3.2. BasicCredential
Name | Schema |
---|---|
id |
string |
password |
string |
username |
string |
3.3. CollectionofWebhookConfigurations
Name | Schema |
---|---|
results |
< WebhookConfiguration > array |
3.4. ConsumedDestination
Name | Schema |
---|---|
additionalProperties |
|
credentialBasic |
|
credentialConsumedOAuth |
|
destinationTarget |
|
endpoint |
|
id |
string |
url |
string |
3.5. ConsumedOAuthCredential
Name | Schema |
---|---|
clientId |
string |
clientSecret |
string |
id |
string |
3.6. DestinationChannel
Name | Schema |
---|---|
code |
string |
3.7. DestinationTarget
Name | Schema |
---|---|
destinationChannel |
|
eventConfigurations |
< EventConfiguration > array |
id |
string |
3.8. Endpoint
Name | Schema |
---|---|
id |
string |
name |
string |
specUrl |
string |
version |
string |
3.9. Error
Name | Schema |
---|---|
code |
string |
innererror |
string |
message |
3.10. EventConfiguration
Name | Schema |
---|---|
destinationTarget |
|
eventClass |
string |
exportName |
string |
3.11. IntegrationObject
Name | Schema |
---|---|
code |
string |
3.12. Message
Name | Schema |
---|---|
lang |
string |
value |
string |
3.13. String2StringMapType
Name | Schema |
---|---|
key |
string |
value |
string |
3.14. WebhookConfiguration
Name | Schema |
---|---|
destination |
|
eventType |
string |
filterLocation |
string |
integrationObject |
3.15. Wrapper
Name | Schema |
---|---|
d |
3.16. Wrapper1
Name | Schema |
---|---|
d |
3.17. errorResponseObj
Name | Schema |
---|---|
error |
4. Security
4.1. auth
Type : basic