@apfel-jan Ich sehe, dass du https/SSL nutzt. Falls du ein selbst signiertes Zertifikat nutzt, muss das Root Zertifikat und Stammzertifikat davon unter dem Idoit Server/Linux importiert werden. Sonst wird die Verbindung über SSL abgelehnt.
Best posts made by Kleinrotti
-
RE: CMDB Error http error
Latest posts made by Kleinrotti
-
RE: i-doit erkennt die neue PHP Version nicht
@StadtKG Es können mehrere PHP Versionen gleichzeitig installiert sein. Der Terminal Befehl gibt meistens die neuste installierte Version aus. In deinem Fall 8.2.4. Webserver wie apache2 nutzen aber meist nicht automatisch die aktuell neuste Version die installiert ist. Diese muss aktiviert werden. Z. b. bei apache2 mit den Befehlen (oder in der apache2 config):
sudo a2dismod php7.4 sudo a2enmod php8.2
Befehl 1 deaktiviert die aktuell genutzte Version.
Befehl 2 aktiviert die neue Version.Beachte aber, dass du ggf. für i-doit noch PHP Pakete für Version 8.2 nach installieren musst.
-
RE: API create object from template
@FlatErik I added these lines of code to the file isys_api_model_cmdb_object.class.php at line 262 of the API Addon (Version 1.12.3).
if (isset($p_params['useTemplate']) && $p_params['useTemplate']) { // Get template module. $l_template_module = new isys_module_templates(); $l_template_module->create_from_template( [$p_params['useTemplate']], $p_params['type'], $p_params['title'], $l_return['id'], false, 1, '', $p_params['category'], $p_params['purpose'] ); }
Sample API Request:
{ "version": "2.0", "id": "1", "method": "cmdb.object.create", "params": { "apikey": "xyz", "language": "de", "type": "C__OBJTYPE__CLIENT", "title": "CLIENT-TEMP-638001685961295254", "purpose": null, "cmdb_status": 0, "description": null, "category": null, "useTemplate": 583 }
useTemplate provides the Id of the template.
-
RE: API create object from template
@leobaer Sorry for my late reply. Your idea to change the global unique setting to "Unique per Object type" worked. Using this setting works without the error. Thanks for that
I was also able to implement the feature to use templates in the API Addon by my self. Happily this was just a few lines of code.
-
RE: API create object from template
It's quite a while now but are there new information to this topic?
Unfortunately our workflow is not that good due to this bug. Every time we want to mass import ordered products from delivery notes with a tool, we have to disable the validation with a user which has the appropriate rights in i-doit. Afterwards we have to enable it again. This causes loss in time or if someone forgets to disable the validation, the products are not imported correctly and it has to be repeated.
Or is there a possibility to provide a pull request for the official API-Addon to provide a bug fix myself? -
RE: API create object from template
@lfischer
And what about the bugfix for the default template? Even that would help me -
RE: API create object from template
Hey @LFischer
are there any new information? -
RE: API create object from template
@LFischer Are there already any news when a bugfix will be released?
-
RE: CMDB Error http error
@apfel-jan Ich sehe, dass du https/SSL nutzt. Falls du ein selbst signiertes Zertifikat nutzt, muss das Root Zertifikat und Stammzertifikat davon unter dem Idoit Server/Linux importiert werden. Sonst wird die Verbindung über SSL abgelehnt.
-
RE: API create object from template
@lfischer No I don't use placeholders in titles of the objects/templates.
For testing purposes I disabled the validation/unique setting for the title and it's working this way - no error. But I need this settings for production, so I have to enable it again.
This bug definitely has something to do with the validation setting.
I would really appreciate if that bug could be fixed and if that feature request would be implemented.