POST
Use dark colors for code blocksCopy
1
/{orgId}/{itemId}/webhookConnections
Create webhook connection

Creates a webhook connection in Workflow Manager for a service webhook and optionally creates the service webhook for the specified service item.

Note:

  • If the service webhook creation attempt fails, a partial failure will be returned with additional error details.
  • See Webhooks in ArcGIS Online for the privileges required to create and manage service webhooks.

Webhook Connection Parameters:

ParameterDescriptionData Type
connectionNameRequired. Define the webhook connection name to be created.String
itemIdRequired. The service item ID for the webhook to be created. It must be accessible by the webhook connection creator, as well as the user designated to perform the action triggered by the webhook.String
webhookTypeRequired. The webhook type to be created. Only FeatureService is accepted.String
secretRequired. A secret key to be used when executing the service webhook.String
enabledRequired. 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 managed, the service webhook is activated or deactivated to match the value of enabled.Boolean
manageWebhookRequired. If true, Workflow Manager will attempt to create the webhook on the service item specified by the itemId.Boolean
webhookChangeTypesOptional. Specifies the events that will trigger the webhook to be created if manageWebhook is set to true. The accepted webhook events are FeaturesUpdated and FeaturesEdited. The webhookChangeTypes cannot be empty if manageWebhook is set to true.Array[String]
usernameOptional. 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
userTokenOptional. 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
fallbackUsernameOptional. Alternate user for webhook execution.String
fallbackUserTokenOptional. 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

NameTypeRequired
tokenstring¦null

Body parameters

Supported content types: application/json

Type: WebhookConnection

Webhook connection object

NameTypeRequired
connectionNamestring
itemIdstring
webhookTypestring
secretstring
enabledboolean
manageWebhookboolean
webhookChangeTypes[string]¦null
usernamestring¦null
userTokenstring¦null
fallbackUsernamestring¦null
fallbackUserTokenstring¦null

webhookType

Enumerated values

FeatureService
Click to copy

webhookChangeTypes

Enumerated values

FeaturesUpdated
Click to copy
FeaturesEdited
Click to copy

Path parameters

NameTypeRequired
orgIdstring
itemIdstring

Response status

StatusMeaningDescriptionSchema
200OK

success

WebhookConnectionSuccessResponse
400Bad Request

invalid object

WorkflowJsonExceptionDTO

Examples

Request

Use dark colors for code blocksCopy
1
2
3
4
5
# You can also use wget
curl -X POST '/{orgId}/{itemId}/webhookConnections' \
  -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

Use dark colors for code blocksCopy
1
2
3
4
5
6
{
  "success": true,
  "connectionId": "string",
  "message": "string",
  "name": "UnableToDetermineHostingServer"
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.