For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.
Push Webhooks (PUT)
Updates an existing webhook.
Method
PUT
Path
/apps/applicationId/webhooks/webhookName
Example
https://example.com:443/imfpush/v1/apps/myapp/webhooks/mywebhook
Path Parameters
- applicationId
- The name or identifier of the application
- webhookName
- The identifier of the webhook
Header Parameters
Some header parameters are optional.
- Accept-Language
- (Optional) The preferred language to use for error messages. Default:en-US
- Authorization
- The token with the scope "webhooks.write" and "push.application.<applicationId>" obtained using the confidential client in the format Bearer token.. This parameter has to be mandatorily set.
- Content-Type
- Specify the JSON content type. For example: application/json. This parameter has to be mandatorily set.
Produces
application/json
Payload
The details of the webhook.
JSON Example
{ "eventTypes" : "onDeviceRegister,onDeviceUpdate,onDeviceUnregister,onSubscribe,onUnsubscribe", "name" : "SampleWebhook", "url" : "http://samplewebhook.com", }
Payload Properties
The payload has the following properties:
- eventTypes
- The list of event types comma separated
- name
- An unique name of the webhook in the application
- url
- The url of the webhook
Response
The details of the webhook.
JSON Example
{ "eventTypes" : "onDeviceRegister,onDeviceUpdate,onDeviceUnregister,onSubscribe,onUnsubscribe", "name" : "SampleWebhook", "url" : "http://samplewebhook.com", }
Response Properties
The response has the following properties:
- eventTypes
- The list of event types comma separated
- name
- An unique name of the webhook in the application
- url
- The description of the webhook
Errors
400Bad Request - The request was not understood by the push server. An invalid JSON could result in this error code.401
Unauthorized - The caller is either not authenticated or not authorized to make this request.404
The webhook does not exist.405
Unsupported Content type - The content type specified in Content-Type header is not application/json.406
Unsupported Accept type - The content type specified in Accept header is not application/json.500
An internal error occurred.
Parent topic: REST API for the MobileFirst Server push service