Menu
Lumberyard
Developer Guide (Version 1.11)

Answer Submission Operations

You can use answer submission operations to manage answer submissions to your Cloud Canvas in-game surveys.

Submit Answers to a Survey

Submits answers to a survey.

Copy
POST /active/surveys/{survey_id}/answers

Request Parameters

survey_id

The survey UUID that is returned from creating a survey or querying survey metadata.

Type: String

Located in: Path

Required: Yes

answer_list

Specifies the answers to the survey with the following syntax:

Copy
{ "answers": [ { "question_id": "string", /* The question UUID returned from querying the survey object. */ "answer": [ "string" ] } ] }

Response

Returns a string that contains a unique submission ID. You can use the submission ID to submit additional answers or overwrite previous answers.

Copy
{ "submission_id": "string" }

Get Answer Submissions to a Survey

Gets answer submissions to the survey that has the specified ID.

Copy
GET /surveys/{survey_id}/answers

Request Parameters

survey_id

The survey UUID that is returned from creating a survey or querying survey metadata.

Type: String

Located in: Path

Required: Yes

limit

Limits the maximum number of answer submissions that are returned. The default is the maximum allowed value of 1000.

Type: Integer

Located in: Query

Required: No

pagination_token

A token returned by previous query to get next batch of answer submissions.

Type: String

Located in: Query

Required: No

sort

Specifies ascending or descending sort order for creation time. Possible values are ASC or DESC. The default is DESC.

Type: String

Located in: Query

Required: No

Response

Returns the answer submissions to the survey.

Copy
{ "pagination_token": "string", "submissions": [ { "submission_id": "string", "creation_time": "number", "answers": [ { "answers": [ { "question_id": "string", /* The question UUID returned from querying the survey object. */ "answer": [ "string" ] } ] } ] } ] }

Get a List of Answer Submission IDs

Gets a list of answer submission IDs for the specified survey.

Copy
GET /active/surveys/{survey_id}/player_submissions

Request Parameters

survey_id

The survey UUID that is returned from creating a survey or querying survey metadata.

Type: String

Located in: Path

Required: Yes

Response

Returns a string that contains a list of submission IDs.

Copy
{ "submission_id_list": [ "string" ] }

Get an Answer Submission by ID

Gets a player's submission of answers to a specified survey.

Copy
GET /active/surveys/{survey_id}/player_submission/{submission_id}

Request Parameters

survey_id

The survey UUID that is returned from creating a survey or querying survey metadata.

Type: String

Located in: Path

Required: Yes

submission_id

The submission ID that is returned when a player posts answers to the survey.

Type: String

Located in: Path

Required: Yes

Response

Returns a JSON object that contains a submission of answers from a player.

Copy
{ "submission_id": "string", "creation_time": "number", "answers": [ { "answers": [ { "question_id": "string", /* The question UUID returned from querying the survey object. */ "answer": [ "string" ] } ] } ] }

Get Aggregated Answers for a Survey

Gets answer aggregations to a survey.

Copy
GET /surveys/{survey_id}/answer_aggregations

Request Parameters

survey_id

The survey UUID that is returned from creating a survey or querying survey metadata.

Type: String

Located in: Path

Required: Yes

Response

Returns a JSON object that contains answer aggregations to the specified survey.

Copy
{ "question_answer_aggregations": [ { "question_id": "string", "answer_aggregations": [ { "answer": "string", "count": "integer" } ] } ] }

Update a Submission of Answers

Submits additional answers or overwrites answers from a previous submission to a survey.

Copy
PUT /active/surveys/{survey_id}/answers/{submission_id}

Request Parameters

survey_id

The survey UUID that is returned from creating a survey or querying survey metadata.

Type: String

Located in: Path

Required: Yes

submission_id

The submission ID that is returned when a player posts answers to the survey.

Type: String

Located in: Path

Required: Yes

answer_list

The answers to the survey in the following format:

Copy
{ "answers": [ { "question_id": "string", /* The question UUID returned from querying the survey object. */ "answer": [ "string" ] } ] }

Located in: Body

Required: Yes

Response

Returns a string that contains the submission ID that was specified in the query string.

Copy
{ "submission_id": "string" }

Delete an Answer Submission

Deletes the specified answer submission for the specified survey.

Copy
DELETE /surveys/{survey_id}/answers/{submission_id}

Request Parameters

survey_id

The survey UUID that is returned from creating a survey or querying survey metadata.

Type: String

Located in: Path

Required: Yes

submission_id

The submission ID that is returned when a player posts answers to the survey.

Type: String

Located in: Path

Required: Yes

Response

Returns a string that reports the status of the deletion.

Copy
{ "status": "string" }

Export Answer Submissions to a .csv File

Exports answer submissions asynchronously to a .csv file on Amazon S3.

Copy
POST /surveys/{survey_id}/answers/export_csv

Request Parameters

survey_id

The survey UUID that is returned from creating a survey or querying survey metadata.

Type: String

Located in: Path

Required: Yes

Response

Returns a string that contains a request ID that you can use to query the status of the task.

Copy
{ "requestId": "string" }

Get the Status of an Answer Submission Export

Gets the status of the export of answer submissions to a .csv file.

Copy
GET /surveys/{survey_id}/answers/export_csv/{request_id}

Request Parameters

survey_id

The survey UUID that is returned from creating a survey or querying survey metadata.

Type: String

Located in: Path

Required: Yes

request_id

The request ID that is returned from a request to export answers in a .csv file.

Type: String

Located in: Path

Required: Yes

Response

When the task is finished, returns a string that contains an Amazon S3 presigned URL.

Copy
{ "num_submissions_exported": "integer", "s3_presigned_url": "string" }