Menu
Lumberyard
Developer Guide (Version 1.11)

Question Operations

You can use question operations to manage the questions in your Cloud Canvas in-game surveys.

Add a Question to a Survey

Adds a question to the specified survey.

Copy
POST /surveys/{survey_id}/questions

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

question

A question object that has the following syntax:

Copy
{ "title": "string", /* Question title. */ "type": "string", /* Question type. Can be predefined, scale, or text. */ "min": "integer", /* Minimum value for scale type question. */ "max": "integer", /* Maximum value for scale type question. */ "min_label": "string", /* Minimum value label for scale type question. Optional. */ "max_label": "string", /* Maximum value label for scale type question. Optional. */ "max_chars": "integer", /* Maximum allowed characters for text type question. */ "predefines": [ /* Predefined options for predefined type question. */ "string" ], "multiple_select": "boolean" /* Determines if predefined type question is single choice or multiple choices */ }

Located in: Body

Required: Yes

Response

Returns a string that contains a unique question ID that is generated by the server.

Copy
{ "question_id": "string" }

Change the Text of a Survey Question

Modifies an existing question in a survey.

Copy
PUT /surveys/{survey_id}/questions/{question_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

question_id

The question UUID that is returned from querying the survey object.

Type: String

Located in: Path

Required: Yes

question

The question object in the following format:

Copy
{ "question_id": "string", /* Unique question ID. */ "title": "string", /* Question title. */ "type": "string", /* Question type. Can be predefined, scale, or text. */ "min": "integer", /* Minimum value for scale type question. */ "max": "integer", /* Maximum value for scale type question. */ "min_label": "string", /* Minimum value label for scale type question. Optional. */ "max_label": "string", /* Maximum value label for scale type question. Optional. */ "max_chars": "integer", /* Maximum allowed characters for text type question. */ "predefines": [ /* Predefined options for predefined type question. */ "string" ], "multiple_select": "Boolean" /* Determines whether predefined type question is single choice or multiple choice. */ }

Located in: Body

Required: Yes

Response

Returns a string that reports the status of the modification.

Copy
{ "format": "string" }

Change the Question Order in a Survey

Modifies the question order for the survey that has the specified ID.

Copy
PUT /surveys/{survey_id}/question_order

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

question_order

An object that specifies the new question order.

Copy
{ "question_id_list": [ /* List of question IDs. */ "string" ] }

Response

Returns a string that reports the status of the modification.

Copy
{ "format": "string" }

Change the Status of a Survey Question

Modifies the status of the specified question in the specified survey.

Copy
PUT /surveys/{survey_id}/questions/{question_id}/status

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

question_id

The question UUID that is returned from querying the survey object.

Type: String

Located in: Path

Required: Yes

question_status

A question status object that indicates whether the question is enabled.

Copy
{ "enabled": "boolean" /* Determines if the question is enabled */ }

Located in: Body

Required: Yes

Response

Returns a string that reports the status of the modification.

Copy
{ "format": "string" }

Delete a Survey Question

Deletes the specified question in the specified survey. Returns the status of the deletion.

Copy
DELETE /surveys/{survey_id}/questions/{question_id}

Request Parameters

survey_id

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

Located in: Path

Required: Yes

Type: String

question_id

The question UUID that is returned from querying the survey object.

Located in: Path

Required: Yes

Type: String

Response

Returns a string that reports the status of the deletion.

Copy
{ "format": "string" }