Menu
Lumberyard
Developer Guide (Version 1.11)

Survey Operations

You can use survey operations to manage your Cloud Canvas in-game surveys.

Create or Clone a Survey

Creates or clones a survey that has the name provided in the request body.

Copy
POST /surveys

Request Parameters

create_survey_input

Creates a survey input object. Use the survey_name field for the survey name. Use the optional survey_id_to_clone field if you want to clone the new survey from an existing survey.

Copy
{ "survey_name": "string", /* Survey name */ "survey_id_to_clone": "string" /* Optional. If specified, the new survey is cloned from the specified survey ID. */ }

Located in: Body

Required: Yes

Response

Returns a unique ID for the survey that is created.

Copy
{ "survey_id": "string", "creation_time": "integer" }

Publish or Unpublish a Survey

Publishes or unpublishes the survey that has the specified ID. Returns the status of the change.

Copy
PUT /surveys/{survey_id}/published

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

survey_published_status

The published status object that indicates whether the survey is published.

Copy
{ "published": "boolean" /* Determines if the survey is published */ }

Located in: Body

Required: Yes

Response

Returns a string that reports the status of the change.

Copy
{ "format": "string" }

Get an Active Survey by ID

Copy
GET /active/surveys/{survey_id}

Gets the active survey that has the specified survey 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_index

The index of the question from which to start the query.

Type: Integer

Located in: Query

Required: No

question_count

The number of questions to query starting with question_index.

Type: Integer

Located in: Query

Required: No

Response

Returns the active survey that has the specified ID in a JSON object.

Copy
{ "survey_id": "string", "survey_name": "string", "questions": [ { "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 the predefined type question is single choice or multiple choice. */ } ] }

Get a Survey by ID

Gets the survey with the specified survey ID.

Copy
GET /surveys/{survey_id}

Request Parameters

survey_id

Type: String

Located in: Path

Required: Yes

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

question_index

Type: Integer

Located in: Query

Required: No

Specifies the question from which to start querying.

question_count

Type: Integer

Located in: Query

Required: No

Specifies the number of questions to query starting from question_index.

Response

Returns the survey that has the specified ID in a JSON object.

Copy
{ "survey_id": "string", "survey_name": "string", "questions": [ { "enabled": "boolean", "question_id": "string", "title": "string", "type": "string", "min": "integer", "max": "integer", "min_label": "string", "max_label": "string", "max_chars": "integer", "predefines": [ "string" ], "multiple_select": "boolean" } ] }

Update the Activation Period for a Survey

Updates the activation period for the survey.

Copy
PUT /surveys/{survey_id}/activation_period

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

update_activation_period_input

Specifies the activation start time and activation end time using the following syntax:

Copy
{ "activation_start_time": "integer", /* Survey active window start epoch time. Optional. Starts from the current time if not supplied. */ "activation_end_time": "integer" /* Survey active window end epoch time. Optional. Does not end if not supplied. */ }

Located in: Body

Required: Yes

Response

Returns a string that reports the status of the update.

Copy
{ "format": "string" }

Rename a Survey

Renames the survey that has the specified ID.

Copy
PUT /surveys/{survey_id}/name

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

rename_survey_input

A rename survey object that specifies the new name for the survey.

Copy
{ "survey_name": "string" /* New survey name */ }

Located in: Body

Required: Yes

Response

Returns a string that reports the status of the renaming.

Copy
{ "format": "string" }

Delete a Survey

Deletes the survey that has the specified survey ID.

Copy
DELETE /surveys/{survey_id}

Request Parameters

survey_id

Type: String

Located in: Path

Required: Yes

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

Response

Returns a string that reports the status of the deletion.

Copy
{ "status": "string" }