UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 17.3 kB
{"openapi":"3.0.0","info":{"contact":{"name":"Google","url":"https://google.com"},"description":"Creates and conducts surveys, lists the surveys that an authenticated user owns, and retrieves survey results and information about specified surveys.","title":"Consumer Surveys","version":"v2","x-apiClientRegistration":{"url":"https://console.developers.google.com"},"x-logo":{"url":"https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},"x-origin":[{"converter":{"url":"https://github.com/lucybot/api-spec-converter","version":"2.6.0"},"format":"google","url":"https://www.googleapis.com/discovery/v1/apis/consumersurveys/v2/rest","version":"v1"}],"x-preferred":true,"x-providerName":"googleapis.com","x-serviceName":"consumersurveys"},"tags":[{"name":"mobileapppanels"},{"name":"results"},{"name":"surveys"}],"paths":{"/mobileAppPanels":{"get":{"description":"Lists the MobileAppPanels available to the authenticated user.","operationId":"consumersurveys.mobileapppanels.list","parameters":[{"in":"query","name":"maxResults","schema":{"type":"integer"}},{"in":"query","name":"startIndex","schema":{"type":"integer"}},{"in":"query","name":"token","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MobileAppPanelsListResponse"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/consumersurveys"]},{"Oauth2":["https://www.googleapis.com/auth/consumersurveys.readonly"]},{"Oauth2":["https://www.googleapis.com/auth/userinfo.email"]}],"tags":["mobileapppanels"]},"parameters":[{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/userIp"}]},"/mobileAppPanels/{panelId}":{"get":{"description":"Retrieves a MobileAppPanel that is available to the authenticated user.","operationId":"consumersurveys.mobileapppanels.get","parameters":[{"description":"External URL ID for the panel.","in":"path","name":"panelId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MobileAppPanel"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/consumersurveys"]},{"Oauth2":["https://www.googleapis.com/auth/consumersurveys.readonly"]},{"Oauth2":["https://www.googleapis.com/auth/userinfo.email"]}],"tags":["mobileapppanels"]},"parameters":[{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/userIp"}],"put":{"description":"Updates a MobileAppPanel. Currently the only property that can be updated is the owners property.","operationId":"consumersurveys.mobileapppanels.update","parameters":[{"description":"External URL ID for the panel.","in":"path","name":"panelId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileAppPanel"}}}},"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MobileAppPanel"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/consumersurveys"]},{"Oauth2":["https://www.googleapis.com/auth/userinfo.email"]}],"tags":["mobileapppanels"]}},"/surveys":{"get":{"description":"Lists the surveys owned by the authenticated user.","operationId":"consumersurveys.surveys.list","parameters":[{"in":"query","name":"maxResults","schema":{"type":"integer"}},{"in":"query","name":"startIndex","schema":{"type":"integer"}},{"in":"query","name":"token","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SurveysListResponse"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/consumersurveys"]},{"Oauth2":["https://www.googleapis.com/auth/consumersurveys.readonly"]},{"Oauth2":["https://www.googleapis.com/auth/userinfo.email"]}],"tags":["surveys"]},"parameters":[{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/userIp"}],"post":{"description":"Creates a survey.","operationId":"consumersurveys.surveys.insert","requestBody":{"$ref":"#/components/requestBodies/Survey"},"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Survey"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/consumersurveys"]},{"Oauth2":["https://www.googleapis.com/auth/userinfo.email"]}],"tags":["surveys"]}},"/surveys/{resourceId}/start":{"parameters":[{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/userIp"}],"post":{"description":"Begins running a survey.","operationId":"consumersurveys.surveys.start","parameters":[{"in":"path","name":"resourceId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SurveysStartRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SurveysStartResponse"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/consumersurveys"]},{"Oauth2":["https://www.googleapis.com/auth/userinfo.email"]}],"tags":["surveys"]}},"/surveys/{resourceId}/stop":{"parameters":[{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/userIp"}],"post":{"description":"Stops a running survey.","operationId":"consumersurveys.surveys.stop","parameters":[{"in":"path","name":"resourceId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SurveysStopResponse"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/consumersurveys"]},{"Oauth2":["https://www.googleapis.com/auth/userinfo.email"]}],"tags":["surveys"]}},"/surveys/{surveyUrlId}":{"delete":{"description":"Removes a survey from view in all user GET requests.","operationId":"consumersurveys.surveys.delete","parameters":[{"description":"External URL ID for the survey.","in":"path","name":"surveyUrlId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SurveysDeleteResponse"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/consumersurveys"]},{"Oauth2":["https://www.googleapis.com/auth/userinfo.email"]}],"tags":["surveys"]},"get":{"description":"Retrieves information about the specified survey.","operationId":"consumersurveys.surveys.get","parameters":[{"description":"External URL ID for the survey.","in":"path","name":"surveyUrlId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Survey"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/consumersurveys"]},{"Oauth2":["https://www.googleapis.com/auth/consumersurveys.readonly"]},{"Oauth2":["https://www.googleapis.com/auth/userinfo.email"]}],"tags":["surveys"]},"parameters":[{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/userIp"}],"put":{"description":"Updates a survey. Currently the only property that can be updated is the owners property.","operationId":"consumersurveys.surveys.update","parameters":[{"description":"External URL ID for the survey.","in":"path","name":"surveyUrlId","required":true,"schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/Survey"},"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Survey"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/consumersurveys"]},{"Oauth2":["https://www.googleapis.com/auth/userinfo.email"]}],"tags":["surveys"]}},"/surveys/{surveyUrlId}/results":{"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.","operationId":"consumersurveys.results.get","parameters":[{"description":"External URL ID for the survey.","in":"path","name":"surveyUrlId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultsGetRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SurveyResults"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/consumersurveys"]},{"Oauth2":["https://www.googleapis.com/auth/consumersurveys.readonly"]},{"Oauth2":["https://www.googleapis.com/auth/userinfo.email"]}],"tags":["results"]},"parameters":[{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/userIp"}]}},"servers":[{"url":"https://www.googleapis.com/consumersurveys/v2"}],"components":{"parameters":{"alt":{"description":"Data format for the response.","in":"query","name":"alt","schema":{"type":"string","enum":["json"],"default":"json"}},"fields":{"description":"Selector specifying which fields to include in a partial response.","in":"query","name":"fields","schema":{"type":"string"}},"key":{"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.","in":"query","name":"key","schema":{"type":"string"}},"oauth_token":{"description":"OAuth 2.0 token for the current user.","in":"query","name":"oauth_token","schema":{"type":"string"}},"prettyPrint":{"description":"Returns response with indentations and line breaks.","in":"query","name":"prettyPrint","schema":{"type":"boolean","default":true}},"quotaUser":{"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.","in":"query","name":"quotaUser","schema":{"type":"string"}},"userIp":{"description":"IP address of the site where the request originates. Use this if you want to enforce per-user limits.","in":"query","name":"userIp","schema":{"type":"string"}}},"requestBodies":{"Survey":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Survey"}}}}},"securitySchemes":{"Oauth2":{"description":"Oauth 2.0 authentication","type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://accounts.google.com/o/oauth2/auth","scopes":{"https://www.googleapis.com/auth/consumersurveys":"View and edit your surveys and results","https://www.googleapis.com/auth/consumersurveys.readonly":"View the results for your surveys","https://www.googleapis.com/auth/userinfo.email":"View your email address"}}}}},"schemas":{"FieldMask":{"properties":{"fields":{"items":{"$ref":"#/components/schemas/FieldMask"},"type":"array"},"id":{"format":"int32","type":"integer"}},"type":"object"},"MobileAppPanel":{"properties":{"country":{"type":"string"},"isPublicPanel":{"type":"boolean"},"language":{"type":"string"},"mobileAppPanelId":{"type":"string"},"name":{"type":"string"},"owners":{"items":{"type":"string"},"type":"array"}},"type":"object"},"MobileAppPanelsListResponse":{"properties":{"pageInfo":{"$ref":"#/components/schemas/PageInfo"},"requestId":{"description":"Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests.","type":"string"},"resources":{"description":"An individual predefined panel of Opinion Rewards mobile users.","items":{"$ref":"#/components/schemas/MobileAppPanel"},"type":"array"},"tokenPagination":{"$ref":"#/components/schemas/TokenPagination"}},"type":"object"},"PageInfo":{"properties":{"resultPerPage":{"format":"int32","type":"integer"},"startIndex":{"format":"int32","type":"integer"},"totalResults":{"format":"int32","type":"integer"}},"type":"object"},"ResultsGetRequest":{"properties":{"resultMask":{"$ref":"#/components/schemas/ResultsMask"}},"type":"object"},"ResultsMask":{"properties":{"fields":{"items":{"$ref":"#/components/schemas/FieldMask"},"type":"array"},"projection":{"type":"string"}},"type":"object"},"Survey":{"properties":{"audience":{"$ref":"#/components/schemas/SurveyAudience"},"cost":{"$ref":"#/components/schemas/SurveyCost"},"customerData":{"format":"byte","type":"string"},"description":{"type":"string"},"owners":{"items":{"type":"string"},"type":"array"},"questions":{"items":{"$ref":"#/components/schemas/SurveyQuestion"},"type":"array"},"rejectionReason":{"$ref":"#/components/schemas/SurveyRejection"},"state":{"type":"string"},"surveyUrlId":{"type":"string"},"title":{"type":"string"},"wantedResponseCount":{"format":"int32","type":"integer"}},"type":"object"},"SurveyAudience":{"properties":{"ages":{"items":{"type":"string"},"type":"array"},"country":{"type":"string"},"countrySubdivision":{"type":"string"},"gender":{"type":"string"},"languages":{"items":{"type":"string"},"type":"array"},"mobileAppPanelId":{"type":"string"},"populationSource":{"type":"string"}},"type":"object"},"SurveyCost":{"properties":{"costPerResponseNanos":{"format":"int64","type":"string"},"currencyCode":{"type":"string"},"maxCostPerResponseNanos":{"format":"int64","type":"string"},"nanos":{"format":"int64","type":"string"}},"type":"object"},"SurveyQuestion":{"properties":{"answerOrder":{"type":"string"},"answers":{"items":{"type":"string"},"type":"array"},"hasOther":{"type":"boolean"},"highValueLabel":{"type":"string"},"images":{"items":{"$ref":"#/components/schemas/SurveyQuestionImage"},"type":"array"},"lastAnswerPositionPinned":{"type":"boolean"},"lowValueLabel":{"type":"string"},"mustPickSuggestion":{"type":"boolean"},"numStars":{"type":"string"},"openTextPlaceholder":{"type":"string"},"openTextSuggestions":{"items":{"type":"string"},"type":"array"},"question":{"type":"string"},"sentimentText":{"type":"string"},"singleLineResponse":{"type":"boolean"},"thresholdAnswers":{"items":{"type":"string"},"type":"array"},"type":{"type":"string"},"unitOfMeasurementLabel":{"type":"string"},"videoId":{"type":"string"}},"type":"object"},"SurveyQuestionImage":{"properties":{"altText":{"type":"string"},"data":{"format":"byte","type":"string"},"url":{"type":"string"}},"type":"object"},"SurveyRejection":{"properties":{"explanation":{"type":"string"},"type":{"type":"string"}},"type":"object"},"SurveyResults":{"properties":{"status":{"type":"string"},"surveyUrlId":{"type":"string"}},"type":"object"},"SurveysDeleteResponse":{"properties":{"requestId":{"description":"Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests.","type":"string"}},"type":"object"},"SurveysListResponse":{"properties":{"pageInfo":{"$ref":"#/components/schemas/PageInfo"},"requestId":{"description":"Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests.","type":"string"},"resources":{"description":"An individual survey resource.","items":{"$ref":"#/components/schemas/Survey"},"type":"array"},"tokenPagination":{"$ref":"#/components/schemas/TokenPagination"}},"type":"object"},"SurveysStartRequest":{"properties":{"maxCostPerResponseNanos":{"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","type":"string"}},"type":"object"},"SurveysStartResponse":{"properties":{"requestId":{"description":"Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests.","type":"string"}},"type":"object"},"SurveysStopResponse":{"properties":{"requestId":{"description":"Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests.","type":"string"}},"type":"object"},"TokenPagination":{"properties":{"nextPageToken":{"type":"string"},"previousPageToken":{"type":"string"}},"type":"object"}}}}