Triggerare manualmente gli webhook

Ho trovato un post a riguardo, ma non volevo riattivare un thread di tre anni fa.

Non posso nemmeno definirmi un principiante in Ruby, semplicemente non l’ho mai usato. Fondamentalmente, ho circa 30 argomenti in una categoria specifica per cui vorrei attivare un webhook (sia per nuovi argomenti che per modifiche ai post).

Sono arrivato fino a inserire il comando menzionato nel post citato, ma ora sono perso. Cosa dovrebbe rappresentare “post”? Ho provato l’ID del post in vari modi, ma non arrivo da nessuna parte e non riesco a trovare alcuna risposta.

So che per alcuni potrebbe essere un’azione semplice, ma letteralmente non ho alcuna esperienza con Ruby, oltre a eseguire qualche comando occasionale trovato su questo forum.

Qualsiasi aiuto è apprezzato! :slight_smile:

1 Mi Piace

What are you trying to do? This might not be the best way to do it. Maybe just generate the web hook with curl or postman?

1 Mi Piace

Hi @pfaffman

Basically I’ve built an endpoint that processes webhooks triggered from a specific category.

Postman is normally my go to, but didn’t want to hassle of generating a signature for each one (although admittedly, I could disable it temporarily).

My thought process was to some how manually trigger a webhook and just let the script do it’s job as it normally would. But certainly open to ideas - moreso when it makes life easier!

1 Mi Piace

I’m not sure how to trigger a web hook without wading in the code. Maybe actually edit the topics? You could, say, add a tag to them and then delete it. Look at the bulk operations howto for some ideas.

3 Mi Piace

Thanks for your reply Jay. I’ve edited the posts and triggered the webhooks manually.

None of the bulk options seemed to trigger them (perhaps down my settings more than the capabilities of Discourse), but all sorted now.

Have a great weekend!

3 Mi Piace

Ah, well. Many is the task that I’d have completed much faster if just using brute force rather than automating it. Well done!

3 Mi Piace