Get all object data via API



  • Is there an example somewhere to return all of the data from an object? I see the CLI and PHP API wrappers have a "load" method that does this, but it would be nice to have an example of how?

    Alternatively how do I request just the data for one or two specific categories attached to an object (Contact info, or custom attributes for example).

    Also, is there an English version of this document please:
    https://kb.i-doit.com/download/attachments/37355644/i-doit JSON-RPC 1.8.3.pdf?version=1&modificationDate=1489677685764&api=v2


  • i-doIT Team

    Hi,

    Sorry for the late answer.

    To "load" everything about an object:

    1. Fetch common information about an object by cmdb.object.read or cmdb.objects.read. Now you know its object type.
    2. Fetch all relevant categories for this object by cmdb.object_type_categories.read. Now you know all category constants.
    3. Read all attributes from every category with a batch request. For every category use cmdb.category.read.

    Within 3 API requests you know has every detail about an object.

    In a future release we will enhance the API so only 1 request is needed.

    At the moment, we are migrating the out-dated PDF documentation to this KB article. I hope it helps.

    Greetings,
    Ben


 


Datenschutz / Privacy Policy