I need to filter ConfiForms entries by a field where that field contains a slash character ("/"). I'm following the ConfiForms REST API and ConfiForms Filters documentation.
Example:
The "Path" field contains the value "path/to/file"
I tried a REST request to the following URL:
https://my-confluence-server.com/rest/confiforms/1.0/search/[pageId]/[formName]/Path:path/to/file
But this returns a 404.
If I change the Path field to just a word (without slashes) like "file", I can find it fine like this:
https://my-confluence-server.com/rest/confiforms/1.0/search/[pageId]/[formName]/Path:file
Returns a result as expected:
{
"total": 1,
"list": {
"entry": [
"@{recordId=99; createdBy=my.user; created=1701552880927; id=8053f3a5-464f-4aa2-b742-b590dfe93263; fields=; ownedBy=my.user}"
]
}
}
I think it's because the value contains slashes, which messes up the URL. I tried URL-encoding the slash, like this:
https://my-confluence-server.com/rest/confiforms/1.0/search/[pageId]/[formName]/Path:path%2fto%2ffile
But no change.
So what's the right way to filter entries on a field that contains a slash character?
Try passing the filtering parameter through the "query" parameter
https://my-confluence-server.com/rest/confiforms/1.0/search/[pageId]/[formName]?query=Path:path%2fto%2ffile
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.