2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-24 05:37:37 +00:00
restic/vendor/google.golang.org/api/surveys/v2/surveys-api.json
2017-09-21 17:48:45 +02:00

865 lines
26 KiB
JSON

{
"kind": "discovery#restDescription",
"etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/v4y1albctEEy0b5g9DBMxLokUPs\"",
"discoveryVersion": "v1",
"id": "surveys:v2",
"name": "surveys",
"canonicalName": "Surveys",
"version": "v2",
"revision": "20170407",
"title": "Surveys API",
"description": "Creates and conducts surveys, lists the surveys that an authenticated user owns, and retrieves survey results and information about specified surveys.",
"ownerDomain": "google.com",
"ownerName": "Google",
"icons": {
"x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png",
"x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png"
},
"protocol": "rest",
"baseUrl": "https://www.googleapis.com/surveys/v2/",
"basePath": "/surveys/v2/",
"rootUrl": "https://www.googleapis.com/",
"servicePath": "surveys/v2/",
"batchPath": "batch/surveys/v2",
"parameters": {
"alt": {
"type": "string",
"description": "Data format for the response.",
"default": "json",
"enum": [
"json"
],
"enumDescriptions": [
"Responses with Content-Type of application/json"
],
"location": "query"
},
"fields": {
"type": "string",
"description": "Selector specifying which fields to include in a partial response.",
"location": "query"
},
"key": {
"type": "string",
"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
"location": "query"
},
"oauth_token": {
"type": "string",
"description": "OAuth 2.0 token for the current user.",
"location": "query"
},
"prettyPrint": {
"type": "boolean",
"description": "Returns response with indentations and line breaks.",
"default": "true",
"location": "query"
},
"quotaUser": {
"type": "string",
"description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.",
"location": "query"
},
"userIp": {
"type": "string",
"description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.",
"location": "query"
}
},
"auth": {
"oauth2": {
"scopes": {
"https://www.googleapis.com/auth/surveys": {
"description": "View and manage your surveys and results"
},
"https://www.googleapis.com/auth/surveys.readonly": {
"description": "View your surveys and survey results"
},
"https://www.googleapis.com/auth/userinfo.email": {
"description": "View your email address"
}
}
}
},
"schemas": {
"FieldMask": {
"id": "FieldMask",
"type": "object",
"properties": {
"fields": {
"type": "array",
"items": {
"$ref": "FieldMask"
}
},
"id": {
"type": "integer",
"format": "int32"
}
}
},
"MobileAppPanel": {
"id": "MobileAppPanel",
"type": "object",
"description": "Representation of an individual pre-defined panel object defining a targeted audience of opinion rewards mobile app users.",
"properties": {
"country": {
"type": "string",
"description": "Country code for the country of the users that the panel contains. Uses standard ISO 3166-1 2-character language codes. For instance, 'US' for the United States, and 'GB' for the United Kingdom. Any survey created targeting this panel must also target the corresponding country."
},
"isPublicPanel": {
"type": "boolean",
"description": "Whether or not the panel is accessible to all API users."
},
"language": {
"type": "string",
"description": "Language code that the panel can target. For instance, 'en-US'. Uses standard BCP47 language codes. See specification. Any survey created targeting this panel must also target the corresponding language."
},
"mobileAppPanelId": {
"type": "string",
"description": "Unique panel ID string. This corresponds to the mobile_app_panel_id used in Survey Insert requests."
},
"name": {
"type": "string",
"description": "Human readable name of the audience panel."
},
"owners": {
"type": "array",
"description": "List of email addresses for users who can target members of this panel. Must contain at least the address of the user making the API call for panels that are not public. This field will be empty for public panels.",
"items": {
"type": "string"
}
}
}
},
"MobileAppPanelsListResponse": {
"id": "MobileAppPanelsListResponse",
"type": "object",
"properties": {
"pageInfo": {
"$ref": "PageInfo"
},
"requestId": {
"type": "string",
"description": "Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests."
},
"resources": {
"type": "array",
"description": "An individual predefined panel of Opinion Rewards mobile users.",
"items": {
"$ref": "MobileAppPanel"
}
},
"tokenPagination": {
"$ref": "TokenPagination"
}
}
},
"PageInfo": {
"id": "PageInfo",
"type": "object",
"properties": {
"resultPerPage": {
"type": "integer",
"format": "int32"
},
"startIndex": {
"type": "integer",
"format": "int32"
},
"totalResults": {
"type": "integer",
"format": "int32"
}
}
},
"ResultsGetRequest": {
"id": "ResultsGetRequest",
"type": "object",
"properties": {
"resultMask": {
"$ref": "ResultsMask"
}
}
},
"ResultsMask": {
"id": "ResultsMask",
"type": "object",
"properties": {
"fields": {
"type": "array",
"items": {
"$ref": "FieldMask"
}
},
"projection": {
"type": "string"
}
}
},
"Survey": {
"id": "Survey",
"type": "object",
"description": "Representation of an individual survey object.",
"properties": {
"audience": {
"$ref": "SurveyAudience",
"description": "Targeting-criteria message containing demographic information"
},
"cost": {
"$ref": "SurveyCost",
"description": "Cost to run the survey and collect the necessary number of responses."
},
"customerData": {
"type": "string",
"description": "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.",
"format": "byte"
},
"description": {
"type": "string",
"description": "Text description of the survey."
},
"owners": {
"type": "array",
"description": "List of email addresses for survey owners. Must contain at least the address of the user making the API call.",
"items": {
"type": "string"
},
"annotations": {
"required": [
"surveys.surveys.insert"
]
}
},
"questions": {
"type": "array",
"description": "List of questions defining the survey.",
"items": {
"$ref": "SurveyQuestion"
},
"annotations": {
"required": [
"surveys.surveys.insert"
]
}
},
"rejectionReason": {
"$ref": "SurveyRejection",
"description": "Reason for the survey being rejected. Only present if the survey state is rejected."
},
"state": {
"type": "string",
"description": "State that the survey is in."
},
"surveyUrlId": {
"type": "string",
"description": "Unique survey ID, that is viewable in the URL of the Survey Creator UI"
},
"title": {
"type": "string",
"description": "Optional name that will be given to the survey."
},
"wantedResponseCount": {
"type": "integer",
"description": "Number of responses desired for the survey.",
"format": "int32"
}
}
},
"SurveyAudience": {
"id": "SurveyAudience",
"type": "object",
"description": "Specifications for the target audience of a survey run through the API.",
"properties": {
"ages": {
"type": "array",
"description": "Optional list of age buckets to target. Supported age buckets are: ['18-24', '25-34', '35-44', '45-54', '55-64', '65+']",
"items": {
"type": "string"
}
},
"country": {
"type": "string",
"description": "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.",
"annotations": {
"required": [
"surveys.surveys.insert"
]
}
},
"countrySubdivision": {
"type": "string",
"description": "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)."
},
"gender": {
"type": "string",
"description": "Optional gender to target."
},
"languages": {
"type": "array",
"description": "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.",
"items": {
"type": "string"
},
"annotations": {
"required": [
"surveys.surveys.insert"
]
}
},
"mobileAppPanelId": {
"type": "string",
"description": "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."
},
"populationSource": {
"type": "string",
"description": "Online population source where the respondents are sampled from."
}
}
},
"SurveyCost": {
"id": "SurveyCost",
"type": "object",
"description": "Message defining the cost to run a given survey through API.",
"properties": {
"costPerResponseNanos": {
"type": "string",
"description": "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.",
"format": "int64"
},
"currencyCode": {
"type": "string",
"description": "Currency code that the cost is given in."
},
"maxCostPerResponseNanos": {
"type": "string",
"description": "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.",
"format": "int64"
},
"nanos": {
"type": "string",
"description": "Cost of survey in nano units of the given currency. DEPRECATED in favor of cost_per_response_nanos",
"format": "int64"
}
}
},
"SurveyQuestion": {
"id": "SurveyQuestion",
"type": "object",
"description": "Message defining the question specifications.",
"properties": {
"answerOrder": {
"type": "string",
"description": "The randomization option for multiple choice and multi-select questions. If not specified, this option defaults to randomize."
},
"answers": {
"type": "array",
"description": "Required list of answer options for a question.",
"items": {
"type": "string"
}
},
"hasOther": {
"type": "boolean",
"description": "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."
},
"highValueLabel": {
"type": "string",
"description": "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."
},
"images": {
"type": "array",
"items": {
"$ref": "SurveyQuestionImage"
}
},
"lastAnswerPositionPinned": {
"type": "boolean",
"description": "Currently only support pinning an answer option to the last position."
},
"lowValueLabel": {
"type": "string",
"description": "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."
},
"mustPickSuggestion": {
"type": "boolean",
"description": "Option to force the user to pick one of the open text suggestions. This requires that suggestions are provided for this question."
},
"numStars": {
"type": "string",
"description": "Number of stars to use for ratings questions."
},
"openTextPlaceholder": {
"type": "string",
"description": "Placeholder text for an open text question."
},
"openTextSuggestions": {
"type": "array",
"description": "A list of suggested answers for open text question auto-complete. This is only valid if single_line_response is true.",
"items": {
"type": "string"
}
},
"question": {
"type": "string",
"description": "Required question text shown to the respondent."
},
"sentimentText": {
"type": "string",
"description": "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."
},
"singleLineResponse": {
"type": "boolean",
"description": "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."
},
"thresholdAnswers": {
"type": "array",
"description": "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.",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"description": "Required field defining the question type. For details about configuring different type of questions, consult the question configuration guide.",
"annotations": {
"required": [
"surveys.surveys.insert"
]
}
},
"unitOfMeasurementLabel": {
"type": "string",
"description": "Optional unit of measurement for display (for example: hours, people, miles)."
},
"videoId": {
"type": "string",
"description": "The YouTube video ID to be show in video questions."
}
}
},
"SurveyQuestionImage": {
"id": "SurveyQuestionImage",
"type": "object",
"description": "Container object for image data and alt_text.",
"properties": {
"altText": {
"type": "string",
"description": "The alt text property used in image tags is required for all images."
},
"data": {
"type": "string",
"description": "Inline jpeg, gif, tiff, bmp, or png image raw bytes for an image question types.",
"format": "byte"
},
"url": {
"type": "string",
"description": "The read-only URL for the hosted images."
}
}
},
"SurveyRejection": {
"id": "SurveyRejection",
"type": "object",
"description": "Message representing why the survey was rejected from review, if it was.",
"properties": {
"explanation": {
"type": "string",
"description": "A human-readable explanation of what was wrong with the survey."
},
"type": {
"type": "string",
"description": "Which category of rejection this was. See the Google Surveys Help Center for additional details on each category."
}
}
},
"SurveyResults": {
"id": "SurveyResults",
"type": "object",
"description": "Reference to the current results for a given survey.",
"properties": {
"status": {
"type": "string",
"description": "Human readable string describing the status of the request."
},
"surveyUrlId": {
"type": "string",
"description": "External survey ID as viewable by survey owners in the editor view."
}
}
},
"SurveysDeleteResponse": {
"id": "SurveysDeleteResponse",
"type": "object",
"properties": {
"requestId": {
"type": "string",
"description": "Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests."
}
}
},
"SurveysListResponse": {
"id": "SurveysListResponse",
"type": "object",
"properties": {
"pageInfo": {
"$ref": "PageInfo"
},
"requestId": {
"type": "string",
"description": "Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests."
},
"resources": {
"type": "array",
"description": "An individual survey resource.",
"items": {
"$ref": "Survey"
}
},
"tokenPagination": {
"$ref": "TokenPagination"
}
}
},
"SurveysStartRequest": {
"id": "SurveysStartRequest",
"type": "object",
"properties": {
"maxCostPerResponseNanos": {
"type": "string",
"description": "Threshold to start a survey automically if the quoted prices is less than or equal to this value. See Survey.Cost for more details.",
"format": "int64"
}
}
},
"SurveysStartResponse": {
"id": "SurveysStartResponse",
"type": "object",
"properties": {
"requestId": {
"type": "string",
"description": "Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests."
}
}
},
"SurveysStopResponse": {
"id": "SurveysStopResponse",
"type": "object",
"properties": {
"requestId": {
"type": "string",
"description": "Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests."
}
}
},
"TokenPagination": {
"id": "TokenPagination",
"type": "object",
"properties": {
"nextPageToken": {
"type": "string"
},
"previousPageToken": {
"type": "string"
}
}
}
},
"resources": {
"mobileapppanels": {
"methods": {
"get": {
"id": "surveys.mobileapppanels.get",
"path": "mobileAppPanels/{panelId}",
"httpMethod": "GET",
"description": "Retrieves a MobileAppPanel that is available to the authenticated user.",
"parameters": {
"panelId": {
"type": "string",
"description": "External URL ID for the panel.",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"panelId"
],
"response": {
"$ref": "MobileAppPanel"
},
"scopes": [
"https://www.googleapis.com/auth/surveys",
"https://www.googleapis.com/auth/surveys.readonly",
"https://www.googleapis.com/auth/userinfo.email"
]
},
"list": {
"id": "surveys.mobileapppanels.list",
"path": "mobileAppPanels",
"httpMethod": "GET",
"description": "Lists the MobileAppPanels available to the authenticated user.",
"parameters": {
"maxResults": {
"type": "integer",
"format": "uint32",
"location": "query"
},
"startIndex": {
"type": "integer",
"format": "uint32",
"location": "query"
},
"token": {
"type": "string",
"location": "query"
}
},
"response": {
"$ref": "MobileAppPanelsListResponse"
},
"scopes": [
"https://www.googleapis.com/auth/surveys",
"https://www.googleapis.com/auth/surveys.readonly",
"https://www.googleapis.com/auth/userinfo.email"
]
},
"update": {
"id": "surveys.mobileapppanels.update",
"path": "mobileAppPanels/{panelId}",
"httpMethod": "PUT",
"description": "Updates a MobileAppPanel. Currently the only property that can be updated is the owners property.",
"parameters": {
"panelId": {
"type": "string",
"description": "External URL ID for the panel.",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"panelId"
],
"request": {
"$ref": "MobileAppPanel"
},
"response": {
"$ref": "MobileAppPanel"
},
"scopes": [
"https://www.googleapis.com/auth/surveys",
"https://www.googleapis.com/auth/userinfo.email"
]
}
}
},
"results": {
"methods": {
"get": {
"id": "surveys.results.get",
"path": "surveys/{surveyUrlId}/results",
"httpMethod": "GET",
"description": "Retrieves any survey results that have been produced so far. Results are formatted as an Excel file. You must add \"?alt=media\" to the URL as an argument to get results.",
"parameters": {
"surveyUrlId": {
"type": "string",
"description": "External URL ID for the survey.",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"surveyUrlId"
],
"request": {
"$ref": "ResultsGetRequest"
},
"response": {
"$ref": "SurveyResults"
},
"scopes": [
"https://www.googleapis.com/auth/surveys",
"https://www.googleapis.com/auth/surveys.readonly",
"https://www.googleapis.com/auth/userinfo.email"
],
"supportsMediaDownload": true
}
}
},
"surveys": {
"methods": {
"delete": {
"id": "surveys.surveys.delete",
"path": "surveys/{surveyUrlId}",
"httpMethod": "DELETE",
"description": "Removes a survey from view in all user GET requests.",
"parameters": {
"surveyUrlId": {
"type": "string",
"description": "External URL ID for the survey.",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"surveyUrlId"
],
"response": {
"$ref": "SurveysDeleteResponse"
},
"scopes": [
"https://www.googleapis.com/auth/surveys",
"https://www.googleapis.com/auth/userinfo.email"
]
},
"get": {
"id": "surveys.surveys.get",
"path": "surveys/{surveyUrlId}",
"httpMethod": "GET",
"description": "Retrieves information about the specified survey.",
"parameters": {
"surveyUrlId": {
"type": "string",
"description": "External URL ID for the survey.",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"surveyUrlId"
],
"response": {
"$ref": "Survey"
},
"scopes": [
"https://www.googleapis.com/auth/surveys",
"https://www.googleapis.com/auth/surveys.readonly",
"https://www.googleapis.com/auth/userinfo.email"
]
},
"insert": {
"id": "surveys.surveys.insert",
"path": "surveys",
"httpMethod": "POST",
"description": "Creates a survey.",
"request": {
"$ref": "Survey"
},
"response": {
"$ref": "Survey"
},
"scopes": [
"https://www.googleapis.com/auth/surveys",
"https://www.googleapis.com/auth/userinfo.email"
]
},
"list": {
"id": "surveys.surveys.list",
"path": "surveys",
"httpMethod": "GET",
"description": "Lists the surveys owned by the authenticated user.",
"parameters": {
"maxResults": {
"type": "integer",
"format": "uint32",
"location": "query"
},
"startIndex": {
"type": "integer",
"format": "uint32",
"location": "query"
},
"token": {
"type": "string",
"location": "query"
}
},
"response": {
"$ref": "SurveysListResponse"
},
"scopes": [
"https://www.googleapis.com/auth/surveys",
"https://www.googleapis.com/auth/surveys.readonly",
"https://www.googleapis.com/auth/userinfo.email"
]
},
"start": {
"id": "surveys.surveys.start",
"path": "surveys/{resourceId}/start",
"httpMethod": "POST",
"description": "Begins running a survey.",
"parameters": {
"resourceId": {
"type": "string",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"resourceId"
],
"request": {
"$ref": "SurveysStartRequest"
},
"response": {
"$ref": "SurveysStartResponse"
},
"scopes": [
"https://www.googleapis.com/auth/surveys",
"https://www.googleapis.com/auth/userinfo.email"
]
},
"stop": {
"id": "surveys.surveys.stop",
"path": "surveys/{resourceId}/stop",
"httpMethod": "POST",
"description": "Stops a running survey.",
"parameters": {
"resourceId": {
"type": "string",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"resourceId"
],
"response": {
"$ref": "SurveysStopResponse"
},
"scopes": [
"https://www.googleapis.com/auth/surveys",
"https://www.googleapis.com/auth/userinfo.email"
]
},
"update": {
"id": "surveys.surveys.update",
"path": "surveys/{surveyUrlId}",
"httpMethod": "PUT",
"description": "Updates a survey. Currently the only property that can be updated is the owners property.",
"parameters": {
"surveyUrlId": {
"type": "string",
"description": "External URL ID for the survey.",
"required": true,
"location": "path"
}
},
"parameterOrder": [
"surveyUrlId"
],
"request": {
"$ref": "Survey"
},
"response": {
"$ref": "Survey"
},
"scopes": [
"https://www.googleapis.com/auth/surveys",
"https://www.googleapis.com/auth/userinfo.email"
]
}
}
}
}
}