openapi: 3.0.0 servers: - url: https://www.googleapis.com/adsensehost/v4.1 info: contact: name: Google url: https://google.com x-twitter: youtube description: Generates performance reports, generates ad codes, and provides publisher management capabilities for AdSense Hosts. license: name: Creative Commons Attribution 3.0 url: http://creativecommons.org/licenses/by/3.0/ termsOfService: https://developers.google.com/terms/ title: AdSense Host API version: v4.1 x-apiClientRegistration: url: https://console.developers.google.com x-apisguru-categories: - analytics - media x-logo: url: https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png x-origin: - format: google url: https://adsensehost.googleapis.com/$discovery/rest?version=v4.1 version: v1 x-providerName: googleapis.com x-serviceName: adsensehost externalDocs: url: https://developers.google.com/adsense/host/ tags: - name: accounts - name: adclients - name: associationsessions - name: customchannels - name: reports - name: urlchannels paths: /accounts: get: description: List hosted accounts associated with this AdSense account by ad client id. operationId: adsensehost.accounts.list parameters: - description: Ad clients to list accounts for. explode: true in: query name: filterAdClientId required: true schema: items: type: string type: array style: form responses: "200": content: application/json: schema: $ref: "#/components/schemas/Accounts" description: Successful response security: - Oauth2: - https://www.googleapis.com/auth/adsensehost Oauth2c: - https://www.googleapis.com/auth/adsensehost tags: - accounts 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" /accounts/{accountId}: get: description: Get information about the selected associated AdSense account. operationId: adsensehost.accounts.get parameters: - description: Account to get information about. in: path name: accountId required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/Account" description: Successful response security: - Oauth2: - https://www.googleapis.com/auth/adsensehost Oauth2c: - https://www.googleapis.com/auth/adsensehost tags: - accounts 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" /accounts/{accountId}/adclients: get: description: List all hosted ad clients in the specified hosted account. operationId: adsensehost.accounts.adclients.list parameters: - description: Account for which to list ad clients. in: path name: accountId required: true schema: type: string - description: The maximum number of ad clients to include in the response, used for paging. in: query name: maxResults schema: maximum: 10000 minimum: 0 type: integer - description: A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. in: query name: pageToken schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/AdClients" description: Successful response security: - Oauth2: - https://www.googleapis.com/auth/adsensehost Oauth2c: - https://www.googleapis.com/auth/adsensehost tags: - accounts 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" /accounts/{accountId}/adclients/{adClientId}: get: description: Get information about one of the ad clients in the specified publisher's AdSense account. operationId: adsensehost.accounts.adclients.get parameters: - description: Account which contains the ad client. in: path name: accountId required: true schema: type: string - description: Ad client to get. in: path name: adClientId required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/AdClient" description: Successful response security: - Oauth2: - https://www.googleapis.com/auth/adsensehost Oauth2c: - https://www.googleapis.com/auth/adsensehost tags: - accounts 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" /accounts/{accountId}/adclients/{adClientId}/adunits: get: description: List all ad units in the specified publisher's AdSense account. operationId: adsensehost.accounts.adunits.list parameters: - description: Account which contains the ad client. in: path name: accountId required: true schema: type: string - description: Ad client for which to list ad units. in: path name: adClientId required: true schema: type: string - description: "Whether to include inactive ad units. Default: true." in: query name: includeInactive schema: type: boolean - description: The maximum number of ad units to include in the response, used for paging. in: query name: maxResults schema: maximum: 10000 minimum: 0 type: integer - description: A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. in: query name: pageToken schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/AdUnits" description: Successful response security: - Oauth2: - https://www.googleapis.com/auth/adsensehost Oauth2c: - https://www.googleapis.com/auth/adsensehost tags: - accounts 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" patch: description: Update the supplied ad unit in the specified publisher AdSense account. This method supports patch semantics. operationId: adsensehost.accounts.adunits.patch parameters: - description: Account which contains the ad client. in: path name: accountId required: true schema: type: string - description: Ad client which contains the ad unit. in: path name: adClientId required: true schema: type: string - description: Ad unit to get. in: query name: adUnitId required: true schema: type: string requestBody: content: application/json: schema: $ref: "#/components/schemas/AdUnit" responses: "200": content: application/json: schema: $ref: "#/components/schemas/AdUnit" description: Successful response security: - Oauth2: - https://www.googleapis.com/auth/adsensehost Oauth2c: - https://www.googleapis.com/auth/adsensehost tags: - accounts post: description: Insert the supplied ad unit into the specified publisher AdSense account. operationId: adsensehost.accounts.adunits.insert parameters: - description: Account which will contain the ad unit. in: path name: accountId required: true schema: type: string - description: Ad client into which to insert the ad unit. in: path name: adClientId required: true schema: type: string requestBody: content: application/json: schema: $ref: "#/components/schemas/AdUnit" responses: "200": content: application/json: schema: $ref: "#/components/schemas/AdUnit" description: Successful response security: - Oauth2: - https://www.googleapis.com/auth/adsensehost Oauth2c: - https://www.googleapis.com/auth/adsensehost tags: - accounts put: description: Update the supplied ad unit in the specified publisher AdSense account. operationId: adsensehost.accounts.adunits.update parameters: - description: Account which contains the ad client. in: path name: accountId required: true schema: type: string - description: Ad client which contains the ad unit. in: path name: adClientId required: true schema: type: string requestBody: content: application/json: schema: $ref: "#/components/schemas/AdUnit" responses: "200": content: application/json: schema: $ref: "#/components/schemas/AdUnit" description: Successful response security: - Oauth2: - https://www.googleapis.com/auth/adsensehost Oauth2c: - https://www.googleapis.com/auth/adsensehost tags: - accounts /accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}: delete: description: Delete the specified ad unit from the specified publisher AdSense account. operationId: adsensehost.accounts.adunits.delete parameters: - description: Account which contains the ad unit. in: path name: accountId required: true schema: type: string - description: Ad client for which to get ad unit. in: path name: adClientId required: true schema: type: string - description: Ad unit to delete. in: path name: adUnitId required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/AdUnit" description: Successful response security: - Oauth2: - https://www.googleapis.com/auth/adsensehost Oauth2c: - https://www.googleapis.com/auth/adsensehost tags: - accounts get: description: Get the specified host ad unit in this AdSense account. operationId: adsensehost.accounts.adunits.get parameters: - description: Account which contains the ad unit. in: path name: accountId required: true schema: type: string - description: Ad client for which to get ad unit. in: path name: adClientId required: true schema: type: string - description: Ad unit to get. in: path name: adUnitId required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/AdUnit" description: Successful response security: - Oauth2: - https://www.googleapis.com/auth/adsensehost Oauth2c: - https://www.googleapis.com/auth/adsensehost tags: - accounts 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" /accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}/adcode: get: description: Get ad code for the specified ad unit, attaching the specified host custom channels. operationId: adsensehost.accounts.adunits.getAdCode parameters: - description: Account which contains the ad client. in: path name: accountId required: true schema: type: string - description: Ad client with contains the ad unit. in: path name: adClientId required: true schema: type: string - description: Ad unit to get the code for. in: path name: adUnitId required: true schema: type: string - description: Host custom channel to attach to the ad code. explode: true in: query name: hostCustomChannelId schema: items: type: string type: array style: form responses: "200": content: application/json: schema: $ref: "#/components/schemas/AdCode" description: Successful response security: - Oauth2: - https://www.googleapis.com/auth/adsensehost Oauth2c: - https://www.googleapis.com/auth/adsensehost tags: - accounts 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" /accounts/{accountId}/reports: get: description: Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. operationId: adsensehost.accounts.reports.generate parameters: - description: Hosted account upon which to report. in: path name: accountId required: true schema: type: string - description: Start of the date range to report on in "YYYY-MM-DD" format, inclusive. in: query name: startDate required: true schema: type: string - description: End of the date range to report on in "YYYY-MM-DD" format, inclusive. in: query name: endDate required: true schema: type: string - description: Dimensions to base the report on. explode: true in: query name: dimension schema: items: type: string type: array style: form - description: Filters to be run on the report. explode: true in: query name: filter schema: items: type: string type: array style: form - description: Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. in: query name: locale schema: type: string - description: The maximum number of rows of report data to return. in: query name: maxResults schema: maximum: 50000 minimum: 0 type: integer - description: Numeric columns to include in the report. explode: true in: query name: metric schema: items: type: string type: array style: form - description: The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending. explode: true in: query name: sort schema: items: type: string type: array style: form - description: Index of the first row of report data to return. in: query name: startIndex schema: maximum: 5000 minimum: 0 type: integer responses: "200": content: application/json: schema: $ref: "#/components/schemas/Report" description: Successful response security: - Oauth2: - https://www.googleapis.com/auth/adsensehost Oauth2c: - https://www.googleapis.com/auth/adsensehost tags: - accounts 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" /adclients: get: description: List all host ad clients in this AdSense account. operationId: adsensehost.adclients.list parameters: - description: The maximum number of ad clients to include in the response, used for paging. in: query name: maxResults schema: maximum: 10000 minimum: 0 type: integer - description: A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. in: query name: pageToken schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/AdClients" description: Successful response security: - Oauth2: - https://www.googleapis.com/auth/adsensehost Oauth2c: - https://www.googleapis.com/auth/adsensehost tags: - adclients 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" /adclients/{adClientId}: get: description: Get information about one of the ad clients in the Host AdSense account. operationId: adsensehost.adclients.get parameters: - description: Ad client to get. in: path name: adClientId required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/AdClient" description: Successful response security: - Oauth2: - https://www.googleapis.com/auth/adsensehost Oauth2c: - https://www.googleapis.com/auth/adsensehost tags: - adclients 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" /adclients/{adClientId}/customchannels: get: description: List all host custom channels in this AdSense account. operationId: adsensehost.customchannels.list parameters: - description: Ad client for which to list custom channels. in: path name: adClientId required: true schema: type: string - description: The maximum number of custom channels to include in the response, used for paging. in: query name: maxResults schema: maximum: 10000 minimum: 0 type: integer - description: A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. in: query name: pageToken schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/CustomChannels" description: Successful response security: - Oauth2: - https://www.googleapis.com/auth/adsensehost Oauth2c: - https://www.googleapis.com/auth/adsensehost tags: - customchannels 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" patch: description: Update a custom channel in the host AdSense account. This method supports patch semantics. operationId: adsensehost.customchannels.patch parameters: - description: Ad client in which the custom channel will be updated. in: path name: adClientId required: true schema: type: string - description: Custom channel to get. in: query name: customChannelId required: true schema: type: string requestBody: content: application/json: schema: $ref: "#/components/schemas/CustomChannel" responses: "200": content: application/json: schema: $ref: "#/components/schemas/CustomChannel" description: Successful response security: - Oauth2: - https://www.googleapis.com/auth/adsensehost Oauth2c: - https://www.googleapis.com/auth/adsensehost tags: - customchannels post: description: Add a new custom channel to the host AdSense account. operationId: adsensehost.customchannels.insert parameters: - description: Ad client to which the new custom channel will be added. in: path name: adClientId required: true schema: type: string requestBody: content: application/json: schema: $ref: "#/components/schemas/CustomChannel" responses: "200": content: application/json: schema: $ref: "#/components/schemas/CustomChannel" description: Successful response security: - Oauth2: - https://www.googleapis.com/auth/adsensehost Oauth2c: - https://www.googleapis.com/auth/adsensehost tags: - customchannels put: description: Update a custom channel in the host AdSense account. operationId: adsensehost.customchannels.update parameters: - description: Ad client in which the custom channel will be updated. in: path name: adClientId required: true schema: type: string requestBody: content: application/json: schema: $ref: "#/components/schemas/CustomChannel" responses: "200": content: application/json: schema: $ref: "#/components/schemas/CustomChannel" description: Successful response security: - Oauth2: - https://www.googleapis.com/auth/adsensehost Oauth2c: - https://www.googleapis.com/auth/adsensehost tags: - customchannels /adclients/{adClientId}/customchannels/{customChannelId}: delete: description: Delete a specific custom channel from the host AdSense account. operationId: adsensehost.customchannels.delete parameters: - description: Ad client from which to delete the custom channel. in: path name: adClientId required: true schema: type: string - description: Custom channel to delete. in: path name: customChannelId required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/CustomChannel" description: Successful response security: - Oauth2: - https://www.googleapis.com/auth/adsensehost Oauth2c: - https://www.googleapis.com/auth/adsensehost tags: - customchannels get: description: Get a specific custom channel from the host AdSense account. operationId: adsensehost.customchannels.get parameters: - description: Ad client from which to get the custom channel. in: path name: adClientId required: true schema: type: string - description: Custom channel to get. in: path name: customChannelId required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/CustomChannel" description: Successful response security: - Oauth2: - https://www.googleapis.com/auth/adsensehost Oauth2c: - https://www.googleapis.com/auth/adsensehost tags: - customchannels 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" /adclients/{adClientId}/urlchannels: get: description: List all host URL channels in the host AdSense account. operationId: adsensehost.urlchannels.list parameters: - description: Ad client for which to list URL channels. in: path name: adClientId required: true schema: type: string - description: The maximum number of URL channels to include in the response, used for paging. in: query name: maxResults schema: maximum: 10000 minimum: 0 type: integer - description: A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. in: query name: pageToken schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/UrlChannels" description: Successful response security: - Oauth2: - https://www.googleapis.com/auth/adsensehost Oauth2c: - https://www.googleapis.com/auth/adsensehost tags: - urlchannels 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: Add a new URL channel to the host AdSense account. operationId: adsensehost.urlchannels.insert parameters: - description: Ad client to which the new URL channel will be added. in: path name: adClientId required: true schema: type: string requestBody: content: application/json: schema: $ref: "#/components/schemas/UrlChannel" responses: "200": content: application/json: schema: $ref: "#/components/schemas/UrlChannel" description: Successful response security: - Oauth2: - https://www.googleapis.com/auth/adsensehost Oauth2c: - https://www.googleapis.com/auth/adsensehost tags: - urlchannels /adclients/{adClientId}/urlchannels/{urlChannelId}: delete: description: Delete a URL channel from the host AdSense account. operationId: adsensehost.urlchannels.delete parameters: - description: Ad client from which to delete the URL channel. in: path name: adClientId required: true schema: type: string - description: URL channel to delete. in: path name: urlChannelId required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/UrlChannel" description: Successful response security: - Oauth2: - https://www.googleapis.com/auth/adsensehost Oauth2c: - https://www.googleapis.com/auth/adsensehost tags: - urlchannels 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" /associationsessions/start: get: description: Create an association session for initiating an association with an AdSense user. operationId: adsensehost.associationsessions.start parameters: - description: Products to associate with the user. explode: true in: query name: productCode required: true schema: items: enum: - AFC - AFG - AFMC - AFS - AFV type: string type: array style: form - description: The URL of the user's hosted website. in: query name: websiteUrl required: true schema: type: string - description: The URL to redirect the user to once association is completed. It receives a token parameter that can then be used to retrieve the associated account. in: query name: callbackUrl schema: type: string - description: The preferred locale of the user. in: query name: userLocale schema: type: string - description: The locale of the user's hosted website. in: query name: websiteLocale schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/AssociationSession" description: Successful response security: - Oauth2: - https://www.googleapis.com/auth/adsensehost Oauth2c: - https://www.googleapis.com/auth/adsensehost tags: - associationsessions 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" /associationsessions/verify: get: description: Verify an association session after the association callback returns from AdSense signup. operationId: adsensehost.associationsessions.verify parameters: - description: The token returned to the association callback URL. in: query name: token required: true schema: type: string responses: "200": content: application/json: schema: $ref: "#/components/schemas/AssociationSession" description: Successful response security: - Oauth2: - https://www.googleapis.com/auth/adsensehost Oauth2c: - https://www.googleapis.com/auth/adsensehost tags: - associationsessions 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" /reports: get: description: Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. operationId: adsensehost.reports.generate parameters: - description: Start of the date range to report on in "YYYY-MM-DD" format, inclusive. in: query name: startDate required: true schema: type: string - description: End of the date range to report on in "YYYY-MM-DD" format, inclusive. in: query name: endDate required: true schema: type: string - description: Dimensions to base the report on. explode: true in: query name: dimension schema: items: type: string type: array style: form - description: Filters to be run on the report. explode: true in: query name: filter schema: items: type: string type: array style: form - description: Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. in: query name: locale schema: type: string - description: The maximum number of rows of report data to return. in: query name: maxResults schema: maximum: 50000 minimum: 0 type: integer - description: Numeric columns to include in the report. explode: true in: query name: metric schema: items: type: string type: array style: form - description: The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending. explode: true in: query name: sort schema: items: type: string type: array style: form - description: Index of the first row of report data to return. in: query name: startIndex schema: maximum: 5000 minimum: 0 type: integer responses: "200": content: application/json: schema: $ref: "#/components/schemas/Report" description: Successful response security: - Oauth2: - https://www.googleapis.com/auth/adsensehost Oauth2c: - https://www.googleapis.com/auth/adsensehost tags: - reports 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" components: parameters: alt: description: Data format for the response. in: query name: alt schema: enum: - csv - json type: string 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 quotaUser: description: An opaque string that represents a user for quota purposes. Must not exceed 40 characters. in: query name: quotaUser schema: type: string userIp: description: Deprecated. Please use quotaUser instead. in: query name: userIp schema: type: string schemas: Account: properties: id: description: Unique identifier of this account. type: string kind: default: adsensehost#account description: Kind of resource this is, in this case adsensehost#account. type: string name: description: Name of this account. type: string status: description: "Approval status of this account. One of: PENDING, APPROVED, DISABLED." type: string type: object Accounts: properties: etag: description: ETag of this response for caching purposes. type: string items: description: The accounts returned in this list response. items: $ref: "#/components/schemas/Account" type: array kind: default: adsensehost#accounts description: Kind of list this is, in this case adsensehost#accounts. type: string type: object AdClient: properties: arcOptIn: description: Whether this ad client is opted in to ARC. type: boolean id: description: Unique identifier of this ad client. type: string kind: default: adsensehost#adClient description: Kind of resource this is, in this case adsensehost#adClient. type: string productCode: description: This ad client's product code, which corresponds to the PRODUCT_CODE report dimension. type: string supportsReporting: description: Whether this ad client supports being reported on. type: boolean type: object AdClients: properties: etag: description: ETag of this response for caching purposes. type: string items: description: The ad clients returned in this list response. items: $ref: "#/components/schemas/AdClient" type: array kind: default: adsensehost#adClients description: Kind of list this is, in this case adsensehost#adClients. type: string nextPageToken: description: Continuation token used to page through ad clients. To retrieve the next page of results, set the next request's "pageToken" value to this. type: string type: object AdCode: properties: adCode: description: The ad code snippet. type: string kind: default: adsensehost#adCode description: Kind this is, in this case adsensehost#adCode. type: string type: object AdStyle: properties: colors: description: The colors included in the style. These are represented as six hexadecimal characters, similar to HTML color codes, but without the leading hash. properties: background: description: The color of the ad background. type: string border: description: The color of the ad border. type: string text: description: The color of the ad text. type: string title: description: The color of the ad title. type: string url: description: The color of the ad url. type: string type: object corners: description: "The style of the corners in the ad (deprecated: never populated, ignored)." type: string font: description: The font which is included in the style. properties: family: description: "The family of the font. Possible values are: ACCOUNT_DEFAULT_FAMILY, ADSENSE_DEFAULT_FAMILY, ARIAL, TIMES and VERDANA." type: string size: description: "The size of the font. Possible values are: ACCOUNT_DEFAULT_SIZE, ADSENSE_DEFAULT_SIZE, SMALL, MEDIUM and LARGE." type: string type: object kind: default: adsensehost#adStyle description: Kind this is, in this case adsensehost#adStyle. type: string type: object AdUnit: properties: code: description: Identity code of this ad unit, not necessarily unique across ad clients. type: string contentAdsSettings: description: Settings specific to content ads (AFC) and highend mobile content ads (AFMC - deprecated). properties: backupOption: description: The backup option to be used in instances where no ad is available. properties: color: description: Color to use when type is set to COLOR. These are represented as six hexadecimal characters, similar to HTML color codes, but without the leading hash. type: string type: description: Type of the backup option. Possible values are BLANK, COLOR and URL. type: string url: description: URL to use when type is set to URL. type: string type: object size: description: Size of this ad unit. Size values are in the form SIZE_{width}_{height}. type: string type: description: Type of this ad unit. Possible values are TEXT, TEXT_IMAGE, IMAGE and LINK. type: string type: object customStyle: $ref: "#/components/schemas/AdStyle" description: Custom style information specific to this ad unit. id: description: Unique identifier of this ad unit. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. type: string kind: default: adsensehost#adUnit description: Kind of resource this is, in this case adsensehost#adUnit. type: string mobileContentAdsSettings: description: Settings specific to WAP mobile content ads (AFMC - deprecated). properties: markupLanguage: description: The markup language to use for this ad unit. type: string scriptingLanguage: description: The scripting language to use for this ad unit. type: string size: description: Size of this ad unit. type: string type: description: Type of this ad unit. type: string type: object name: description: Name of this ad unit. type: string status: description: |- Status of this ad unit. Possible values are: NEW: Indicates that the ad unit was created within the last seven days and does not yet have any activity associated with it. ACTIVE: Indicates that there has been activity on this ad unit in the last seven days. INACTIVE: Indicates that there has been no activity on this ad unit in the last seven days. type: string type: object AdUnits: properties: etag: description: ETag of this response for caching purposes. type: string items: description: The ad units returned in this list response. items: $ref: "#/components/schemas/AdUnit" type: array kind: default: adsensehost#adUnits description: Kind of list this is, in this case adsensehost#adUnits. type: string nextPageToken: description: Continuation token used to page through ad units. To retrieve the next page of results, set the next request's "pageToken" value to this. type: string type: object AssociationSession: properties: accountId: description: Hosted account id of the associated publisher after association. Present if status is ACCEPTED. type: string id: description: Unique identifier of this association session. type: string kind: default: adsensehost#associationSession description: Kind of resource this is, in this case adsensehost#associationSession. type: string productCodes: description: "The products to associate with the user. Options: AFC, AFG, AFV, AFS (deprecated), AFMC (deprecated)" items: type: string type: array redirectUrl: description: Redirect URL of this association session. Used to redirect users into the AdSense association flow. type: string status: description: Status of the completed association, available once the association callback token has been verified. One of ACCEPTED, REJECTED, or ERROR. type: string userLocale: description: The preferred locale of the user themselves when going through the AdSense association flow. type: string websiteLocale: description: The locale of the user's hosted website. type: string websiteUrl: description: The URL of the user's hosted website. type: string type: object CustomChannel: properties: code: description: Code of this custom channel, not necessarily unique across ad clients. type: string id: description: Unique identifier of this custom channel. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. type: string kind: default: adsensehost#customChannel description: Kind of resource this is, in this case adsensehost#customChannel. type: string name: description: Name of this custom channel. type: string type: object CustomChannels: properties: etag: description: ETag of this response for caching purposes. type: string items: description: The custom channels returned in this list response. items: $ref: "#/components/schemas/CustomChannel" type: array kind: default: adsensehost#customChannels description: Kind of list this is, in this case adsensehost#customChannels. type: string nextPageToken: description: Continuation token used to page through custom channels. To retrieve the next page of results, set the next request's "pageToken" value to this. type: string type: object Report: properties: averages: description: The averages of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty. items: type: string type: array headers: description: The header information of the columns requested in the report. This is a list of headers; one for each dimension in the request, followed by one for each metric in the request. items: properties: currency: description: The currency of this column. Only present if the header type is METRIC_CURRENCY. type: string name: description: The name of the header. type: string type: description: The type of the header; one of DIMENSION, METRIC_TALLY, METRIC_RATIO, or METRIC_CURRENCY. type: string type: object type: array kind: default: adsensehost#report description: Kind this is, in this case adsensehost#report. type: string rows: description: The output rows of the report. Each row is a list of cells; one for each dimension in the request, followed by one for each metric in the request. The dimension cells contain strings, and the metric cells contain numbers. items: items: type: string type: array type: array totalMatchedRows: description: The total number of rows matched by the report request. Fewer rows may be returned in the response due to being limited by the row count requested or the report row limit. format: int64 type: string totals: description: The totals of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty. items: type: string type: array warnings: description: Any warnings associated with generation of the report. items: type: string type: array type: object UrlChannel: properties: id: description: Unique identifier of this URL channel. This should be considered an opaque identifier; it is not safe to rely on it being in any particular format. type: string kind: default: adsensehost#urlChannel description: Kind of resource this is, in this case adsensehost#urlChannel. type: string urlPattern: description: 'URL Pattern of this URL channel. Does not include "http://" or "https://". Example: www.example.com/home' type: string type: object UrlChannels: properties: etag: description: ETag of this response for caching purposes. type: string items: description: The URL channels returned in this list response. items: $ref: "#/components/schemas/UrlChannel" type: array kind: default: adsensehost#urlChannels description: Kind of list this is, in this case adsensehost#urlChannels. type: string nextPageToken: description: Continuation token used to page through URL channels. To retrieve the next page of results, set the next request's "pageToken" value to this. type: string type: object securitySchemes: Oauth2: description: Oauth 2.0 implicit authentication flows: implicit: authorizationUrl: https://accounts.google.com/o/oauth2/auth scopes: https://www.googleapis.com/auth/adsensehost: View and manage your AdSense host data and associated accounts type: oauth2 Oauth2c: description: Oauth 2.0 authorizationCode authentication flows: authorizationCode: authorizationUrl: https://accounts.google.com/o/oauth2/auth scopes: https://www.googleapis.com/auth/adsensehost: View and manage your AdSense host data and associated accounts tokenUrl: https://accounts.google.com/o/oauth2/token type: oauth2