1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="surveys_v2.html">Surveys API</a> . <a href="surveys_v2.surveys.html">surveys</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#delete">delete(surveyUrlId)</a></code></p> 79<p class="firstline">Removes a survey from view in all user GET requests.</p> 80<p class="toc_element"> 81 <code><a href="#get">get(surveyUrlId)</a></code></p> 82<p class="firstline">Retrieves information about the specified survey.</p> 83<p class="toc_element"> 84 <code><a href="#insert">insert(body)</a></code></p> 85<p class="firstline">Creates a survey.</p> 86<p class="toc_element"> 87 <code><a href="#list">list(startIndex=None, maxResults=None, token=None)</a></code></p> 88<p class="firstline">Lists the surveys owned by the authenticated user.</p> 89<p class="toc_element"> 90 <code><a href="#start">start(resourceId, body)</a></code></p> 91<p class="firstline">Begins running a survey.</p> 92<p class="toc_element"> 93 <code><a href="#stop">stop(resourceId)</a></code></p> 94<p class="firstline">Stops a running survey.</p> 95<p class="toc_element"> 96 <code><a href="#update">update(surveyUrlId, body)</a></code></p> 97<p class="firstline">Updates a survey. Currently the only property that can be updated is the owners property.</p> 98<h3>Method Details</h3> 99<div class="method"> 100 <code class="details" id="delete">delete(surveyUrlId)</code> 101 <pre>Removes a survey from view in all user GET requests. 102 103Args: 104 surveyUrlId: string, External URL ID for the survey. (required) 105 106Returns: 107 An object of the form: 108 109 { 110 "requestId": "A String", # Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests. 111 }</pre> 112</div> 113 114<div class="method"> 115 <code class="details" id="get">get(surveyUrlId)</code> 116 <pre>Retrieves information about the specified survey. 117 118Args: 119 surveyUrlId: string, External URL ID for the survey. (required) 120 121Returns: 122 An object of the form: 123 124 { # Representation of an individual survey object. 125 "owners": [ # List of email addresses for survey owners. Must contain at least the address of the user making the API call. 126 "A String", 127 ], 128 "description": "A String", # Text description of the survey. 129 "title": "A String", # Optional name that will be given to the survey. 130 "customerData": "A String", # Additional information to store on behalf of the API consumer and associate with this question. This binary blob is treated as opaque. This field is limited to 64K bytes. 131 "state": "A String", # State that the survey is in. 132 "audience": { # Specifications for the target audience of a survey run through the API. # Targeting-criteria message containing demographic information 133 "countrySubdivision": "A String", # Country subdivision (states/provinces/etc) that surveys should be targeted to. For all countries except GB, ISO-3166-2 subdivision code is required (eg. 'US-OH' for Ohio, United States). For GB, NUTS 1 statistical region codes for the United Kingdom is required (eg. 'UK-UKC' for North East England). 134 "mobileAppPanelId": "A String", # Key for predefined panel that causes survey to be sent to a predefined set of Opinion Rewards App users. You must set PopulationSource to ANDROID_APP_PANEL to use this field. 135 "country": "A String", # Required country code that surveys should be targeted to. Accepts standard ISO 3166-1 2 character language codes. For instance, 'US' for the United States, and 'GB' for the United Kingdom. 136 "ages": [ # Optional list of age buckets to target. Supported age buckets are: ['18-24', '25-34', '35-44', '45-54', '55-64', '65+'] 137 "A String", 138 ], 139 "populationSource": "A String", # Online population source where the respondents are sampled from. 140 "languages": [ # Language code that surveys should be targeted to. For instance, 'en-US'. Surveys may target bilingual users by specifying a list of language codes (for example, 'de' and 'en-US'). In that case, all languages will be used for targeting users but the survey content (which is displayed) must match the first language listed. Accepts standard BCP47 language codes. See specification. 141 "A String", 142 ], 143 "gender": "A String", # Optional gender to target. 144 }, 145 "cost": { # Message defining the cost to run a given survey through API. # Cost to run the survey and collect the necessary number of responses. 146 "nanos": "A String", # Cost of survey in nano units of the given currency. DEPRECATED in favor of cost_per_response_nanos 147 "currencyCode": "A String", # Currency code that the cost is given in. 148 "costPerResponseNanos": "A String", # Cost per survey response in nano units of the given currency. To get the total cost for a survey, multiply this value by wanted_response_count. 149 "maxCostPerResponseNanos": "A String", # Threshold to start a survey automatically if the quoted price is at most this value. When a survey has a Screener (threshold) question, it must go through an incidence pricing test to determine the final cost per response. Typically you will have to make a followup call to start the survey giving the final computed cost per response. If the survey has no threshold_answers, setting this property will return an error. By specifying this property, you indicate the max price per response you are willing to pay in advance of the incidence test. If the price turns out to be lower than the specified value, the survey will begin immediately and you will be charged at the rate determined by the incidence pricing test. If the price turns out to be greater than the specified value the survey will not be started and you will instead be notified what price was determined by the incidence test. At that point, you must raise the value of this property to be greater than or equal to that cost before attempting to start the survey again. This will immediately start the survey as long the incidence test was run within the last 21 days. 150 }, 151 "surveyUrlId": "A String", # Unique survey ID, that is viewable in the URL of the Survey Creator UI 152 "questions": [ # List of questions defining the survey. 153 { # Message defining the question specifications. 154 "highValueLabel": "A String", # For rating questions, the text for the higher end of the scale, such as 'Best'. For numeric questions, a string representing a floating-point that is the maximum allowed number for a response. 155 "mustPickSuggestion": True or False, # Option to force the user to pick one of the open text suggestions. This requires that suggestions are provided for this question. 156 "thresholdAnswers": [ # The threshold/screener answer options, which will screen a user into the rest of the survey. These will be a subset of the answer option strings. 157 "A String", 158 ], 159 "sentimentText": "A String", # Used by the Rating Scale with Text question type. This text goes along with the question field that is presented to the respondent, and is the actual text that the respondent is asked to rate. 160 "question": "A String", # Required question text shown to the respondent. 161 "numStars": "A String", # Number of stars to use for ratings questions. 162 "lowValueLabel": "A String", # For rating questions, the text for the lower end of the scale, such as 'Worst'. For numeric questions, a string representing a floating-point that is the minimum allowed number for a response. 163 "videoId": "A String", # The YouTube video ID to be show in video questions. 164 "answers": [ # Required list of answer options for a question. 165 "A String", 166 ], 167 "lastAnswerPositionPinned": True or False, # Currently only support pinning an answer option to the last position. 168 "hasOther": True or False, # Option to allow open-ended text box for Single Answer and Multiple Answer question types. This can be used with SINGLE_ANSWER, SINGLE_ANSWER_WITH_IMAGE, MULTIPLE_ANSWERS, and MULTIPLE_ANSWERS_WITH_IMAGE question types. 169 "unitOfMeasurementLabel": "A String", # Optional unit of measurement for display (for example: hours, people, miles). 170 "images": [ 171 { # Container object for image data and alt_text. 172 "url": "A String", # The read-only URL for the hosted images. 173 "altText": "A String", # The alt text property used in image tags is required for all images. 174 "data": "A String", # Inline jpeg, gif, tiff, bmp, or png image raw bytes for an image question types. 175 }, 176 ], 177 "singleLineResponse": True or False, # Option to allow multiple line open text responses instead of a single line response. Note that we don't show auto-complete suggestions with multiple line responses. 178 "openTextSuggestions": [ # A list of suggested answers for open text question auto-complete. This is only valid if single_line_response is true. 179 "A String", 180 ], 181 "type": "A String", # Required field defining the question type. For details about configuring different type of questions, consult the question configuration guide. 182 "answerOrder": "A String", # The randomization option for multiple choice and multi-select questions. If not specified, this option defaults to randomize. 183 "openTextPlaceholder": "A String", # Placeholder text for an open text question. 184 }, 185 ], 186 "wantedResponseCount": 42, # Number of responses desired for the survey. 187 "rejectionReason": { # Message representing why the survey was rejected from review, if it was. # Reason for the survey being rejected. Only present if the survey state is rejected. 188 "explanation": "A String", # A human-readable explanation of what was wrong with the survey. 189 "type": "A String", # Which category of rejection this was. See the Google Surveys Help Center for additional details on each category. 190 }, 191 }</pre> 192</div> 193 194<div class="method"> 195 <code class="details" id="insert">insert(body)</code> 196 <pre>Creates a survey. 197 198Args: 199 body: object, The request body. (required) 200 The object takes the form of: 201 202{ # Representation of an individual survey object. 203 "owners": [ # List of email addresses for survey owners. Must contain at least the address of the user making the API call. 204 "A String", 205 ], 206 "description": "A String", # Text description of the survey. 207 "title": "A String", # Optional name that will be given to the survey. 208 "customerData": "A String", # Additional information to store on behalf of the API consumer and associate with this question. This binary blob is treated as opaque. This field is limited to 64K bytes. 209 "state": "A String", # State that the survey is in. 210 "audience": { # Specifications for the target audience of a survey run through the API. # Targeting-criteria message containing demographic information 211 "countrySubdivision": "A String", # Country subdivision (states/provinces/etc) that surveys should be targeted to. For all countries except GB, ISO-3166-2 subdivision code is required (eg. 'US-OH' for Ohio, United States). For GB, NUTS 1 statistical region codes for the United Kingdom is required (eg. 'UK-UKC' for North East England). 212 "mobileAppPanelId": "A String", # Key for predefined panel that causes survey to be sent to a predefined set of Opinion Rewards App users. You must set PopulationSource to ANDROID_APP_PANEL to use this field. 213 "country": "A String", # Required country code that surveys should be targeted to. Accepts standard ISO 3166-1 2 character language codes. For instance, 'US' for the United States, and 'GB' for the United Kingdom. 214 "ages": [ # Optional list of age buckets to target. Supported age buckets are: ['18-24', '25-34', '35-44', '45-54', '55-64', '65+'] 215 "A String", 216 ], 217 "populationSource": "A String", # Online population source where the respondents are sampled from. 218 "languages": [ # Language code that surveys should be targeted to. For instance, 'en-US'. Surveys may target bilingual users by specifying a list of language codes (for example, 'de' and 'en-US'). In that case, all languages will be used for targeting users but the survey content (which is displayed) must match the first language listed. Accepts standard BCP47 language codes. See specification. 219 "A String", 220 ], 221 "gender": "A String", # Optional gender to target. 222 }, 223 "cost": { # Message defining the cost to run a given survey through API. # Cost to run the survey and collect the necessary number of responses. 224 "nanos": "A String", # Cost of survey in nano units of the given currency. DEPRECATED in favor of cost_per_response_nanos 225 "currencyCode": "A String", # Currency code that the cost is given in. 226 "costPerResponseNanos": "A String", # Cost per survey response in nano units of the given currency. To get the total cost for a survey, multiply this value by wanted_response_count. 227 "maxCostPerResponseNanos": "A String", # Threshold to start a survey automatically if the quoted price is at most this value. When a survey has a Screener (threshold) question, it must go through an incidence pricing test to determine the final cost per response. Typically you will have to make a followup call to start the survey giving the final computed cost per response. If the survey has no threshold_answers, setting this property will return an error. By specifying this property, you indicate the max price per response you are willing to pay in advance of the incidence test. If the price turns out to be lower than the specified value, the survey will begin immediately and you will be charged at the rate determined by the incidence pricing test. If the price turns out to be greater than the specified value the survey will not be started and you will instead be notified what price was determined by the incidence test. At that point, you must raise the value of this property to be greater than or equal to that cost before attempting to start the survey again. This will immediately start the survey as long the incidence test was run within the last 21 days. 228 }, 229 "surveyUrlId": "A String", # Unique survey ID, that is viewable in the URL of the Survey Creator UI 230 "questions": [ # List of questions defining the survey. 231 { # Message defining the question specifications. 232 "highValueLabel": "A String", # For rating questions, the text for the higher end of the scale, such as 'Best'. For numeric questions, a string representing a floating-point that is the maximum allowed number for a response. 233 "mustPickSuggestion": True or False, # Option to force the user to pick one of the open text suggestions. This requires that suggestions are provided for this question. 234 "thresholdAnswers": [ # The threshold/screener answer options, which will screen a user into the rest of the survey. These will be a subset of the answer option strings. 235 "A String", 236 ], 237 "sentimentText": "A String", # Used by the Rating Scale with Text question type. This text goes along with the question field that is presented to the respondent, and is the actual text that the respondent is asked to rate. 238 "question": "A String", # Required question text shown to the respondent. 239 "numStars": "A String", # Number of stars to use for ratings questions. 240 "lowValueLabel": "A String", # For rating questions, the text for the lower end of the scale, such as 'Worst'. For numeric questions, a string representing a floating-point that is the minimum allowed number for a response. 241 "videoId": "A String", # The YouTube video ID to be show in video questions. 242 "answers": [ # Required list of answer options for a question. 243 "A String", 244 ], 245 "lastAnswerPositionPinned": True or False, # Currently only support pinning an answer option to the last position. 246 "hasOther": True or False, # Option to allow open-ended text box for Single Answer and Multiple Answer question types. This can be used with SINGLE_ANSWER, SINGLE_ANSWER_WITH_IMAGE, MULTIPLE_ANSWERS, and MULTIPLE_ANSWERS_WITH_IMAGE question types. 247 "unitOfMeasurementLabel": "A String", # Optional unit of measurement for display (for example: hours, people, miles). 248 "images": [ 249 { # Container object for image data and alt_text. 250 "url": "A String", # The read-only URL for the hosted images. 251 "altText": "A String", # The alt text property used in image tags is required for all images. 252 "data": "A String", # Inline jpeg, gif, tiff, bmp, or png image raw bytes for an image question types. 253 }, 254 ], 255 "singleLineResponse": True or False, # Option to allow multiple line open text responses instead of a single line response. Note that we don't show auto-complete suggestions with multiple line responses. 256 "openTextSuggestions": [ # A list of suggested answers for open text question auto-complete. This is only valid if single_line_response is true. 257 "A String", 258 ], 259 "type": "A String", # Required field defining the question type. For details about configuring different type of questions, consult the question configuration guide. 260 "answerOrder": "A String", # The randomization option for multiple choice and multi-select questions. If not specified, this option defaults to randomize. 261 "openTextPlaceholder": "A String", # Placeholder text for an open text question. 262 }, 263 ], 264 "wantedResponseCount": 42, # Number of responses desired for the survey. 265 "rejectionReason": { # Message representing why the survey was rejected from review, if it was. # Reason for the survey being rejected. Only present if the survey state is rejected. 266 "explanation": "A String", # A human-readable explanation of what was wrong with the survey. 267 "type": "A String", # Which category of rejection this was. See the Google Surveys Help Center for additional details on each category. 268 }, 269 } 270 271 272Returns: 273 An object of the form: 274 275 { # Representation of an individual survey object. 276 "owners": [ # List of email addresses for survey owners. Must contain at least the address of the user making the API call. 277 "A String", 278 ], 279 "description": "A String", # Text description of the survey. 280 "title": "A String", # Optional name that will be given to the survey. 281 "customerData": "A String", # Additional information to store on behalf of the API consumer and associate with this question. This binary blob is treated as opaque. This field is limited to 64K bytes. 282 "state": "A String", # State that the survey is in. 283 "audience": { # Specifications for the target audience of a survey run through the API. # Targeting-criteria message containing demographic information 284 "countrySubdivision": "A String", # Country subdivision (states/provinces/etc) that surveys should be targeted to. For all countries except GB, ISO-3166-2 subdivision code is required (eg. 'US-OH' for Ohio, United States). For GB, NUTS 1 statistical region codes for the United Kingdom is required (eg. 'UK-UKC' for North East England). 285 "mobileAppPanelId": "A String", # Key for predefined panel that causes survey to be sent to a predefined set of Opinion Rewards App users. You must set PopulationSource to ANDROID_APP_PANEL to use this field. 286 "country": "A String", # Required country code that surveys should be targeted to. Accepts standard ISO 3166-1 2 character language codes. For instance, 'US' for the United States, and 'GB' for the United Kingdom. 287 "ages": [ # Optional list of age buckets to target. Supported age buckets are: ['18-24', '25-34', '35-44', '45-54', '55-64', '65+'] 288 "A String", 289 ], 290 "populationSource": "A String", # Online population source where the respondents are sampled from. 291 "languages": [ # Language code that surveys should be targeted to. For instance, 'en-US'. Surveys may target bilingual users by specifying a list of language codes (for example, 'de' and 'en-US'). In that case, all languages will be used for targeting users but the survey content (which is displayed) must match the first language listed. Accepts standard BCP47 language codes. See specification. 292 "A String", 293 ], 294 "gender": "A String", # Optional gender to target. 295 }, 296 "cost": { # Message defining the cost to run a given survey through API. # Cost to run the survey and collect the necessary number of responses. 297 "nanos": "A String", # Cost of survey in nano units of the given currency. DEPRECATED in favor of cost_per_response_nanos 298 "currencyCode": "A String", # Currency code that the cost is given in. 299 "costPerResponseNanos": "A String", # Cost per survey response in nano units of the given currency. To get the total cost for a survey, multiply this value by wanted_response_count. 300 "maxCostPerResponseNanos": "A String", # Threshold to start a survey automatically if the quoted price is at most this value. When a survey has a Screener (threshold) question, it must go through an incidence pricing test to determine the final cost per response. Typically you will have to make a followup call to start the survey giving the final computed cost per response. If the survey has no threshold_answers, setting this property will return an error. By specifying this property, you indicate the max price per response you are willing to pay in advance of the incidence test. If the price turns out to be lower than the specified value, the survey will begin immediately and you will be charged at the rate determined by the incidence pricing test. If the price turns out to be greater than the specified value the survey will not be started and you will instead be notified what price was determined by the incidence test. At that point, you must raise the value of this property to be greater than or equal to that cost before attempting to start the survey again. This will immediately start the survey as long the incidence test was run within the last 21 days. 301 }, 302 "surveyUrlId": "A String", # Unique survey ID, that is viewable in the URL of the Survey Creator UI 303 "questions": [ # List of questions defining the survey. 304 { # Message defining the question specifications. 305 "highValueLabel": "A String", # For rating questions, the text for the higher end of the scale, such as 'Best'. For numeric questions, a string representing a floating-point that is the maximum allowed number for a response. 306 "mustPickSuggestion": True or False, # Option to force the user to pick one of the open text suggestions. This requires that suggestions are provided for this question. 307 "thresholdAnswers": [ # The threshold/screener answer options, which will screen a user into the rest of the survey. These will be a subset of the answer option strings. 308 "A String", 309 ], 310 "sentimentText": "A String", # Used by the Rating Scale with Text question type. This text goes along with the question field that is presented to the respondent, and is the actual text that the respondent is asked to rate. 311 "question": "A String", # Required question text shown to the respondent. 312 "numStars": "A String", # Number of stars to use for ratings questions. 313 "lowValueLabel": "A String", # For rating questions, the text for the lower end of the scale, such as 'Worst'. For numeric questions, a string representing a floating-point that is the minimum allowed number for a response. 314 "videoId": "A String", # The YouTube video ID to be show in video questions. 315 "answers": [ # Required list of answer options for a question. 316 "A String", 317 ], 318 "lastAnswerPositionPinned": True or False, # Currently only support pinning an answer option to the last position. 319 "hasOther": True or False, # Option to allow open-ended text box for Single Answer and Multiple Answer question types. This can be used with SINGLE_ANSWER, SINGLE_ANSWER_WITH_IMAGE, MULTIPLE_ANSWERS, and MULTIPLE_ANSWERS_WITH_IMAGE question types. 320 "unitOfMeasurementLabel": "A String", # Optional unit of measurement for display (for example: hours, people, miles). 321 "images": [ 322 { # Container object for image data and alt_text. 323 "url": "A String", # The read-only URL for the hosted images. 324 "altText": "A String", # The alt text property used in image tags is required for all images. 325 "data": "A String", # Inline jpeg, gif, tiff, bmp, or png image raw bytes for an image question types. 326 }, 327 ], 328 "singleLineResponse": True or False, # Option to allow multiple line open text responses instead of a single line response. Note that we don't show auto-complete suggestions with multiple line responses. 329 "openTextSuggestions": [ # A list of suggested answers for open text question auto-complete. This is only valid if single_line_response is true. 330 "A String", 331 ], 332 "type": "A String", # Required field defining the question type. For details about configuring different type of questions, consult the question configuration guide. 333 "answerOrder": "A String", # The randomization option for multiple choice and multi-select questions. If not specified, this option defaults to randomize. 334 "openTextPlaceholder": "A String", # Placeholder text for an open text question. 335 }, 336 ], 337 "wantedResponseCount": 42, # Number of responses desired for the survey. 338 "rejectionReason": { # Message representing why the survey was rejected from review, if it was. # Reason for the survey being rejected. Only present if the survey state is rejected. 339 "explanation": "A String", # A human-readable explanation of what was wrong with the survey. 340 "type": "A String", # Which category of rejection this was. See the Google Surveys Help Center for additional details on each category. 341 }, 342 }</pre> 343</div> 344 345<div class="method"> 346 <code class="details" id="list">list(startIndex=None, maxResults=None, token=None)</code> 347 <pre>Lists the surveys owned by the authenticated user. 348 349Args: 350 startIndex: integer, A parameter 351 maxResults: integer, A parameter 352 token: string, A parameter 353 354Returns: 355 An object of the form: 356 357 { 358 "tokenPagination": { 359 "nextPageToken": "A String", 360 "previousPageToken": "A String", 361 }, 362 "pageInfo": { 363 "totalResults": 42, 364 "startIndex": 42, 365 "resultPerPage": 42, 366 }, 367 "resources": [ # An individual survey resource. 368 { # Representation of an individual survey object. 369 "owners": [ # List of email addresses for survey owners. Must contain at least the address of the user making the API call. 370 "A String", 371 ], 372 "description": "A String", # Text description of the survey. 373 "title": "A String", # Optional name that will be given to the survey. 374 "customerData": "A String", # Additional information to store on behalf of the API consumer and associate with this question. This binary blob is treated as opaque. This field is limited to 64K bytes. 375 "state": "A String", # State that the survey is in. 376 "audience": { # Specifications for the target audience of a survey run through the API. # Targeting-criteria message containing demographic information 377 "countrySubdivision": "A String", # Country subdivision (states/provinces/etc) that surveys should be targeted to. For all countries except GB, ISO-3166-2 subdivision code is required (eg. 'US-OH' for Ohio, United States). For GB, NUTS 1 statistical region codes for the United Kingdom is required (eg. 'UK-UKC' for North East England). 378 "mobileAppPanelId": "A String", # Key for predefined panel that causes survey to be sent to a predefined set of Opinion Rewards App users. You must set PopulationSource to ANDROID_APP_PANEL to use this field. 379 "country": "A String", # Required country code that surveys should be targeted to. Accepts standard ISO 3166-1 2 character language codes. For instance, 'US' for the United States, and 'GB' for the United Kingdom. 380 "ages": [ # Optional list of age buckets to target. Supported age buckets are: ['18-24', '25-34', '35-44', '45-54', '55-64', '65+'] 381 "A String", 382 ], 383 "populationSource": "A String", # Online population source where the respondents are sampled from. 384 "languages": [ # Language code that surveys should be targeted to. For instance, 'en-US'. Surveys may target bilingual users by specifying a list of language codes (for example, 'de' and 'en-US'). In that case, all languages will be used for targeting users but the survey content (which is displayed) must match the first language listed. Accepts standard BCP47 language codes. See specification. 385 "A String", 386 ], 387 "gender": "A String", # Optional gender to target. 388 }, 389 "cost": { # Message defining the cost to run a given survey through API. # Cost to run the survey and collect the necessary number of responses. 390 "nanos": "A String", # Cost of survey in nano units of the given currency. DEPRECATED in favor of cost_per_response_nanos 391 "currencyCode": "A String", # Currency code that the cost is given in. 392 "costPerResponseNanos": "A String", # Cost per survey response in nano units of the given currency. To get the total cost for a survey, multiply this value by wanted_response_count. 393 "maxCostPerResponseNanos": "A String", # Threshold to start a survey automatically if the quoted price is at most this value. When a survey has a Screener (threshold) question, it must go through an incidence pricing test to determine the final cost per response. Typically you will have to make a followup call to start the survey giving the final computed cost per response. If the survey has no threshold_answers, setting this property will return an error. By specifying this property, you indicate the max price per response you are willing to pay in advance of the incidence test. If the price turns out to be lower than the specified value, the survey will begin immediately and you will be charged at the rate determined by the incidence pricing test. If the price turns out to be greater than the specified value the survey will not be started and you will instead be notified what price was determined by the incidence test. At that point, you must raise the value of this property to be greater than or equal to that cost before attempting to start the survey again. This will immediately start the survey as long the incidence test was run within the last 21 days. 394 }, 395 "surveyUrlId": "A String", # Unique survey ID, that is viewable in the URL of the Survey Creator UI 396 "questions": [ # List of questions defining the survey. 397 { # Message defining the question specifications. 398 "highValueLabel": "A String", # For rating questions, the text for the higher end of the scale, such as 'Best'. For numeric questions, a string representing a floating-point that is the maximum allowed number for a response. 399 "mustPickSuggestion": True or False, # Option to force the user to pick one of the open text suggestions. This requires that suggestions are provided for this question. 400 "thresholdAnswers": [ # The threshold/screener answer options, which will screen a user into the rest of the survey. These will be a subset of the answer option strings. 401 "A String", 402 ], 403 "sentimentText": "A String", # Used by the Rating Scale with Text question type. This text goes along with the question field that is presented to the respondent, and is the actual text that the respondent is asked to rate. 404 "question": "A String", # Required question text shown to the respondent. 405 "numStars": "A String", # Number of stars to use for ratings questions. 406 "lowValueLabel": "A String", # For rating questions, the text for the lower end of the scale, such as 'Worst'. For numeric questions, a string representing a floating-point that is the minimum allowed number for a response. 407 "videoId": "A String", # The YouTube video ID to be show in video questions. 408 "answers": [ # Required list of answer options for a question. 409 "A String", 410 ], 411 "lastAnswerPositionPinned": True or False, # Currently only support pinning an answer option to the last position. 412 "hasOther": True or False, # Option to allow open-ended text box for Single Answer and Multiple Answer question types. This can be used with SINGLE_ANSWER, SINGLE_ANSWER_WITH_IMAGE, MULTIPLE_ANSWERS, and MULTIPLE_ANSWERS_WITH_IMAGE question types. 413 "unitOfMeasurementLabel": "A String", # Optional unit of measurement for display (for example: hours, people, miles). 414 "images": [ 415 { # Container object for image data and alt_text. 416 "url": "A String", # The read-only URL for the hosted images. 417 "altText": "A String", # The alt text property used in image tags is required for all images. 418 "data": "A String", # Inline jpeg, gif, tiff, bmp, or png image raw bytes for an image question types. 419 }, 420 ], 421 "singleLineResponse": True or False, # Option to allow multiple line open text responses instead of a single line response. Note that we don't show auto-complete suggestions with multiple line responses. 422 "openTextSuggestions": [ # A list of suggested answers for open text question auto-complete. This is only valid if single_line_response is true. 423 "A String", 424 ], 425 "type": "A String", # Required field defining the question type. For details about configuring different type of questions, consult the question configuration guide. 426 "answerOrder": "A String", # The randomization option for multiple choice and multi-select questions. If not specified, this option defaults to randomize. 427 "openTextPlaceholder": "A String", # Placeholder text for an open text question. 428 }, 429 ], 430 "wantedResponseCount": 42, # Number of responses desired for the survey. 431 "rejectionReason": { # Message representing why the survey was rejected from review, if it was. # Reason for the survey being rejected. Only present if the survey state is rejected. 432 "explanation": "A String", # A human-readable explanation of what was wrong with the survey. 433 "type": "A String", # Which category of rejection this was. See the Google Surveys Help Center for additional details on each category. 434 }, 435 }, 436 ], 437 "requestId": "A String", # Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests. 438 }</pre> 439</div> 440 441<div class="method"> 442 <code class="details" id="start">start(resourceId, body)</code> 443 <pre>Begins running a survey. 444 445Args: 446 resourceId: string, A parameter (required) 447 body: object, The request body. (required) 448 The object takes the form of: 449 450{ 451 "maxCostPerResponseNanos": "A String", # Threshold to start a survey automically if the quoted prices is less than or equal to this value. See Survey.Cost for more details. 452 } 453 454 455Returns: 456 An object of the form: 457 458 { 459 "requestId": "A String", # Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests. 460 }</pre> 461</div> 462 463<div class="method"> 464 <code class="details" id="stop">stop(resourceId)</code> 465 <pre>Stops a running survey. 466 467Args: 468 resourceId: string, A parameter (required) 469 470Returns: 471 An object of the form: 472 473 { 474 "requestId": "A String", # Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests. 475 }</pre> 476</div> 477 478<div class="method"> 479 <code class="details" id="update">update(surveyUrlId, body)</code> 480 <pre>Updates a survey. Currently the only property that can be updated is the owners property. 481 482Args: 483 surveyUrlId: string, External URL ID for the survey. (required) 484 body: object, The request body. (required) 485 The object takes the form of: 486 487{ # Representation of an individual survey object. 488 "owners": [ # List of email addresses for survey owners. Must contain at least the address of the user making the API call. 489 "A String", 490 ], 491 "description": "A String", # Text description of the survey. 492 "title": "A String", # Optional name that will be given to the survey. 493 "customerData": "A String", # Additional information to store on behalf of the API consumer and associate with this question. This binary blob is treated as opaque. This field is limited to 64K bytes. 494 "state": "A String", # State that the survey is in. 495 "audience": { # Specifications for the target audience of a survey run through the API. # Targeting-criteria message containing demographic information 496 "countrySubdivision": "A String", # Country subdivision (states/provinces/etc) that surveys should be targeted to. For all countries except GB, ISO-3166-2 subdivision code is required (eg. 'US-OH' for Ohio, United States). For GB, NUTS 1 statistical region codes for the United Kingdom is required (eg. 'UK-UKC' for North East England). 497 "mobileAppPanelId": "A String", # Key for predefined panel that causes survey to be sent to a predefined set of Opinion Rewards App users. You must set PopulationSource to ANDROID_APP_PANEL to use this field. 498 "country": "A String", # Required country code that surveys should be targeted to. Accepts standard ISO 3166-1 2 character language codes. For instance, 'US' for the United States, and 'GB' for the United Kingdom. 499 "ages": [ # Optional list of age buckets to target. Supported age buckets are: ['18-24', '25-34', '35-44', '45-54', '55-64', '65+'] 500 "A String", 501 ], 502 "populationSource": "A String", # Online population source where the respondents are sampled from. 503 "languages": [ # Language code that surveys should be targeted to. For instance, 'en-US'. Surveys may target bilingual users by specifying a list of language codes (for example, 'de' and 'en-US'). In that case, all languages will be used for targeting users but the survey content (which is displayed) must match the first language listed. Accepts standard BCP47 language codes. See specification. 504 "A String", 505 ], 506 "gender": "A String", # Optional gender to target. 507 }, 508 "cost": { # Message defining the cost to run a given survey through API. # Cost to run the survey and collect the necessary number of responses. 509 "nanos": "A String", # Cost of survey in nano units of the given currency. DEPRECATED in favor of cost_per_response_nanos 510 "currencyCode": "A String", # Currency code that the cost is given in. 511 "costPerResponseNanos": "A String", # Cost per survey response in nano units of the given currency. To get the total cost for a survey, multiply this value by wanted_response_count. 512 "maxCostPerResponseNanos": "A String", # Threshold to start a survey automatically if the quoted price is at most this value. When a survey has a Screener (threshold) question, it must go through an incidence pricing test to determine the final cost per response. Typically you will have to make a followup call to start the survey giving the final computed cost per response. If the survey has no threshold_answers, setting this property will return an error. By specifying this property, you indicate the max price per response you are willing to pay in advance of the incidence test. If the price turns out to be lower than the specified value, the survey will begin immediately and you will be charged at the rate determined by the incidence pricing test. If the price turns out to be greater than the specified value the survey will not be started and you will instead be notified what price was determined by the incidence test. At that point, you must raise the value of this property to be greater than or equal to that cost before attempting to start the survey again. This will immediately start the survey as long the incidence test was run within the last 21 days. 513 }, 514 "surveyUrlId": "A String", # Unique survey ID, that is viewable in the URL of the Survey Creator UI 515 "questions": [ # List of questions defining the survey. 516 { # Message defining the question specifications. 517 "highValueLabel": "A String", # For rating questions, the text for the higher end of the scale, such as 'Best'. For numeric questions, a string representing a floating-point that is the maximum allowed number for a response. 518 "mustPickSuggestion": True or False, # Option to force the user to pick one of the open text suggestions. This requires that suggestions are provided for this question. 519 "thresholdAnswers": [ # The threshold/screener answer options, which will screen a user into the rest of the survey. These will be a subset of the answer option strings. 520 "A String", 521 ], 522 "sentimentText": "A String", # Used by the Rating Scale with Text question type. This text goes along with the question field that is presented to the respondent, and is the actual text that the respondent is asked to rate. 523 "question": "A String", # Required question text shown to the respondent. 524 "numStars": "A String", # Number of stars to use for ratings questions. 525 "lowValueLabel": "A String", # For rating questions, the text for the lower end of the scale, such as 'Worst'. For numeric questions, a string representing a floating-point that is the minimum allowed number for a response. 526 "videoId": "A String", # The YouTube video ID to be show in video questions. 527 "answers": [ # Required list of answer options for a question. 528 "A String", 529 ], 530 "lastAnswerPositionPinned": True or False, # Currently only support pinning an answer option to the last position. 531 "hasOther": True or False, # Option to allow open-ended text box for Single Answer and Multiple Answer question types. This can be used with SINGLE_ANSWER, SINGLE_ANSWER_WITH_IMAGE, MULTIPLE_ANSWERS, and MULTIPLE_ANSWERS_WITH_IMAGE question types. 532 "unitOfMeasurementLabel": "A String", # Optional unit of measurement for display (for example: hours, people, miles). 533 "images": [ 534 { # Container object for image data and alt_text. 535 "url": "A String", # The read-only URL for the hosted images. 536 "altText": "A String", # The alt text property used in image tags is required for all images. 537 "data": "A String", # Inline jpeg, gif, tiff, bmp, or png image raw bytes for an image question types. 538 }, 539 ], 540 "singleLineResponse": True or False, # Option to allow multiple line open text responses instead of a single line response. Note that we don't show auto-complete suggestions with multiple line responses. 541 "openTextSuggestions": [ # A list of suggested answers for open text question auto-complete. This is only valid if single_line_response is true. 542 "A String", 543 ], 544 "type": "A String", # Required field defining the question type. For details about configuring different type of questions, consult the question configuration guide. 545 "answerOrder": "A String", # The randomization option for multiple choice and multi-select questions. If not specified, this option defaults to randomize. 546 "openTextPlaceholder": "A String", # Placeholder text for an open text question. 547 }, 548 ], 549 "wantedResponseCount": 42, # Number of responses desired for the survey. 550 "rejectionReason": { # Message representing why the survey was rejected from review, if it was. # Reason for the survey being rejected. Only present if the survey state is rejected. 551 "explanation": "A String", # A human-readable explanation of what was wrong with the survey. 552 "type": "A String", # Which category of rejection this was. See the Google Surveys Help Center for additional details on each category. 553 }, 554 } 555 556 557Returns: 558 An object of the form: 559 560 { # Representation of an individual survey object. 561 "owners": [ # List of email addresses for survey owners. Must contain at least the address of the user making the API call. 562 "A String", 563 ], 564 "description": "A String", # Text description of the survey. 565 "title": "A String", # Optional name that will be given to the survey. 566 "customerData": "A String", # Additional information to store on behalf of the API consumer and associate with this question. This binary blob is treated as opaque. This field is limited to 64K bytes. 567 "state": "A String", # State that the survey is in. 568 "audience": { # Specifications for the target audience of a survey run through the API. # Targeting-criteria message containing demographic information 569 "countrySubdivision": "A String", # Country subdivision (states/provinces/etc) that surveys should be targeted to. For all countries except GB, ISO-3166-2 subdivision code is required (eg. 'US-OH' for Ohio, United States). For GB, NUTS 1 statistical region codes for the United Kingdom is required (eg. 'UK-UKC' for North East England). 570 "mobileAppPanelId": "A String", # Key for predefined panel that causes survey to be sent to a predefined set of Opinion Rewards App users. You must set PopulationSource to ANDROID_APP_PANEL to use this field. 571 "country": "A String", # Required country code that surveys should be targeted to. Accepts standard ISO 3166-1 2 character language codes. For instance, 'US' for the United States, and 'GB' for the United Kingdom. 572 "ages": [ # Optional list of age buckets to target. Supported age buckets are: ['18-24', '25-34', '35-44', '45-54', '55-64', '65+'] 573 "A String", 574 ], 575 "populationSource": "A String", # Online population source where the respondents are sampled from. 576 "languages": [ # Language code that surveys should be targeted to. For instance, 'en-US'. Surveys may target bilingual users by specifying a list of language codes (for example, 'de' and 'en-US'). In that case, all languages will be used for targeting users but the survey content (which is displayed) must match the first language listed. Accepts standard BCP47 language codes. See specification. 577 "A String", 578 ], 579 "gender": "A String", # Optional gender to target. 580 }, 581 "cost": { # Message defining the cost to run a given survey through API. # Cost to run the survey and collect the necessary number of responses. 582 "nanos": "A String", # Cost of survey in nano units of the given currency. DEPRECATED in favor of cost_per_response_nanos 583 "currencyCode": "A String", # Currency code that the cost is given in. 584 "costPerResponseNanos": "A String", # Cost per survey response in nano units of the given currency. To get the total cost for a survey, multiply this value by wanted_response_count. 585 "maxCostPerResponseNanos": "A String", # Threshold to start a survey automatically if the quoted price is at most this value. When a survey has a Screener (threshold) question, it must go through an incidence pricing test to determine the final cost per response. Typically you will have to make a followup call to start the survey giving the final computed cost per response. If the survey has no threshold_answers, setting this property will return an error. By specifying this property, you indicate the max price per response you are willing to pay in advance of the incidence test. If the price turns out to be lower than the specified value, the survey will begin immediately and you will be charged at the rate determined by the incidence pricing test. If the price turns out to be greater than the specified value the survey will not be started and you will instead be notified what price was determined by the incidence test. At that point, you must raise the value of this property to be greater than or equal to that cost before attempting to start the survey again. This will immediately start the survey as long the incidence test was run within the last 21 days. 586 }, 587 "surveyUrlId": "A String", # Unique survey ID, that is viewable in the URL of the Survey Creator UI 588 "questions": [ # List of questions defining the survey. 589 { # Message defining the question specifications. 590 "highValueLabel": "A String", # For rating questions, the text for the higher end of the scale, such as 'Best'. For numeric questions, a string representing a floating-point that is the maximum allowed number for a response. 591 "mustPickSuggestion": True or False, # Option to force the user to pick one of the open text suggestions. This requires that suggestions are provided for this question. 592 "thresholdAnswers": [ # The threshold/screener answer options, which will screen a user into the rest of the survey. These will be a subset of the answer option strings. 593 "A String", 594 ], 595 "sentimentText": "A String", # Used by the Rating Scale with Text question type. This text goes along with the question field that is presented to the respondent, and is the actual text that the respondent is asked to rate. 596 "question": "A String", # Required question text shown to the respondent. 597 "numStars": "A String", # Number of stars to use for ratings questions. 598 "lowValueLabel": "A String", # For rating questions, the text for the lower end of the scale, such as 'Worst'. For numeric questions, a string representing a floating-point that is the minimum allowed number for a response. 599 "videoId": "A String", # The YouTube video ID to be show in video questions. 600 "answers": [ # Required list of answer options for a question. 601 "A String", 602 ], 603 "lastAnswerPositionPinned": True or False, # Currently only support pinning an answer option to the last position. 604 "hasOther": True or False, # Option to allow open-ended text box for Single Answer and Multiple Answer question types. This can be used with SINGLE_ANSWER, SINGLE_ANSWER_WITH_IMAGE, MULTIPLE_ANSWERS, and MULTIPLE_ANSWERS_WITH_IMAGE question types. 605 "unitOfMeasurementLabel": "A String", # Optional unit of measurement for display (for example: hours, people, miles). 606 "images": [ 607 { # Container object for image data and alt_text. 608 "url": "A String", # The read-only URL for the hosted images. 609 "altText": "A String", # The alt text property used in image tags is required for all images. 610 "data": "A String", # Inline jpeg, gif, tiff, bmp, or png image raw bytes for an image question types. 611 }, 612 ], 613 "singleLineResponse": True or False, # Option to allow multiple line open text responses instead of a single line response. Note that we don't show auto-complete suggestions with multiple line responses. 614 "openTextSuggestions": [ # A list of suggested answers for open text question auto-complete. This is only valid if single_line_response is true. 615 "A String", 616 ], 617 "type": "A String", # Required field defining the question type. For details about configuring different type of questions, consult the question configuration guide. 618 "answerOrder": "A String", # The randomization option for multiple choice and multi-select questions. If not specified, this option defaults to randomize. 619 "openTextPlaceholder": "A String", # Placeholder text for an open text question. 620 }, 621 ], 622 "wantedResponseCount": 42, # Number of responses desired for the survey. 623 "rejectionReason": { # Message representing why the survey was rejected from review, if it was. # Reason for the survey being rejected. Only present if the survey state is rejected. 624 "explanation": "A String", # A human-readable explanation of what was wrong with the survey. 625 "type": "A String", # Which category of rejection this was. See the Google Surveys Help Center for additional details on each category. 626 }, 627 }</pre> 628</div> 629 630</body></html>