Hi all,
I’m trying to access the Rest-API endpoint to show all folders: /check_mk/api/1.0/domain-types/folder_config/collections/all but I’m getting a HTTP 500 error - I’ve tried calling the link in a web browser and with curl.
There is only one subfolder in the main folder and this one is shown in value.
If i set a non existing parent folder i get an other error message as shown in your problem.
But i looks like your problem is also a problem with an folder id and that the systems finds a folder without id what normally not could be.
Thank you for testing, Andreas. I updated to 2.0.0b3 yesterday, hoping for improvement. Unfortunately I am still getting the same error.
We currently have 9 folders under the main folder. If I do the following:
curl -X GET "https://checkmk.contoso.com/prod/check_mk/api/1.0/objects/folder_config/~"
I do actually get a response, although I’m not sure if it is the desired one:
Here is the anonymised version of Check_MK’s crash report including Stacktrace:
Crash Report
Exeption:
ValueError (unique identifier not set)
Traceback:
File "/omd/sites/prod/lib/python3/cmk/gui/wsgi/applications/rest_api.py", line 401, in _wsgi_app
return wsgi_app(environ, start_response)
File "/omd/sites/prod/lib/python3/cmk/gui/wsgi/applications/rest_api.py", line 205, in __call__
wsgi_app = self.func(ParameterDict(path_args))
File "/omd/sites/prod/lib/python3/cmk/gui/plugins/openapi/restful_objects/decorators.py", line 479, in _validating_wrapper
response = self.func(param)
File "/omd/sites/prod/lib/python3/cmk/gui/plugins/openapi/endpoints/folder_config.py", line 274, in list_folders
return constructors.serve_json(_folders_collection(folders, params['show_hosts']))
File "/omd/sites/prod/lib/python3/cmk/gui/plugins/openapi/endpoints/folder_config.py", line 311, in _folders_collection
'id': folder.id()
File "/omd/sites/prod/lib/python3/cmk/gui/watolib/hosts_and_folders.py", line 131, in id
raise ValueError("unique identifier not set")
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact @fayepal if you think this should be re-opened.