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 2023-03-14 23:25:47

nwendt
Member
Registered: 2023-03-14
Posts: 2

POST PluginFormcreatorFormAnswer returns ERROR_GLPI_ADD

Hello,

I'm trying to add an answer to my Formcreator's form through the REST API, for exemple, using proper tokens and server name:

curl -X POST \
-H 'Content-Type: application/json' \
-H "Session-Token: SESSION_TOKEN" \
-H "App-Token: APP_TOKEN" \
-d '{"input": {"name": "Test", "plugin_formcreator_forms_id": 7, "requester_id": 13, "users_id_validator": 12}}' \
'http://NAME/apirest.php/PluginFormcreatorFormAnswer'

The response returns error 400, with content ['ERROR_GLPI_ADD', ''].
I cannot find anything in the log files inside files/_log/*.log

I can GET data from /PluginFormcreatorFormAnswer.
I have Formcreator 2.13.4 installed.

Do you guys have any advice?

Best regards,
Nestor.

Last edited by nwendt (2023-03-14 23:39:04)

Offline

#2 2023-03-15 18:49:06

nwendt
Member
Registered: 2023-03-14
Posts: 2

Re: POST PluginFormcreatorFormAnswer returns ERROR_GLPI_ADD

This helped me: <pluginsGLPI's github>/formcreator/issues/2642

curl -X POST \
-H 'Content-Type: application/json' \
-H "Session-Token: SESSION_TOKEN" \
-H "App-Token: APP_TOKEN" \
-d '{"input": {"plugin_formcreator_forms_id": "1", "formcreator_field_1": "test"}}' \
'http://NAME/apirest.php/PluginFormcreatorFormAnswer'

Offline

Board footer

Powered by FluxBB