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.



  • 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
                            }
                        };
    
    

 


Datenschutz / Privacy Policy