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

    Cmdb.dialog.create, Error: Given category identifier is not valid or not setted.

    Scheduled Pinned Locked Moved Development
    2 Posts 1 Posters 1.4k 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.
    • L Offline
      lagerman
      last edited by

      I'm getting a -32603 error with a message of "Given category identifier is not valid or not setted" when trying to add a new item. I know that the identifier is valid as the cmdb.dialog.read operation works just fine, so I'm guessing that it is not "setted", whatever that means…

      
      var body = {
                              "jsonrpc": "2.0",
                              "method": "cmdb.dialog.create",
                              "params": {
                                  "apikey": api.apiKey,
                                  "category": "C__CATG__MODEL",
                                  "property": "manufacturer",
                                  "value": manufacturer.title
                              }
                          };
      
      

      Anyone run into this before? I am able to add a new manufacturer to the same dialog list in the web interface for what it's worth.

      1 Reply Last reply Reply Quote 0
      • L Offline
        lagerman
        last edited by

        So, I got a little lucky and figured this one out. The parameter name for category as given in the documentation is incorrect (or at least in the copy I have). The parameter needs to be 'category' for cmdb.dialog.read and 'catgID' for cmdb.dialog.create. After changing it to 'catgID' it works just fine:

        
        var body = {
                                "jsonrpc": "2.0",
                                "method": "cmdb.dialog.read",
                                "params": {
                                    "apikey": api.apiKey,
                                    'category': "C__CATG__MODEL",
                                    'property': 'manufacturer'
                                }
                            };
        
         var body = {
                                "jsonrpc": "2.0",
                                "method": "cmdb.dialog.create",
                                "params": {
                                    "apikey": api.apiKey,
                                    "catgID": "C__CATG__MODEL",
                                    "property": "manufacturer",
                                    "value": manufacturer.title
                                }
                            };
        
        
        1 Reply Last reply Reply Quote 0
        • First post
          Last post