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 2019-07-29 13:23:28

ronnie.peeters
Guest
From: Eindhoven, the Netherlands
Registered: 2016-10-09
Posts: 69

[GLPI 9.3.3] - Error 404.0 on PUT and DELETE methods...

Hi All,


I am trying to update a custom field on my servers using powershell.

I am using the GlpiTools powershell module for this.

The issue I am facing is a 404.0 NOT FOUND error on all the PUT and DELETE methods.

I am debugging outside the powershell module (using the Chrome restlet client pluging) but am unable to modify a computer field.

I am using the JSON content of the example in the apirest.php documentation, but always receive a 404 on the PUT method

Any tips?


When I change the method to POST a new computer gets created with the data I specified in the body...
Currently I feel lost...


GLPI 9.4.3 - Currently in Dev environment - preparing for production
-Preparing data migration from OSTicket to GLPI for the Ticketing/Helpdesk part.
-Preparing data migration from OrangeSCRUM to GLPI for the project management part.
@Working at a company that is responsible for the IT environment of over 4500 employees that have IT assets

Offline

#2 2019-09-18 13:58:16

ronnie.peeters
Guest
From: Eindhoven, the Netherlands
Registered: 2016-10-09
Posts: 69

Re: [GLPI 9.3.3] - Error 404.0 on PUT and DELETE methods...

Nobody??


GLPI 9.4.3 - Currently in Dev environment - preparing for production
-Preparing data migration from OSTicket to GLPI for the Ticketing/Helpdesk part.
-Preparing data migration from OrangeSCRUM to GLPI for the project management part.
@Working at a company that is responsible for the IT environment of over 4500 employees that have IT assets

Offline

#3 2019-09-18 14:01:47

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 4,758

Re: [GLPI 9.3.3] - Error 404.0 on PUT and DELETE methods...

looks like  item id is missing in url

to post a new computer url is …:glpi/apirest.php/computer/
to update computer #25   is …:glpi/apirest.php/computer/25/


Trouver la panne avant de réparer...
*GLPI 9.1.6+fusion9.1+1.1+behaviours1.5.0+reports+fields+appliances+pdf+badges+formcreator2.5.2 PHP7.0 Mariadb10
*GLPI 9.4.4(behaviours2.2.1+fusioninventoty 9.4+1.1+applicatifs2.5.0+fields 1.9.1)hebergé sur serveur mutualisé.

Offline

#4 2019-09-18 14:14:39

Jean-Christophe
Moderator
Registered: 2007-08-22
Posts: 410

Re: [GLPI 9.3.3] - Error 404.0 on PUT and DELETE methods...

Hi,
You can have a look at this https://github.com/J-C-P/PSGLPI
It's another GLPI Powershell module I made.

The delete and update fonctions work :-)

Offline

#5 2019-09-18 15:13:35

ronnie.peeters
Guest
From: Eindhoven, the Netherlands
Registered: 2016-10-09
Posts: 69

Re: [GLPI 9.3.3] - Error 404.0 on PUT and DELETE methods...

Found it!

In IIS web.config I needed to set the verb for PHP to included PUT,DELETE,PATCH

some info
https://stackoverflow.com/questions/673 … ensionless


GLPI 9.4.3 - Currently in Dev environment - preparing for production
-Preparing data migration from OSTicket to GLPI for the Ticketing/Helpdesk part.
-Preparing data migration from OrangeSCRUM to GLPI for the project management part.
@Working at a company that is responsible for the IT environment of over 4500 employees that have IT assets

Offline

Board footer

Powered by FluxBB