Select to view content in your preferred language

WebhookManager available for AGOL?

503
2
Jump to solution
03-23-2023 11:40 AM
PhilLarkin1
Regular Contributor

When will WebhookManager be available for ArcGIS Online? Looks like it was released at 1.6.0 @KevinHibma ? 

Maybe there is another way to administer webhooks on hosted feature layers on AGOL using the Python API. Any help, ESRI Community? I was hoping to use the Python API but calling REST directly isn't a problem. 

PhilLarkin1_0-1679596071079.png

 

 

 

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
KevinHibma
Esri Regular Contributor

I believe you're correct it was added in 1.6. I'd suggest using at least 2.0 or higher as I know the team fixed some bugs with it.

Try this code snippet to create/manage webhooks

 


from arcgis.gis import GIS
from arcgis.features.layer import FeatureLayerCollection
 
gis = GIS("https://www.arcgis.com", "username", "password" )
 
# Find your layer item 
i= gis.content.search("webhook")
# I know I only have 1 feature layer named "Webhook" so I can cheat with the index
flc = FeatureLayerCollection.fromitem(i[0])

mgr = flc.manager
wh = mgr.webhook_manager
wh.create("My WEBHOOK", "https://webhook.site/aaabbb11223", "FeaturesCreated")



 

View solution in original post

0 Kudos
2 Replies
KevinHibma
Esri Regular Contributor

I believe you're correct it was added in 1.6. I'd suggest using at least 2.0 or higher as I know the team fixed some bugs with it.

Try this code snippet to create/manage webhooks

 


from arcgis.gis import GIS
from arcgis.features.layer import FeatureLayerCollection
 
gis = GIS("https://www.arcgis.com", "username", "password" )
 
# Find your layer item 
i= gis.content.search("webhook")
# I know I only have 1 feature layer named "Webhook" so I can cheat with the index
flc = FeatureLayerCollection.fromitem(i[0])

mgr = flc.manager
wh = mgr.webhook_manager
wh.create("My WEBHOOK", "https://webhook.site/aaabbb11223", "FeaturesCreated")



 

0 Kudos
PhilLarkin1
Regular Contributor

Gotta pull it from FeatureLayerCollection. Okie Dokie. Thank you! 

0 Kudos