In that case I would start with foreman_hooks and perform the POST request. You can even do this in bash with curl if you want.

https://github.com/theforeman/foreman_hooks#usage describes how you can create your own hooks.

On Wed, Sep 13, 2017 at 02:39:58AM -0700, Fairouz el ouazi wrote:
I m a beginner in ruby so that 's why i  felt a little bit a shame to  put
it in public im trying to make at first the plugin functional . For my
case  i know that i want to make a post request to my platform by in the
foreman side how can i do it ..

Le mercredi 13 septembre 2017 11:31:33 UTC+2, Ewoud Kohl van Wijngaarden a
écrit :

On Wed, Sep 13, 2017 at 02:25:01AM -0700, Fairouz el ouazi wrote:
>     I m trying to develop a plugin in Foreman so i can manage  all the
>devices that are connected to my IoT  platform . I can communicate with
my
>IoT platform via REST API . In first place with GET request i can get all
>the devices on Foreman with their parameters . My problem now is when i
>change the parameters in foreman or deleting devices  I need to see the
>changes on my IoT platform . i really need  help because  i m trying to
>convince my colleague that Foreman can do  it .

Is the plugin open source and available somewhere? That generally makes
it much easier to help.

For inspiration it might be good to look at foreman_hooks. That has
triggers when an object is changed or deleted. You might even find that
just using foreman_hooks could be enough for your use case.

--
You received this message because you are subscribed to the Google Groups 
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to foreman-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to