• Test find by meta-data in Swagger UI by got all documents

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #53319  by teera_w
 
I'm during test REST API for external system to query documents in OpenKM, then I was found Swagger UI for testing as below link:

http://{my-ip}:8080/OpenKM/services/rest/api-docs?url=/OpenKM/services/rest/swagger.json

Then, I have found this search service: /search/find
There are many parameter but I focused on property search (I think it same one to meta-data search)

My Criteria is
okp:ereport.rpcode" = "ABC123"
So I input as "array( 'key' => "okp:ereport.rpcode", 'value' => "ABC123"))" in Swagger UI (as screenshot: Swagger_Sample_Screen.jpg)

But result are every documents in OpenKM system instead of only one document matched. (As screenshot: All_Documents_Returned.jpg)

I'm not sure what I wrong.
Attachments
2-All_Documents_Returned.jpg
2-All_Documents_Returned.jpg (189.85 KiB) Viewed 577 times
1-Swagger_Sample_Screen.jpg
1-Swagger_Sample_Screen.jpg (231.76 KiB) Viewed 577 times
 #53329  by jllort
 
You should debug what really arrives at the REST API ( the swagger version used in CE is not the latest and probably do not implement the samples in the best way ). If you wish to test REST API I suggest using our Java SDK https://docs.openkm.com/kcenter/view/sdk4j-1.4/ ( more confident with it )

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.