PUT
/{orgId}/{itemId}/webhookConnections/{connectionId}Updates a webhook connection in Workflow Manager for a service webhook and optionally updates the webhook for the specified service item.
Note:
- If the service webhook update attempt fails, a partial failure will be returned with additional error details.
- See Webhooks in ArcGIS Online for the privileges required to manage service webhooks.
Webhook Connection Parameters to update:
| Parameter | Description | Data Type |
|---|---|---|
| connectionName | Required. The webhook connection name to be updated. | String |
| itemId | Required. The service item ID for the existing webhook in the updated webhook connection. It cannot be modified once the webhook connection is created. | String |
| webhookType | Required. The webhook type to be updated. Only FeatureService is accepted. | String |
| secret | Required. A secret key to be used when executing the service webhook. | String |
| enabled | Required. If enabled is set to true, incoming webhooks will be processed by Workflow Manager. If enabled is set to false, Workflow Manager will not process incoming webhooks. Additionally, if manageWebhook is true and the service webhook can be updated, the service webhook is activated or deactivated to match the value of enabled. | Boolean |
| manageWebhook | Required. If true, Workflow Manager will attempt to update the webhook on the service item specified by the itemId. | Boolean |
| webhookChangeTypes | Optional. Specifies the events that will trigger the associated service webhook if manageWebhook is set to true. The accepted webhook events to be updated are FeaturesUpdated and FeaturesEdited. The webhookChangeTypes cannot be empty if manageWebhook is set to true. | Array[String] |
| username | Optional. The username of the user who will be performing the action triggered by the webhook. If not provided, the action will be performed as the requesting user. The user must agree to their credentials being used for webhook execution by providing their token at the time of the request. | String |
| userToken | Optional. Access token for the user as whom automated actions triggered by webhooks will be executed. If other webhook connections exist in the workflow item where the same user provided their token, then the user no longer needs to provide their token. | String |
| fallbackUsername | Optional. Alternate user for webhook execution. | String |
| fallbackUserToken | Optional. Access token for the fallback user. Like the primary user, the fallback user must only provide their token once per workflow item to opt-in. | String |
Query parameters
| Name | Type | Required |
|---|---|---|
token | string¦null |
Body parameters
Supported content types: application/json
Type: WebhookConnection
Webhook connection object
| Name | Type | Required |
|---|---|---|
connection | string | |
item | string | |
webhookType | string | |
secret | string | |
enabled | boolean | |
manage | boolean | |
webhookChangeTypes | [string]¦null | |
username | string¦null | |
user | string¦null | |
fallback | string¦null | |
fallback | string¦null |
Path parameters
| Name | Type | Required |
|---|---|---|
connection | string | |
org | string | |
item | string |
Response status
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | success | WebhookConnectionSuccessResponse |
| 400 | Bad Request | invalid object | WorkflowJsonExceptionDTO |
| 404 | Not Found | error | WorkflowExceptionDTO |
Examples
Request
# You can also use wget
curl -X PUT '/{orgId}/{itemId}/webhookConnections/{connectionId}' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN>' \
--data '{"connectionName":"string","itemId":"string","webhookType":"FeatureService","secret":"string","enabled":true,"manageWebhook":true,"webhookChangeTypes":["FeaturesUpdated"],"username":"string","userToken":"string","fallbackUsername":"string","fallbackUserToken":"string"}'Response
{
"success": true,
"connectionId": "string",
"message": "string",
"name": "UnableToDetermineHostingServer"
}