WebResource
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
WebResource 代表经过验证的网站或网域。
它包含网站或网域的规范 ID、网址或域名,以及所有者列表。请注意,所有者列表始终包含经过身份验证的用户,因为只有可以访问 WebResource 的用户是经过身份验证的用户(即该网站或网域的所有者)。
有关此类资源的方法列表,请参阅本页面的结尾部分。
资源表示法
{
"id": string,
"site": {
"type": string,
"identifier": string
},
"owners": [
string
]
}
属性名称 |
值 |
说明 |
备注 |
id |
string |
用于标识此网站的字符串。此值应该用于 get、update 和 delete 操作的 REST 网址的 id 部分。 |
|
owners[] |
list |
此确切资源所有经过验证的直接所有者的电子邮件地址。此列表中不包含间接所有者,例如所属网域的经过验证的所有者。 |
|
site |
object |
已验证或即将验证的网站的地址和类型的容器。 |
|
site.identifier |
string |
网站标识符,它采用不同的形式,具体取决于 type 属性的值。 |
|
site.type |
string |
网站类型。
可接受的值包括:
- “
ANDROID_APP ”:将 identifier 设为 Android 应用网址。Example: "android-app://com.google.android.youtube/"
- “
INET_DOMAIN ”:将 identifier 设置为域名。示例:“www.example.com”、“example.com”或“subdomain.example.com”
- “
SITE ”:将 identifier 设置为网站根目录的完全限定网址(以标记 / 结尾)。Examples: "https://www.example.com/"或“https://www.example.com/subsite/”
|
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eA WebResource represents a verified website or domain and includes its ID, URL/domain, and a list of owners, which always includes the authenticated user.\u003c/p\u003e\n"],["\u003cp\u003eYou can verify ownership, retrieve, update, and delete WebResources using the provided methods.\u003c/p\u003e\n"],["\u003cp\u003eWebResource data includes an ID, owner list, and site information containing the identifier and type (e.g., website, Android app, domain).\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003esite.identifier\u003c/code\u003e can be a domain name, a URL, or an Android app URL depending on the \u003ccode\u003esite.type\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eSeveral methods are available to manage WebResources, including inserting (verifying ownership), retrieving data, updating owner lists, deleting, listing all verified resources, and getting a verification token.\u003c/p\u003e\n"]]],["A WebResource represents a verified website or domain, identified by an `id`, `site` (type and identifier), and a list of `owners`, which always includes the authenticated user. Key actions include using `insert` to verify ownership, `get`, `update`, and `delete` to manage existing resources, `list` to view verified sites, and `getToken` to obtain a verification token. Site `type` can be `ANDROID_APP`, `INET_DOMAIN`, or `SITE`, with corresponding identifier formats.\n"],null,["# WebResource\n\n\u003cbr /\u003e\n\nA WebResource is a representation of a verified website or domain.\n\n\u003cbr /\u003e\n\nIt contains the canonical ID of a site or domain, the URL or domain name, and a list of owners. Note that the owners list always includes the authenticated user, because the only people who can access a WebResource are authenticated users who are owners of that site or domain.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nFor a list of [methods](#methods) for this resource, see the end of this page.\n\nResource representations\n------------------------\n\n\u003cbr /\u003e\n\n```carbon\n{\n \"id\": string,\n \"site\": {\n \"type\": string,\n \"identifier\": string\n },\n \"owners\": [\n string\n ]\n}\n```\n\n| Property name | Value | Description | Notes |\n|-------------------|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------|\n| `id` | `string` | The string used to identify this site. This value should be used in the \u003cvar class=\"apiparam\" translate=\"no\"\u003eid\u003c/var\u003e portion of the REST URL for the [get](/site-verification/v1/webResource/get), [update](/site-verification/v1/webResource/update), and [delete](/site-verification/v1/webResource/delete) operations. | |\n| `owners[]` | `list` | The email addresses of all direct, verified owners of this exact property. Indirect owners---for example verified owners of the containing domain---are not included in this list. | |\n| `site` | `object` | Container for the address and type of a site that is verified or will be verified. | |\n| site.`identifier` | `string` | The site identifier, which takes different forms depending on the value of the `type` property. | |\n| site.`type` | `string` | The site type. \u003cbr /\u003e Acceptable values are: - \"`ANDROID_APP`\": Set `identifier` to an Android app URL. **Example:** \"android-app://com.google.android.youtube/\" - \"`INET_DOMAIN`\": Set `identifier` to a domain name. **Examples:** \"www.example.com\", \"example.com\" or \"subdomain.example.com\" - \"`SITE`\": Set `identifier` to a fully-qualified URL for your site root, ending in a / mark. **Examples:** \"https://www.example.com/\" or \"https://www.example.com/subsite/\" | |\n\nMethods\n-------\n\n\u003cbr /\u003e\n\nUse the [insert](/site-verification/v1/webResource/insert) method to verify the authenticated user's ownership of a website or domain. Use the [get](/site-verification/v1/webResource/get), [update](/site-verification/v1/webResource/update), and [delete](/site-verification/v1/webResource/delete) methods to retrieve or modify a resource that has already been verified for the authenticated user.\n\nYou can see all verified resources for the authenticated user with [list](/site-verification/v1/webResource/list), and you can get a token to place on the authenticated user's site with [getToken](/site-verification/v1/webResource/getToken).\n\n\u003cbr /\u003e\n\n[delete](/site-verification/v1/webResource/delete)\n: Unverifies the user's ownership of a website or domain.\n\n[get](/site-verification/v1/webResource/get)\n: Retrieves the most current data for a website or domain.\n\n[getToken](/site-verification/v1/webResource/getToken)\n: Gets a verification token for the authenticated user to place on a website or domain.\n\n[insert](/site-verification/v1/webResource/insert)\n: Verifies ownership of a website or domain.\n\n[list](/site-verification/v1/webResource/list)\n: Gets the list of the authenticated user's verified websites and domains.\n\n[update](/site-verification/v1/webResource/update)\n: Modifies the list of owners for a website or domain."]]