I get an “body should be an array type.” error, but the JSON selection should create this.
Any help would be much appreciated!
Page 1 / 1
Hi Jesper, did you ever get this working? I’m trying to do something similar with a POST request to get a specific participant from the EX directory. I’m not sure how to do the Body Parameter section with the JSON payload that has the filter for the participant I want to search for. I tried “data” and “filter” but those are not working.
It works in a webservice workflow where this configuration format is not required.
Hi @jake_dufinetz,
I did not get my example to work, and I got confirmation that it wont, because there is no header value in my example. I made it work by building an extension and running it as a task. Big detour, but it also solved a few other issues at the same time 😉
For you, something like this should work:
You basically need to split up the JSON in the left and right field, and then use string as the value, then it should work.
Hi Jesper,
Thanks for the response! I just tried that setup as shown below, but when I run the test, it doesn’t return the participant I searched for. It has empty participant data. Meanwhile when I make the call via workflows, it returns the data of the participant who’s unique identifier I entered. Any idea why?
Hi @jake_dufinetz,
I did not get my example to work, and I got confirmation that it wont, because there is no header value in my example. I made it work by building an extension and running it as a task. Big detour, but it also solved a few other issues at the same time 😉
For you, something like this should work:
You basically need to split up the JSON in the left and right field, and then use string as the value, then it should work.
Hi,
200 - OK with an empty response body means that your call was successful but that no participant with the provided uniqueIdentifier was found.
That’s what you’ll get if you leave ${e://Field...} as the value for uniqueIdentifier when you run a test. You need to input a real value when testing, not piped-in text.
Edit: I don’t think it would cause problems, but you don’t need to add Content-Type to your query parameters since Qualtrics already use the one you specify it in the body to build the request.
but the ?includeMetadata=true should just include metadata, so that should not be a problem.
In the string value for the uniqueIdentifier, are you using any “ ?
This should not be used. you should be able to just write something like: jakedufinetz if that is your uniqueID.
And last part: You are intending to look in the EX directory right? just in case you were aiming this at the wrong directory :)
Hi Jesper,
Not sure what’s going on here but it just won’t work! I am indeed looking to search the EX directory. I have an employee in the EX directory where I am entering their “Unique Identifier” on the right side of the uniqueIdentifier body parameter. I tried updating to use your URL and remove the Content-Type parameter and no luck, still the same result unfortunately. And this works in a workflow web service task so not sure if this may just be a limitation of the survey flow web service call.
Body Parameters(application/json): uniqueIdentifier = _uniqueidvalue_ (String)
Custom Headers: X-API-TOKEN = _apitoken_
I have tried putting the employee’s unique ID within quotes and without quotes, with no change in the result. Each time I use the “Test” feature within the survey flow element, I always receive the “200 - Okay” status message but no participants returned. I get the same 200 success status with a unique ID that does not exist in the EX directory. I may reach out to support although I know they may not help with this since it is custom code/API support.
Like @vgayraud said, the 200 indicates that the call is made ok, but it looks like the id you search for is not found?
Ahh, alright I figured it out. I had the wrong API token from a different Qualtrics tenant in the survey flow. Hence why it was not finding those participants. It seems there are issues on the Qualtrics network side right now with everything timing out so I can’t test yet, but I believe this will fix. My mistake, thank you both @JesperAndersen @vgayraud !!
Great to hear that you finally found the solution @jake_dufinetz - It all makes sense when you figure it out 😁