formcreator icon indicating copy to clipboard operation
formcreator copied to clipboard

API Call as Form target

Open derry43 opened this issue 2 years ago • 1 comments

I love the formcreator plug-in but get frustrated that we are limited to ticket and change targets.

Making an API call as a target would open up an incredible amount of flexibility for formcreator, allowing forms to be used to add form based functionality to GLPI.

For example, allow users to submit assets for inclusion or deletion in GLPI via a form and to have someone approve the addition before it is automatically implemented by an API call, or to create a form based approval process for documents or KB articles, where the creator selects the document or KB article from a form, and upon submission,the form approver either accepts/rejects with comments and the API call adds the approval/rejection and comment to the document/KB article as, for example, a comment or note.

Ideally this feature would allow the creation of an API call as a target, with the following hidden fields making up part of the target definition and would be stored with the form definition.

User API Key Client API Key

The API target should allow the form creator to select an item type (computer, ticket etc) and an action i.e. whether the target will search, create, update or delete an item.

Like ticket and change targets, there should be an optional approval step.

The create, update and select actions are fairly straightforward.

The choice of search as an action should generate a CSV file output of the search result to a destination defined and stored with the form definition. Ideally an option to email the resulting CSV to a target set of users as selected in the form would make this an excellent additional reporting method.

derry43 avatar Apr 03 '22 07:04 derry43

Hi

Formcreator 2.13 will support problems, and will provide a hook to let other plugins implement their own targets.

I don't think you should implement your need via an API call if your form runs in the glpi instance where your computer should be created.

Globally I think you could have a look into the code of the develop branch or if you don't have skills to implement your need yourself, have a glpi network subscription and contact us for a quote.

btry avatar Apr 03 '22 09:04 btry

will provide a hook to let other plugins implement their own targets Interesting, do you have a link that explain this point please ?

glasserre-pdw avatar Dec 20 '22 10:12 glasserre-pdw