Information not set / accurate in GUI after adding operatingsystems using API call

Problem: adding operating system using API with success doesn’t sync/show same information in the GUI.

Expected outcome:
seeing matched data between API success result and GUI properties

Foreman and Proxy versions:
3.3.1

Foreman and Proxy plugin versions:

Ansible

Version
3.4.0

Dynflow

Version
0.8.1

Script

Version
0.7.2

TFTP

Version
3.3.1

Other relevant data:
after writing a python that should add operating systems to Foreman, I do see the output of the execution succeed, but when I look at the GUI it misses few parameters, such as installation media, 2nd and 3rd provision templates. (i’ve set 3 , one of them being “linux host_init_config default” as first template.
when I go to Installation Media tab, I do see the media being assigned to the operating system I added but not in the OS edit properties, furthermore in host properties I do see that I can pick the 2nd and 3rd provision templates but I have to set them and they are the only option I see. (which makes sense cause I’ve chose them to be the templates in the API call)

I’m not sure if this is a bug or something is not right in the procedure.
please advise, thanks!

It doesn’t ring a bell, but given how old version of Foreman you’re running, I’d first try updating it. The API should of course work and perform all changes if it is used correctly. Did you check the /apidoc for the reference?