Community
    • Categories
    • Recent
    • Popular
    • Users
    • Search
    • Register
    • Login
    1. Home
    2. mirkomatonti
    3. Posts
    M
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 7
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Update a single-value category with Api

      @Philipp-Hörselmann
      Great 🙂 Do you know where I can find the API(1.11.1)?

      Best,
      Mirko

      posted in Development
      M
      mirkomatonti
    • RE: Update a single-value category with Api

      @Philipp-Hörselmann

      I-doit 1.14 and api version1.10.4

      Best,
      Mirko

      posted in Development
      M
      mirkomatonti
    • RE: Update a single-value category with Api

      Hi @Philipp-Hörselmann , thank you, changing to "value" it worked!

      Now I have the same problem updating the "C__CATG__VIRTUAL_MACHINE".
      If I run this on a new object everything goes fine:

      {
        "version": "2.0",
        "method": "cmdb.category.save",
        "params": {
          "category": "C__CATG__VIRTUAL_MACHINE",
          "object": 6600,
          "data": {
            "virtual_machine": 2,
            "hosts": 834,
            "primary": 6597,
            "system": 10
          },
          "apikey": "******",
          "language": "en"
        },
        "id": "1"
      }
      

      Let's say I want to change the "Running on host"' and the "Host in cluster" properties to (253,6444) respectively:

      {
       "version": "2.0",
       "method": "cmdb.category.save",
       "params": {
         "category": "C__CATG__VIRTUAL_MACHINE",
         "object": 6600,
         "data": {
           "virtual_machine": 2,
           "hosts": 253,
           "primary": 6444,
           "system": 10
         },
         "apikey": "******",
         "language": "en"
       },
       "id": "1"
      }
      

      Same error:

      {
        "primary": "(dialog) Id value(s) '6444' do not exist in dialog table. Please check your provided selection."
      }
      

      The problem shows up only with the api, on the web GUI I can change them manually and if I do a category.read I get the correct updated values (hosts:253,primary:6444):

      {
        "id": "1",
        "jsonrpc": "2.0",
        "result": [
          {
            "id": "290",
            "objID": "6600",
            "virtual_machine": {
              "id": "2",
              "title": "Yes",
              "const": "",
              "title_lang": "LC__UNIVERSAL__YES"
            },
            "hosts": {
              "title": "Test Cluster",
              "id": "253",
              "connection_id": "2981",
              "type": "C__OBJTYPE__CLUSTER",
              "type_title": "Cluster",
              "sysid": "SYSID_1583768396"
            },
            "system": {
              "id": "10",
              "title": "XEN",
              "const": null,
              "title_lang": "XEN"
            },
            "config_file": "",
            "primary": {
              "id": "6444",
              "title": "Test Server",
              "sysid": "SYSID_1589213521",
              "type": "C__OBJTYPE__SERVER",
              "type_title": "Server"
            },
            "description": ""
          }
        ]
      }
      

      Sorry for the long post, I hope the explanation of the problem is clear.
      Thanks for the help.

      Best,
      Mirko

      posted in Development
      M
      mirkomatonti
    • RE: Assign Layer-3 IP address to a virtual server

      @franknagel said in Assign Layer-3 IP address to a virtual server:

      'ipv4_assignment': 1000

      Thank you for the reply ! It's exactly what I needed.

      posted in Development
      M
      mirkomatonti
    • Update a single-value category with Api

      Hi,
      I'm trying to update the value of the Operating System category(C__CATG__OPERATING_SYSTEM) using json api.

      This is the request:

      {
        "version": "2.0",
        "method": "cmdb.category.update",
        "params": {
          "category": "C__CATG__OPERATING_SYSTEM",
          "objID": 6531,
          "data": {
            "application": 5771,
            "assigned_version": 9
          },
          "apikey": "******",
          "language": "en"
        },
        "id": "1"
      }
      

      Response from the db:

      {
        "id": "1",
        "jsonrpc": "2.0",
        "error": {
          "code": -32603,
          "message": "Internal error: Validation errors in dialog related properties occured.",
          "data": {
            "assigned_version": "(dialog_plus) Id value(s) '9' do not exist in dialog table. Please check your provided selection."
          }
        }
      }
      

      I'm sure the value '9' mentioned in the error message exist. The problem only appears when updating, If I purge the category, then I can recreate it with the same data.

      posted in Development
      M
      mirkomatonti
    • Ip-Adresse einem Objekt via API zuweisen

      Hallo,

      Ich benutze i-doit api, um ein internes Tool in meinem Unternehmen zu entwickeln. Gibt es eine Möglichkeit, mit api eine IP-Adresse zuzuweisen? Bis jetzt habe ich es geschafft, die Liste der verwendeten IP in einem Layer-3-Objekt zu erhalten und dann die verbleibenden freien Adressen zu berechnen, aber ich habe Schwierigkeiten, einen Weg zu finden, eine der freien IP meinen Objekten mit der Kategorie "C__CATG__IP" zuzuordnen.

      Sorry it's automatic translated.

      posted in Entwicklung
      M
      mirkomatonti
    • Assign Layer-3 IP address to a virtual server

      Hello,

      I'm using i-doit api to develop an internal tool in my company. Is there a way to assign an ip address using the api ? Up to now I managed to get the list of used ip in a Layer-3 Object and then calculate the remaining free addresses, I'm struggling to find a way to assign one of the free ip to my objects using the "C__CATG__IP" category.

      posted in Development
      M
      mirkomatonti