You are not logged in.
Pages: 1
Topic closed
Hi,
How can i create a new computer registry with a computer name xxx using an api rest call? I can get the registry id by the hostname and modify it, everything with api calls, but i need to create a new computer in same way.
Thanks in advance.
Offline
Yes, you can.
I don't know what language you use so I don't have a direct answer, but the API documentation is very precise.
Offline
use POST method to create objects.
edit : moved to API Section
Trouver la panne avant de réparer...
GLPI10.0.16 (ubuntu 22.04 PHP8.1 Mariadb10.6 ) plugins : comportements 2.7.3 reports 1.16.0 formcreator 2.13.9, datainjection 2.13.5 fields 1.21.9
Offline
Yes, you can.
I don't know what language you use so I don't have a direct answer, but the API documentation is very precise.
English. I didn't find it in the doc but i'll try to see it deeper.
Offline
using post method ,
endpoint : myServer/glpi/apirest/Computer/
payload :
{"input" :
{"is_recursive": 1,
"entities_id":2,
"name":"MyName",
"serial":"MySerial",
"otherserial":"Myotherserial",
"contact":"MyContact",
"contact_num": null,
"users_id_tech":0,
"groups_id_tech":26,
"comment":"MyCommet",
"locations_id":426,
"domains_id":64,
"networks_id":0,
"computermodels_id":339,
"computertypes_id":30,
"is_template":0,
"manufacturers_id":1955,
"users_id":4883,
"groups_id":63,
"states_id":1,
}
}
Trouver la panne avant de réparer...
GLPI10.0.16 (ubuntu 22.04 PHP8.1 Mariadb10.6 ) plugins : comportements 2.7.3 reports 1.16.0 formcreator 2.13.9, datainjection 2.13.5 fields 1.21.9
Offline
Thanks a lot!
Offline
Jean-Christophe wrote:Yes, you can.
I don't know what language you use so I don't have a direct answer, but the API documentation is very precise.
English. I didn't find it in the doc but i'll try to see it deeper.
I meant programming/scripting language
Offline
Hello,
API documentation is here : https://server_adress/apirest.php/
Apps Android GLPI Management : https://play.google.com/store/apps/deta … fr.dmn.app
Site Web : http://mdu-tech.fr/
GLPI 9.5.5 sur IIS 10 / PHP 8 / MySQL
Offline
sistemas.hpux wrote:Jean-Christophe wrote:Yes, you can.
I don't know what language you use so I don't have a direct answer, but the API documentation is very precise.
English. I didn't find it in the doc but i'll try to see it deeper.
I meant programming/scripting language
Jejejeje, sorry. I was using only curl for tests and then uri method in ansible playbook.
Hello,
API documentation is here : https://server_adress/apirest.php/
Yes, i was looking for it in the wrong place...
Thanks you all very much. I was able to create a new computer as i wanted.
Offline
Pages: 1
Topic closed