You are not logged in.
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
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