Closed jshum closed 4 years ago
I also tried which seems to be the suggestion from this: https://github.com/jhpyle/docassemble/issues/141
{
"key": "xxx",
"i": "yyy",
"session": "xxx",
"secret": "xxx",
"variables": {
"url_args['Applicant_Name']": "John"
},
"question_name": "Question_0",
"advance_progress_meter": 1
}
Everything looks fine based on what you have listed. The error you are getting means that when it searches the userdict
table in the SQL database (which stores interview answers) using the i
and session
parameters you gave it, it found zero results. Maybe you are giving it the wrong i
or the wrong session
?
You can set any variable at any time with the API.
Setting the url_args
through the API is not the way to go. I wouldn't pay too much attention to the GitHub issues history. Most Q&A activity is on Slack.
thank you @jhpyle .
ah I figured it out. I had spaces in my file name, and I had mistakenly copied over the url-encoded param that was in the GET request where it changes spaces to %20. Should have kept the version with the actual spaces.
Hi, thank you for building docassemble. It's truly awesome. I'm trying to develop a simple doc generator for application form. I'd like to use the API to access the details of the interview and create submissions.
I'm having trouble with posting the variables to the question/session. I've looked through the docs and some other Github issues, but still having some trouble understanding what's going on.
Results from
GET /question
JSON Body for
POST /session
But I keep getting 400 Error with
"Unable to obtain interview dictionary."
as the error message. Any thoughts on why this is the case?I'm not actually quite sure what the allowed content within
variables
for thePOST /session
call is. Can you only set variables which were returned in the/session
call? If that's the case, how can you set question variables programmatically through the API?Thank you, appreciate any answers or hints you may be able to provide