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

    Posts

    Recent Best Controversial
    • RE: Cmdb.dialog.create, Error: Given category identifier is not valid or not setted.

      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
                              }
                          };
      
      
      posted in Development
      L
      lagerman
    • Cmdb.dialog.create, Error: Given category identifier is not valid or not setted.

      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.

      posted in Development
      L
      lagerman