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 2018-04-21 05:51:57

nvnam
Guest
Registered: 2017-10-20
Posts: 10

How to add and update custom fields plugin with api

How to add and update value custom fields plugin with api REST?
Please help me,
Thanks

Offline

#2 2019-07-29 10:39:54

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

Re: How to add and update custom fields plugin with api

Same question here. Someone succeeded in this?
I am unable to find ANY documentation about it


GLPI 9.3.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-07-29 10:59:29

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

Re: How to add and update custom fields plugin with api

Hello,

For instance, if you created a field "custom inventory number" in the computer object, you can read, write and update the field thru the computer object using the field name "custominventorynumberfield".

As simple as that :-)

Offline

#4 2019-07-29 12:21:55

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

Re: How to add and update custom fields plugin with api

Would it be so simple ... ? Let me try that. Thanks for the info!


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

#5 2019-07-29 13:31:12

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

Re: How to add and update custom fields plugin with api

do not forget the "field" part at the end of the field's name ;-)

Offline

#6 2019-07-29 13:36:43

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

Re: How to add and update custom fields plugin with api

I saw the field getting it from the rest api:


id                          : 8
name                        : lastupdatetimestampfield
label                       : Last Update Timestamp
type                        : datetime
plugin_fields_containers_id : 2
ranking                     : 3
default_value               :
is_active                   : 1
is_readonly                 : 0
mandatory                   : 0
links                       : {@{rel=PluginFieldsContainer; href=https://myglpiserver/apirest.php/PluginFieldsContainer/2}}

Now I am struggling with another issue, I am unable to update any field. Asked a question about that in a new post.


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

#7 2019-07-30 21:59:12

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

Re: How to add and update custom fields plugin with api

Jean-Christophe wrote:

do not forget the "field" part at the end of the field's name ;-)

Thanks Jean-Christophe, for your input.


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