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
Member
From: Eindhoven, the Netherlands
Registered: 2016-10-09
Posts: 72

[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
Member
From: Eindhoven, the Netherlands
Registered: 2016-10-09
Posts: 72

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: 6,287

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...
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

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

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

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
Member
From: Eindhoven, the Netherlands
Registered: 2016-10-09
Posts: 72

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