Category from host



  • Hi,

    I am trying to update the host category from the host, but how can I managed that because we have multiple rows from the category?

    First I would like to read out all category which we have entered but this seems to be impossible?

    How I read out the object:

    "version": "2.0",
    "method": "cmdb.object.read",
    "params": { 
    	"apikey": "2i30sgvmvl",
    	"objID": "22275",
    	"type_title": "Server",
    	"category": "C__CATG__GLOBAL",
    	"title": "title"
    	
    },
    "id": "30369",
    "message": ""
    

    }

    Is there any English documentation?

    Another question I am trying to update to update the category from the object, but recieve a error. This is the code that i am using to test, but nothing works. And the IP is also not helping me at all..

    "version": "2.0",
    "method": "cmdb.object.update",
    "params": { 
    	"apikey": "2i30sgvmvl",
    	"objID": "30335",
    	"type": "C__CATG__GLOBAL",
        "objecttype": "89",
        "type_title": "Remote Management Controller"
    	
    },
    "message": "",
    "error":""
    

    }



  • Hey @denniswoot !

    Our API documentation can be found in the following article of our Knowledge Base:
    https://kb.i-doit.com/pages/viewpage.action?pageId=37355644

    The method cmdb.object.read, which you used for your calls, gives you general information about the called object.
    To get further information about any category you want, use cmdb.category.read instead.
    Following you'll find a request which should show you information about the category host

    {
        "version": "2.0",
        "method": "cmdb.category.read",
        "params": {
            "objID": 22275,
            "catgID": "C__CATG__IP",
            "apikey": "YOUR_API_KEY_HERE",
            "language": "en"
        },
        "id": 1
    }
    

    To update category entries within the host address category, you'd have to use the method cmdb.category.update.
    The used "id" in the following statement is part of the result set you'll get when using cmdb.category.read on an object:

    {
        "version": "2.0",
        "method": "cmdb.category.update",
        "params": {
            "objID": 22275,
          "data": {
            "id": 180, 
            "ipv4_address": "10.100.20.225"
            },
            "catgID": "C__CATG__IP",
            "apikey": "YOUR_API_KEY_HERE",
            "language": "en"
        },
        "id": 1
    }
    

    You can find every attribute with it's usable keys and field types via the following link:
    http://YOUR_HOST_HERE/?load=api_properties

    Please not that you have to change the host address in the link to access the data.

    If there are any further questions, please do not hesitate to contact us!



  • @mike-vogel

    Thanks it works.! I was struggeling with cmdb.object.update, but this was not working ofc.

    Many thanks.

    One more question is there are English documentation in pdf?


 


Datenschutz / Privacy Policy