How do I properly use the API search query option for Confiforms?

Jordan Barry January 31, 2025

 

I am trying to use the API endpoint to search my confiforms by entry. I am able to get a list of responses just using the form name and page ID. It doesn't work if I add query parameters. I am following the confiforms API documentation. 

 

Example: /rest/confiforms/1.0/search/$pageID/$formName 

This will return all of the records in the form. 

 

Example 2: /rest/confiforms/1.0/search/$pageID/$formName?query=recordId:123

This query string returns nothing. Am I formatting it wrong? I have tried several combinations for different forms and data types. 

1 answer

1 accepted

3 votes
Answer accepted
Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 31, 2025

Hi @Jordan Barry 

Have you changed the $pageID and $formName to reflect your form's name and page id where it is configured?

Do you have a record with an recordId=123 in that form?

Alex

Jordan Barry January 31, 2025

Hi @Alex Medved _ConfiForms_ 

Yes, both variables that are referenced have the correct values associated to them. When I do not add a search query at the end, I am able to receive all the entries in that form.

I do have a form with the recordId "123". 

 

 

This is an example record that I get when I just use /rest/confiforms/1.0/search/$pageID/$formName

 

 

{
"recordId": 123,
"createdBy": "placeholder",
"created": 173424124214,
"id": "80141sfb181-0d6a-062e-8fb7-7afheryery",
"fields": {
"ItemStatus": "In Stock",
"ReorderContact": "placeholder",
"TotalPrice": 10,
"ItemQTY": 10,
"ShelfNum": 1,
"ItemName": "placeholder",
"ReorderQuantity": 5,
"PricePerItem": 1,
"CabinetNum": 1,
"class": "fields",
"TeamAssignment": 2
},
"ownedBy": "placeholder"
}

 

 

Placeholder values placed in specific entries to omit data.

I also used this page: https://wiki.vertuna.com/display/CONFIFORMS/ConfiForms+Server+REST+API+version+1 for my information. Is this current? 

 

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 31, 2025

Yes, that is correct and I have just verified something like

/rest/confiforms/1.0/search/$pageID/$formName?query=recordId:123

In my case it is

https://server/rest/confiforms/1.0/search/8552531/myform?query=recordId:123 

 I get the record returned correctly.

Does the following returns everything for you?

/rest/confiforms/1.0/search/$pageID/$formName?query=*
Jordan Barry January 31, 2025

It also returns nothing. I imagine it is an issue with the script. I tested it through my browser and the html page returns the correct information. I'll need to do my debugging on my end. It's weird that it can't process the query via the script I have. Thank you for the help!

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 31, 2025

Can also try the 

/rest/confiforms/1.0/search/$pageID/$formName/recordId:123

as a workaround, but using the query parameter makes it more flexible 

Jordan Barry January 31, 2025

Wow, this worked! Thank you so much!!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events