Parameter substitution in webhook integration URL
-
I need to substitute a device name into the web hook URL where it says DEVICE_NAME below - is this possible?
https://webhook.site/b2b7af39-b94f-4677-9542-d8dd549476a2/api/v1/DEVICE_NAME/telemetry -
@ShanevanJ said in Parameter substitution in webhook integration URL:
https://webhook.site/b2b7af39-b94f-4677-9542-d8dd549476a2/api/v1/DEVICE_NAME/telemetry
"https://webhook.site/b2b7af39-b94f-4677-9542-d8dd549476a2/api/v1/{}/telemetry".format("MyDevice")Johan
-
@johand Thank you - I am a python noob so I should have guessed the solution would be pythonic ! (how do we add this to the documentation for the web hooks - would save a lot of time!)
-
@johand - Ah I was too quick here ...
The integration page shows the new url as this
Endpoint Address
https://webhook.site/b2b7af39-b94f-4677-9542-d8dd549476a2/apiv1/{}/telemetry.format(MyDevice)- No "{}"
and it won't accept with leading " marks either

-
@ShanevanJ Is this Pybytes webhook? I thought it was something you were doing on the device... Maybe you can post to your own service and there convert to a request with the device name in the url. I looks like there will be some kind of device id in the request body.
-
@johand Yes it is on pybytes - sorry for confusion - I am trying to move from particle.io platform and gain similar functionality. I will keep looking around for a solution
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login