You are not logged in.
Pages: 1
Hi,
I am using 9.1.2 version and trying to automate comment update of a computer. As per documentation, I am using following command to update the asset.
curl -X POST -H 'Content-Type: application/json' -H "Session-Token: xxxx" -H "App-Token: xxxx" -d '{"input": {"comment": "IM234"}}' 'http://glpi.myhost.com/apirest.php/Computer/232'
Also tried using following command too.
curl -X POST -H 'Content-Type: application/json' -H "Session-Token: xxxx" -H "App-Token: xxxx" -d '{"input": {"id": 232, "comment": "IM234"}}' 'http://glpi.myhost.com/apirest.php/Computer/'
The issue is, in both cases it is creating new entry with new index id instead of updating the existing one with id 232. Can some one point out the problem here which is preventing the existing record update?
Appreciate your time.
Regards,
Vj
Offline
Did you try PUT instead of POST ?
Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1 Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6
Offline
Pages: 1