apprise-api icon indicating copy to clipboard operation
apprise-api copied to clipboard

Third Party Webhook Support - JSON sub-string re-map support

Open oopen opened this issue 1 year ago • 3 comments

:bulb: The Idea

Support re-mapping sub-key of JSON

For exemple to support Scoold webhook format described here

{"appid":"scoold","event":"update","items":[{"id":"tag:acpi","timestamp":1486848081865,"type":"tag","appid":"scoold","updated":1561644547996,"name":"ParaObject tag:acpi","votes":2,"version":0,"stored":true,"indexed":true,"cached":true,"tag":"acpi","count":1,"objectURI":"/tags/acpi","plural":"tags"}],"timestamp":1561644548430}

We need to access the JSON sub-key, witch is a Object contain in a Array

:hammer: Breaking Feature

It will be great to re-map with sub-keys of the JSON. For example we would like to access to the key items[0].objectURI

Call URL will be in this case :

http://apprise/notify/{KEY}?:appid=title&:items[0].objectURI=body

oopen avatar Sep 15 '24 01:09 oopen

Would it be easier to just create a scoold:// plugin for you (add it into what is already supported) and do the mapping for you? Or maybe call it para:// to follow the common structure?

You're request though may be possible to do as well.

Thoughts?

caronc avatar Sep 15 '24 02:09 caronc

I'm not sure to understand.

The goal is to permit Scoold (or para apps) to call by webhook apprise, to permit Scoold send notifications. Not apprise to call Scoold, via plugin para:// or scoold://

In this case, it will not necessary to make a apprise plugin ?

It think, it will be better to have the flexibility that re-map json, can access to a sub-key. That will be useful for big rang of of apps webhook.

oopen avatar Sep 15 '24 16:09 oopen

+1 on remapping of nested objects. A lot of services post json blob that cant be handled now. or one would need yet another intermediate handler packet the suggested format of http://apprise/notify/{KEY}?:appid=title&:items[0].objectURI=body would cover all use cases i feel

Kenny-JTK avatar Apr 29 '25 08:04 Kenny-JTK