v1

latestOpenAPI 3.1.02026-08-067019120.8 KB
Sessions

Set variables in an interview session

Sets variables in the interview dictionary and (by default) returns a JSON representation of the current question. Supports file uploads via multipart/form-data; when uploading files, use multipart/form-data and encode complex parameters as JSON strings.

post/api/session

Request body

istring required

Interview filename (e.g. docassemble.demo:data/questions/questions.yml).

sessionstring required

Session ID.

secretstring

Encryption secret (required if the session uses encryption).

variablesobject

Key/value pairs of variables to set in the interview dictionary.

raw0 | 1

Set to 0 to skip automatic conversion of dates and DAObjects. Defaults to 1 (conversion enabled).

question_namestring

Name of the question being answered (needed for mandatory questions).

question0 | 1

Set to 0 to update variables without evaluating the interview or returning the current question. Default is 1.

advance_progress_meter0 | 1

Set to 1 to advance the progress meter.

overwrite0 | 1

Set to 1 to overwrite the previous step instead of creating a new one.

delete_variablesstring[]

Variable names to delete (after variables are set).

file_variablesobject

Maps upload field names to interview variable names when the field name cannot be used directly as the variable name.

event_liststring[]

List of variable names that triggered the current question.

Response

Current question as JSON (returned when question is not 0).

object required