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.
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
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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=*
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.