Community
    • Categories
    • Recent
    • Popular
    • Users
    • Search
    • Register
    • Login

    Category from host

    Scheduled Pinned Locked Moved Development
    3 Posts 2 Posters 916 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D Offline
      denniswoot
      last edited by denniswoot

      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":""
      

      }

      1 Reply Last reply Reply Quote 0
      • M Offline
        mike.vogel
        last edited by

        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!

        Beste Grüße / Regards,
        Mike

        D 1 Reply Last reply Reply Quote 0
        • D Offline
          denniswoot @mike.vogel
          last edited by

          @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?

          1 Reply Last reply Reply Quote 0
          • First post
            Last post