filter api url with condition

how can I get from api files contains “rfs” only using this url

…/API/bpm/caseDocument?p=0&f=

for example, I have 10 files, 3 of them are “rfs_1”, “rfs_2” and “rfs_3”. I need to get these files only.

Thanks

Hello, 

if you go to the documentation page of "caseDocument" : 
https://documentation.bonitasoft.com/bonita/2021.1/bpm-api#_casedocument

in the part about "Search for a document"

you will see that you can write this kind of call:

/API/bpm/caseDocument?p=0&c=10&f=name=rfs_

the filter "f=" will filter your request for all documents with name started by "rfs_"

 

hope this helps,

Julien.

Hello
I would first use the REST API to collect all the documents.
Then I would use a Javascript expression to filter the API Output and collect only the document that match my criteria.
The above API is a system API and I dont think you can modify them. Please check the Documentation to see what parameters can u pass
for eg : ../API/bpm/caseDocument?p=0&f=caseid={{[processInstanceId}}   will give you all documents specific for a case.
There are other seach parameters . Its available in documentation website.

Regards