I'm attempting to append a query string created in a previous action to an API endpoint in a custom connector. However, when the call is made, the '?', '=', and '&' appear to become encoded and the call returns an error. I'm using this method as the API call requires parameter key names that include a unique value (a student's id). So, depending on the course the grades are being updated for, I would need to select the parameter key names for those specific students. To test if the connector works, I set parameter key names for two students in the custom connector which does work as intended. However, since I would need to create parameter key names for every student, this method is not feasible.
This is the API call which takes a parameter key name of 'grade_data[<student_id>][posted_grade] and a parameter value, which is the grade. The unencoded query string for students 1 and 2 with grades of 90 and 93, respectively, would look like the following example:
- ?grade_data[1][posted_grade]=90&grade_data[2][posted_grade]=93
If I set the parameter key names in the custom connector, the following is shown in the request message (which works):
- ?grade_data%5B1%5D%5Bposted_grade%5D=90&grade_data%5B2%5D%5Bposted_grade%5D=93
If I append a query string to the API endpoint, the following is shown in the request message (which returns a 404 error):
- %3Fgrade_data%5B1%5D%5Bposted_grade%5D%3D90%26grade_data%5B2%5D%5Bposted_grade%5D%3D93
My initial guess is that the custom connector is not treating the string as a query string, and so the reserved characters are not being treated as such. Is there a way to get around this?