Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Get ConfiForm form entry where field value contains a slash ("/")

Jeremiah Watkins
Contributor
December 4, 2023

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?

1 answer

0 votes
Alex Medved _ConfiForms_
Community Champion
December 4, 2023

Hi @Jeremiah Watkins 

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events