Page 1 of 1

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

PostPosted:Thu Mar 10, 2022 11:21 am
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.

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

PostPosted:Sat Mar 12, 2022 10:36 am
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 )