You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2018-02-12 14:07:30

fercho
Member
Registered: 2018-02-12
Posts: 4

Add component to existin computer cURL

I have bein trying to add a component to an existing Computer via cURL, I was wondering if this is viable and how could thisbe done?

Offline

#2 2018-02-12 14:38:12

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,145

Re: Add component to existin computer cURL

Use  glpi api.
Toi scan add  items to computer.

Check forun api section.


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

#3 2018-02-12 15:01:32

fercho
Member
Registered: 2018-02-12
Posts: 4

Re: Add component to existin computer cURL

Im currently using the restFull api in a server, I am creating the computer using cURL and works fine, but I need to be able to add or link the components to this existing computer using cURL call. Is this possible to do it without the use of a plugin?
PD: Checked the API forum and theres nothing i could relate to this issue.

Offline

#4 2018-02-12 17:34:25

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,145

Re: Add component to existin computer cURL

try this url :

$url=$api_url . "/Computer/" . $computer_id . "/Computer_Item";

post the array :

[items_id] => $item_id
[computers_id] =>  $computer_id
[itemtype] => Printer


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

Board footer

Powered by FluxBB