API (JSON-RPC)
Please create a complete backup before making any changes to an interface/import. If the result is not satisfactory, the backup can then be restored
Via the programming interface (API) you can externally access your IT documentation. You can read, create, update and delete data -- the same functions as in the Web GUI, but fully automatable.
Technical background#
The i-doit API provides typical CRUD functionality. Data can be
- created (Create),
- read (Read),
- updated (Update) and
- be deleted (Delete).
A client (e.g. a script) sends a request to the server (i-doit) to execute a method (Remote Procedure Call). The result is returned as a response. The API uses the JSON-RPC protocol in version 2.0 over HTTP with JSON as the exchange format. Requests are sent via HTTP POST in JSON format, responses are also returned as JSON.
API calls can be made asynchronously without losing the context between requests and responses. The programming language used can be freely chosen.
API instead of database
It is highly recommended to always prefer the API over direct database manipulations. SQL statements bypass all kinds of internal processing steps. If a record is manipulated via INSERT, UPDATE or DELETE through SQL, this could compromise data integrity and render i-doit unusable.
Download#
The API is offered as a free add-on for download in the customer portal for the pro variant.
Configuration#
The API is configured via the Web GUI of i-doit, found under Administration → Add-ons → JSON-RPC API.
Info
Removing HTML tags from description fields is only possible from i-doit version 1.15.2 with API version 1.11.3 installed.
Please note that API request logging creates a file in the installation directory of i-doit under log/ for each request. This could lead to increased disk space usage with heavy API usage.
Access#
Access to the i-doit API is via a special URL. src/jsonrpc.php is appended to the base URL of the i-doit instance. Example: https://demo.i-doit.com/src/jsonrpc.php.
Authentication and authorization#
An API key is mandatory for processing requests through the API. This key is used to identify the tenant. Additionally, the use of a dedicated user account for authentication can be enabled, for which permissions can be assigned as usual. Using a dedicated user for each third-party system or script enables easy tracking of data flow. For a very large number of requests (thousands), it is recommended to use the API method idoit.login for one-time authentication. Otherwise, too many sessions may be created in a short time without being closed, which can cause i-doit to stop functioning. The default user for API actions is "Api System", which can be found under "Contacts → Persons" if no specific username/password is used. If this user is archived or deleted, the API can no longer be used without authentication. In the Zammad integration, the API token is stored in the settings, for example.
Sending many requests
When sending very many requests from a client (we are talking about thousands), it is worthwhile to use the API method idoit.login to authenticate only once.
Otherwise, too many sessions may be created in too short a time without being terminated. This could cause i-doit to become unusable until the sessions have been terminated.
This also significantly increases performance.
The default user used for API actions is "Api System". This can be found if needed under "Contacts -> Persons".
This is only used when no username/password is used for connecting to the API interface.
If this person object is archived/deleted, the API can no longer be used without authentication.
Request-Format (JSON-RPC)#
A request to the i-doit API is a JSON object with a specific structure that follows the JSON-RPC 2.0 standard. The essential fields are:
- "jsonrpc": A string specifying the version of the JSON-RPC protocol, typically "2.0".
- "method": A string containing the name of the method to be called (e.g. "cmdb.object.create").
- "params": A structured object or array containing the parameters to be passed to the method. This includes the "apikey" for authentication as well as method-specific parameters.
- "id": A unique identifier for the request, generated by the client. It can be a string, a number or null. The server uses this value to associate the response with the request. If id is null or missing, it is a notification for which no response is expected.
Example of a simple request:
| Request | |
|---|---|
1 2 3 4 5 6 7 8 9 10 | |
Response-Format (JSON-RPC)#
The server's response to an API request is also a JSON object.
- "jsonrpc": String with the JSON-RPC protocol version ("2.0").
- "result": This field is present when the method has been executed successfully and contains the result of the method. The content is method-specific.
- "error": This field is present when an error has occurred during the processing of the request. It contains an error object (see Error handling section). Either "result" or "error" is present, but never both.
- "id": This value corresponds to the "id" value of the original request.
Example of a successful response:
| Response | |
|---|---|
1 2 3 4 5 6 7 8 9 | |
Error handling (JSON-RPC)#
Error handling in JSON-RPC 2.0 is standardized. An error object within the response typically contains the following fields:
- "code": An integer indicating the error type.
- defaultized codes include
-32700(Parse error),-32600(Invalid Request),-32601(Method not found),-32602(Invalid params),-32603(Internal error).
- defaultized codes include
- "message": A short, concise string describing the error.
- "data" (optional): Additional application-specific information about the error.
In addition to standard JSON-RPC errors, i-doit can also return specific error messages. For example, errors such as "Usersettings are only available after logging in" or "Could not connect tenant database" are returned when the "Api System" user has been archived or deleted. The documentation for a new method should list all specific errors that this method can trigger.
Using the i-doit attribute documentation#
A helpful listing of all categories and attributes used in i-doit can be found in the administration:
i-doit provides an "Attribute documentation" that contains a listing of all categories and attributes as well as their expected data types. This is the authoritative source for understanding the data elements of the i-doit CMDB model, especially when parameters or response fields use i-doit-specific constants or property keys. For custom categories and attributes, the technical keys can be found directly in the i-doit web interface in the respective custom category.
Finding i-doit constants and property keys
| Information type | Location in i-doit / Knowledge Base | Example |
|---|---|---|
| Object type constant | i-doit GUI (Object type configuration), Administration → Add-ons → JSON-RPC API → Attribute Documentation | C__OBJTYPE__SERVER |
| Global category constant (catg) | i-doit GUI (Administration → Add-ons → JSON-RPC API → Attribute Documentation) | C__CATG__NETWORK_PORT |
| Specific category constant (cats) | i-doit GUI (Administration → Add-ons → JSON-RPC API → Attribute Documentation) | C__CATS__NET_IP_ADDRESSES |
| Property key for category attribute | i-doit GUI (Administration → Add-ons → JSON-RPC API → Attribute Documentation) | title, ip_address, manufacturer |
| ID for Dialog+ field value (Dropdown) | i-doit GUI (Administration → Predefined content → Dialog-Admin), API methods like dialog.read | 12 (e.g. "Active") |
| CMDB status constant | i-doit GUI (Administration → Predefined content → CMDB-Status) | C__CMDB_STATUS__IN_OPERATION |
This table serves as a guide for where to find the required identifiers and constants for API usage.
Endpoint Documentation v2#
Here you can find v2 API requests with their request types, response types, arguments and the form of the request.
Clients and Libraries#
These libraries are maintained by the community and are not officially supported! Use at your own risk.
There are already numerous projects and products that use the i-doit API. Here we present some clients and libraries:
| Name | Website | Programming language | License |
|---|---|---|---|
| Idoit.API.Client | https://github.com/OKT90/Idoit.API.Client | C# | MIT |
| i-doit API client | https://github.com/bheisig/i-doit-api-client-php | PHP | AGPLv3 |
| i-doit CLI | https://github.com/bheisig/i-doit-cli | PHP | AGPLv3 |
| i-doit-go-api | https://github.com/cseeger-epages/i-doit-go-api | Go | GPLv3 |
| i-doit-python | https://github.com/ScaleUp-Technologies/i-doit-python | Python | MIT |
| ansible-i-doit | https://github.com/ScaleUp-Technologies/ansible-i-doit | Python | MIT |
| i-doit_API | https://github.com/mvorl/i-doit_API | Python | AGPLv3 |
| i-doit-js | https://github.com/Hildebrand-S/i-doit-js | JavaScript | MIT |
| i-doit_powershell | https://github.com/l-gosling/i-doit_powershell | PowerShell | MIT |
Feedback
If a client or library is not yet listed in this article, we welcome a brief message to feedback@i-doit.com.
Documentation for download (outdated)#
A documentation created by the developers is available for download in PDF format.
Since version 1.8.1, the API has been released as an add-on. Previous releases were included in i-doit.
FAQ#
Error Messages#
| Error Message | Problem |
|---|---|
| User settings are only available after logging in. (i-doit <= 21) | The Api System person has been archived or deleted. Solution: The Api System person must be restored or an authentication method must be used. |
| i-doit system error: Could not connect tenant database. (i-doit >=22) | The Api System person has been archived or deleted. Solution: The Api System person must be restored or an authentication method must be used. |
Releases#
| Version | Date | Changelog |
|---|---|---|
| 2.5 | 02.12.2025 | [Improvement] New v2 endpoint to read object types 'cmdb.object-type.read.v2' [Improvement] New v2 endpoint to update object types 'cmdb.object-type.update.v2' [Improvement] New v2 endpoint to create object types 'cmdb.object-type.create.v2' [Improvement] New v2 endpoint to delete object types 'cmdb.object-type.delete.v2' [Improvement] New v2 endpoint to restore objects 'cmdb.object.restore.v2' [Bug] Creating object with category entry for C__CATS__PERSON_CONTACT_ASSIGNMENT does create a entry in C__CATG__CONTACT [Bug] Update max length for Textarea validation [Bug] Allow update of "layer3_assignments" property from "C__CATS__NET" [Bug] Translated titles are wrongly translated when using idoit.constants |
| 2.4 | 09.09.2025 | [Task] PHP 8.4 compatibility [Bug] Attribute documentation displays error [Bug] cmdb.category.purge is not working for custom categories [Bug] Reading the attribute headquarter of the specific category organization always gives the same result [Bug] PHP fatal error when using cmdb.external.push.v2 |
| 2.3 | 19.02.2025 | [Task] Make symfony 6.4 compatible [Improvement] New API v2 endpoint to read object type groups [Improvement] New API v2 endpoint to update object type groups [Improvement] New API v2 endpoint to create object type groups [Improvement] New API v2 endpoint to delete object type groups [Bug] TypeError when selecting General in JSON RPC APIs Attribute documentation [Bug] Assigning a operating system with variant does not work [Bug] It is not possible to create an object with a custom cmdb_status set via string [Bug] Reading category Network Port does respond with Interface as a array instead of a object [Bug] Undocumented keys in the response of category C__CATS__NET [Bug] http 500 error when updating a port if layer 2 network assignment has an object selected [Bug] Calling Attribute documentation for Object type Persons category Nagios uses as much memory as possible |
| 2.2 | 28.08.2024 | [Bug] Upload object image not possible [Bug] Some wrong information in the result when using cmdb.objects.read [Bug] cmdb.objects.read does not get all results in a category [Bug] Reading category Contact via API does not respond with a contact data array [Bug] It is not possible to set dialog fields 'empty' over API |
| 2.1 | 09.07.2024 | [Task] Implement new 'endpoint documentation' page in i-doit [Bug] Internal error: There are no usable properties for the category in the request [Bug] API is using report query from db instead of creating the query new which leads to wrong results [Bug] SQL error when assigning a logical port to a Host address [Bug] API setting to enforce authentification is overwritten from every tenant [Bug] Missing information when reading object picture category [Bug] Setting time to xx:59 is not possible [Bug] Reading dialog+ field relations with cmdb.dialog.read always show the parent as the object itself [Bug] Using cmdb.category.save to create a version for operating system does not create a version |
| 2.0.1 | 08.05.2024 | [Bug] No categories in the result when using cmdb.objects.read with key categories [Bug] Too many connections when using batch requests |
| 2.0 | 10.04.2024 | [Task] Implement base architecture for new endpoint "cmdb.external" [Task] Restructure API, implement 'v2' endpoint [Bug] Reading dialog+ entries from C__CATS__GROUP_TYPE leads to PHP error [Bug] Inputs are not displayed as they were entered when reading via the API [Bug] Categories and attributes needs to be updated |
| 1.16 | 27.02.2024 | [Bug] Dialog plus entry is not resolved via string [Bug] cmdb.reports.read attaches " " to each value [Bug] Reading a object via cmdb.object.read results in "0" for status and cmdb_status [Bug] API System setting overwrites tenant setting [Bug] PHP error when reading category C__CATG_GENERAL [Bug] cmdb.logbook.create with using a string for alert_level the field is empty [Bug] cmdb.logbook.create with using a integer for source will cause a php error [Bug] cmdb.object.purge does not work because it checks quickpurge option [Bug] cmdb.object_types filter for title/titles needs to be a constant [Bug] Save buttons do not display a success notification [Bug] "cmdb.objects.read" endpoint does not work correctly with "type_title" filter and liwith [Bug] When using cmdb.dialog.read for category = C__CATG__CLUSTER_ROOT and property = quorum, one level too much is output |
| 1.15 | 07.11.2023 | [Bug] Using API after update to i-doit 25 displays license error message [Bug] Positioning an object in a rack misinterprets the rack unit position [Bug] The new cryptography method significantly extends API requests when no login has occurred previously [Bug] The overview of the API categories and attributes also shows virtual properties [Bug] Operating system > Version cannot be referenced via title, if a second operating system has the ame version title [Bug] Cannot create a dialog entry with value "0" [Bug] API Categories and attributes not working [Bug] C__CATG__NETWORK_PORT attribute default_vlan is not saveable |
| 1.14.1 | 13.06.2023 | [Task] Use 'cmdb.quickpurge' setting from tenant-settings [Bug] Specific sub-categories can not be read via cmdb.objects.read [Bug] Wrong successful message when using id instead of assigned_object [Bug] The "Date for Notification" field in category "SIM" can not be emptied by the API [Bug] Category Application is not displayed in Categories and attributes [Bug] Set a Location in Rack is not correct if the Height unit sorting is Ascending [Bug] Validation error for custom category field time [Bug] It is not possible to remove a Network -> Port -> addresses value [Bug] It is not possible to assign a Host address -> assigned_port value [Bug] Write data to Network > logical Ports > ports display SQL error message [Bug] Layer 2 Net -> Assigned logical ports is not Editable [Bug] Version of software assignment does not get assigned correctly [Bug] "Categories and attributes" contains empty categories like Document and Floorplan [Bug] Typo in response message idoit.logout |
| 1.14 | 21.03.2023 | [Improvement] New method "cmdb.ip_search.getNetworksByIp" returns all Layer3 objects a given IP is within the defined range (contributed by becon GmbH) [Bug] Creating objects results in two entries in category 'Accounting' [Bug] Category 'C__CATS__ORGANIZATION_CONTACT_ASSIGNMENT' can not be updated [Bug] Translations for 'LC__CMDB__CATG__VD__HOST_RAID_ARRAY' is missing [Bug] Add 'liwith' and 'offset' options to endpoint 'cmdb.reports.read' [Bug] SQL error when updating category 'network > port' [Bug] Can't read type of layer2 net category [Bug] Attribute "GPS" in category "C__CATG__LOCATION" is not writeable |
| 1.13.1 | 24.01.2023 | [Bug] Some fields are not being validated [Bug] The Login method can use old session keys [Bug] Validation error f_popup_ [Bug] Setting a Dialog Attribute via causes Fatal error [Bug] Failed validation breaks the response [Bug] installDate is always set to actual date/time [Bug] The addresses attribute of the Network > Port category is incorrectly validated by API validation [Bug] Date of Change is not altered when archiving a object via API |
| 1.13 | 05.09.2022 | [Task] PHP 8.0 compatibility [Bug] Reports displayed via the API show language constants [Bug] The Hostname field of the Monitoring category is incorrectly validated by API validation [Bug] Changing the object type via the API via type: dialog constant is not possible [Bug] An EntryID is needed to purge single-value entries [Bug] The API shall be able to change passwords of users [Bug] The Host address field of the Network > Port category is incorrectly validated by API validation [Bug] The Latitude, Longitude and Position fields in the Location category cabinet are incorrectly validated by API validation [Bug] The Type and Assigned license key fields of the Software Assignment category are incorrectly validated by API validation [Bug] The Image attribute of the Object picture category is incorrectly validated by API validation |
| 1.12.3 | 21.02.2022 | [Bug] Edit host address > primary_fqdn sets field default gateway for the network to Yes [Bug] If you edit an entry in the host address category, the IP address is removed. |
| 1.12.2 | 09.08.2021 | [Improvement] New parameters "offset" and "liwith" for the "cmdb.category.read" method [Bug] Virtual Switches > Creating Port Groups generates SQL error message [Bug] Cluster members cannot be assigned via API using the category C__CATG__CLUSTER_MEMBERSHIPS [Bug] The API can not create sub-categories in 'cmdb.object.create' context [Bug] Layer 3 nets cannot be assigned with API validation enabled in Layer 2 nets [Bug] When the layer 3 net is changed the layer 3 net is assigned to itself under layer 2 net assignment [Bug] The category SLA (C__CATG__SLA) cannot be described via the API / With API validation switched off the category is emptied [Bug] Dialog+ fields with 'PropertyFactory' definition can not be written |
| 1.12.1 | 18.01.2021 | [Bug] cmdb.category.quickpurge cannot be used with custom categories [Bug] API version 1.12 can no longer be used in the open variant of i-doit |
| 1.12 | 14.01.2021 | [Bug] API: It is not possible to create a volume license via the API if "type": "volume license" is used [Bug] Saving the "Layer-2 Nets" category deletes ip helper [Bug] Contact assignment of a group of people will be deleted if it is updated via the API |
| 1.11.3 | 01.12.2020 | [Bug] Assign cable with fibers/leads while saving connection [Bug] Liwith assignment categories to one entry while creating [Bug] Do not connect root location while creating cluster membership [Bug] Do not create wrong output after removing cable connection [Bug] Cannot assign objects to category "locally assigned objects" (requires i-doit 1.15.1) [Bug] The category C__CATG__IMAGE is not read correctly via the API [Bug] The category C__CATG__IMAGE cannot be written correctly [Bug] The dates of the category contract information cannot be set via the API [Bug] Category > Assigned Subscriptions C__CATG__ASSIGNED_SUBSCRIPTIONS key uuid cannot be set via string only via int [Bug] Read Methods: Do not output HTML tags in description fields [Bug] Objects can only be created via the API if the right to all object types is granted [Bug] Ports cannot be uniquely referenced via the API [Bug] Empty string supplied via API |
| 1.11.2 | 24.06.2020 | [Bug] API method: cmdb.object overrides the rights system |
| 1.11.1 | 09.04.2020 | [Bug] Updates via the API (save method) sets arbitrary entries in the Virtual Host category |
| 1.11 | 23.03.2020 | [Bug] Do not connect root location while creating cluster membership[Bug] Objects that are changed via the API should also be locked for this period (Read > Update). [Bug] Permission system error when using a user to change user-defined categories [Bug] Data record of the standard_gateway always shows an ID[Bug] When updating the category 'General' all tags are removed [Bug] Report displays HTML in the result |
| 1.10.4 | 02.09.2019 | [Improvement] Add RPC to handle the CMDB status [Improvement] Filling virtual custom category properties results in an error [Improvement] Create, read, update and delete template objects and mass change template objects [Bug] In the "Local Mass Storage" category, models cannot be created using the API. [Bug] When updating the model, a Dialog+ value is created / displayed with the ID of the model. [Bug] Update of a CPU title changes the frequency [Bug] Improved handling of sorting of hight units when using API [Bug] API "Categories and properties" page displays no content [Bug] Saving the WAN category writes wrong values for router and net[Bug] No salutation returns wrong value in JSON-API [Bug] Missing values in the API method "cmdb.category_info" |
| 1.10.3 | 06.05.2019 | [Bug] Assignment of devices to segments in slots not possible [Bug] Validating requests breaks altering attributes |
| 1.10.2 | 01.04.2019 | [Bug] cmdb.category.read: Read only entries with status "normal" unless otherwise specified [Bug] Select value in einem "Dialog+"-Attribut über dessen Konstante [Bug] Korrigiere SQL-Error beim verbinden von 2 Anschlüssen [Bug] object delete unter specification des Status (C__RECORD_STATUS__DELETED) leads tor Endlosschleife [Bug] object-Status muss beim Löschen zwingend angegeben werden, obwohl er optionally sein sollte [Bug] idoit.license.read: Enter news Format aus [Bug] idoit.addons.read: Verwende new Lizenzform [Bug] Löschen einer unbekannten Datensatz ID gibt Success aus [Bug] Erstelle Objects with defineder SYSID über die API [Bug] API gibt nicht alle IP-Adressen der IP-Liste zurück [Bug] Lese Daten aus der Category Laufwerk [Bug] Personengruppen Zuweisungen via API purgen [Bug] Rückgabe des Attributs "Anrede" wiederherstellen |
| 1.10.1 | 23.01.2019 | [Bug] Authentication with LDAP not possible [Bug] SQL injection vulnerability during login |
| 1.10 | 17.12.2018 | [Improvement] Enable validation of API requests via expert setting [Improvement] Different API keys are in einem Batch Request nicht erlaubt [Improvement] Error wird geworfen, wenn eine ID innerhalb eines Batch Request wiederholt wird [Improvement] API Key verpflichtend, User-Login with inkludiertem permissionssystem optionally [Improvement] cmdb.category.save created oder updated Category-entries [Improvement] Auslesen von Lizenzinformationen per API [Improvement] Internes Logging menschen-lesbar machen [Improvement] Filtern von Category-entriesn nach Status [Improvement] Category-entry wiederherstellen [Improvement] Category-entry bereinigen [Improvement] Category-entry delete [Improvement] Category-entry archivieren [Improvement] object als Massenänderungsvorlage markieren[Improvement] object als Template markieren[Improvement] object wiederherstellen [Improvement] object bereinigen [Improvement] object delete [Improvement] object archivieren [Improvement] Erstelle object with Category-entriesn [Improvement] Lese Objects with Category-entriesn [Improvement] Enter Integer-value bei einer Response nicht weiterhin als String zurück [Improvement] Beschreibe in der Web GUI den Umgang with Categories und Attributen [Improvement] Console Commands via API aufrufen [Improvement] Abfrage von Informationen installeder Add-ons [Improvement] Auslesen aller Konstanten [Improvement] Templates und Änderungsvorlagen auslesen, Create, aktualisieren und delete [Änderung] cmdb.category.create und .update sind veraltet [Bug] cmdb.category.create: Lizenz-key kann in Category "Softwarezuweisung" nicht angegeben werden [Bug] Rückwärtige Categories liefern keine oder falsche connectionen zu Objectsn [Bug] cmdb.category.read: Falsche objectbeziehungen und Mehrfacheinträge in Category "C__CATS_NET_TYPE__IPV4" [Bug] API returns bei Attribut "zone" der Category "Hostadresse" bei leerer Zuweisung ein leeresArray, bei einem entry stattdessen ein object [Bug] Unbekannte Attribute werden ignoriert [Bug] Unvalide valuee führen nicht zu Errormeldung [Bug] Server sendet keine Notification, wenn "id" im Request nicht gesetzt ist [Bug] cmdb.category.read returns entries für leere Categories [Bug] Inkorrekte Errormeldung bei der Link eines Nicht-Netz-objects über die API in einem field, in dem ein Netz-object erwartet wird (Hostadresse) [Bug] Kabel bleiben unbenutzt wenn connectionen withtels der API created werden [Bug] Application-Priority wird nicht übernommen [Bug] Timeout wird nicht nach jedem Request zurückgesetzt [Bug] Error in connection with Hersteller/Modell über die API[Bug] API: Faserverbindungen können nicht ausgelesen werden [Bug] Passes man eine ID als String ist es possible das die falsche Daten übernommen werden [Bug] Ports verbinden über die API nutzt falsche Objects als Kabel |
| 1.9.1 | 16.04.2018 | [Bug] cmdb.reports.read throws SQL error for variable reports [Bug] Method cmdb.reports throws PHP warning [Bug] After creation eines objects muss ein Reindex are executed, um das object per Suche zu finden [Bug] Category-entry für C__CATS__ORGANIZATION_CONTACT_ASSIGNMENT kann nicht created werden [Bug] API considered Sprachen-parameter nicht |
| 1.9 | 23.01.2018 | [Improvement] Search for objects by attributes and values [Improvement] Consider user rights in API callstigen [Improvement] specification eines Templates beim Erstellen eines objects via "cmdb.object.create" [Bug] file kann nicht hochgeladen werden [Bug] Über die API changeder value generates logbookeintrag ohne Titel [Bug] userdefinede Dialog Plus Inhalte über die API auslesen [Bug] Auslesen von passwordsn nicht possible [Bug] method "cmdb.object.create" legt objectID's teils als String, teils als Integer an [Bug] Datenbank-Error statt Meldung im Klartext beim Versuch, ein object, das nicht existiert, über die API zu delete [Bug] Dialog Plus fielder, die eine Abhängigkeit zu einem othern Attribut haben, werden nicht created |
| 1.8.1 | 02.03.2017 | [Bug] After Erstellen werden benutzerdefinierte Dialog+-fielder nicht displayed [Bug] Created dialog entries receive den Status 1 anstelle von 2 (Normal) [Bug] cmdb.object.delete considered parameter "status" nicht [Bug] cmdb.category.create wirft Datenbank-Error für Category "Modell" |


