REST Resource: forms.responses

Resource: FormResponse

A form response.

JSON representation
{
  "formId": string,
  "responseId": string,
  "createTime": string,
  "lastSubmittedTime": string,
  "respondentEmail": string,
  "answers": {
    string: {
      object (Answer)
    },
    ...
  },
  "totalScore": number
}
Fields
formId

string

Output only. The form ID.

responseId

string

Output only. The response ID.

createTime

string (Timestamp format)

Output only. Timestamp for the first time the response was submitted.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

lastSubmittedTime

string (Timestamp format)

Output only. Timestamp for the most recent time the response was submitted. Does not track changes to grades.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

respondentEmail

string

Output only. The email address (if collected) for the respondent.

answers

map (key: string, value: object (Answer))

Output only. The actual answers to the questions, keyed by questionId.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

totalScore

number

Output only. The total number of points the respondent received for their submission Only set if the form was a quiz and the response was graded. This includes points automatically awarded via autograding adjusted by any manual corrections entered by the form owner.

Answer

The submitted answer for a question.

JSON representation
{
  "questionId": string,
  "grade": {
    object (Grade)
  },

  // Union field value can be only one of the following:
  "textAnswers": {
    object (TextAnswers)
  },
  "fileUploadAnswers": {
    object (FileUploadAnswers)
  }
  // End of list of possible types for union field value.
}
Fields
questionId

string

Output only. The question's ID. See also Question.question_id.

grade

object (Grade)

Output only. The grade for the answer if the form was a quiz.

Union field value. The user's answer. value can be only one of the following:
textAnswers

object (TextAnswers)

Output only. The specific answers as text.

fileUploadAnswers

object (FileUploadAnswers)

Output only. The answers to a file upload question.

TextAnswers

A question's answers as text.

JSON representation
{
  "answers": [
    {
      object (TextAnswer)
    }
  ]
}
Fields
answers[]

object (TextAnswer)

Output only. Answers to a question. For multiple-value ChoiceQuestions, each answer is a separate value.

TextAnswer

An answer to a question represented as text.

JSON representation
{
  "value": string
}
Fields
value

string

Output only. The answer value.

Formatting used for different kinds of question:

  • ChoiceQuestion
    • RADIO or DROP_DOWN: A single string corresponding to the option that was selected.
    • CHECKBOX: Multiple strings corresponding to each option that was selected.
  • TextQuestion: The text that the user entered.
  • ScaleQuestion: A string containing the number that was selected.
  • DateQuestion
    • Without time or year: MM-DD e.g. "05-19"
    • With year: YYYY-MM-DD e.g. "1986-05-19"
    • With time: MM-DD HH:MM e.g. "05-19 14:51"
    • With year and time: YYYY-MM-DD HH:MM e.g. "1986-05-19 14:51"
  • TimeQuestion: String with time or duration in HH:MM format e.g. "14:51"
  • RowQuestion within QuestionGroupItem: The answer for each row of a QuestionGroupItem is represented as a separate Answer. Each will contain one string for RADIO-type choices or multiple strings for CHECKBOX choices.

FileUploadAnswers

All submitted files for a FileUpload question.

JSON representation
{
  "answers": [
    {
      object (FileUploadAnswer)
    }
  ]
}
Fields
answers[]

object (FileUploadAnswer)

Output only. All submitted files for a FileUpload question.

FileUploadAnswer

Info for a single file submitted to a file upload question.

JSON representation
{
  "fileId": string,
  "fileName": string,
  "mimeType": string
}
Fields
fileId

string

Output only. The ID of the Google Drive file.

fileName

string

Output only. The file name, as stored in Google Drive on upload.

mimeType

string

Output only. The MIME type of the file, as stored in Google Drive on upload.

Grade

Grade information associated with a respondent's answer to a question.

JSON representation
{
  "score": number,
  "correct": boolean,
  "feedback": {
    object (Feedback)
  }
}
Fields
score

number

Output only. The numeric score awarded for the answer.

correct

boolean

Output only. Whether the question was answered correctly or not. A zero-point score is not enough to infer incorrectness, since a correctly answered question could be worth zero points.

feedback

object (Feedback)

Output only. Additional feedback given for an answer.

Methods

get

Get one response from the form.

list

List a form's responses.