Method: accounts.dataSources.list
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
HTTP 请求
GET https://merchantapi.googleapis.com/datasources/v1beta/{parent=accounts/*}/dataSources
网址采用 gRPC 转码语法。
路径参数
参数 |
parent |
string
必需。要为其列出数据源的账号。格式:accounts/{account}
|
查询参数
参数 |
pageSize |
integer
可选。要返回的数据源数量上限。服务返回的值可能小于此值。最大值为 1,000;大于 1,000 的值会强制转换为 1,000。如果未指定,则会返回数据源数量上限。
|
pageToken |
string
可选。从之前的 dataSources.list 调用接收的页面令牌。利用其进行后续页面检索。 进行分页时,提供给 dataSources.list 的所有其他参数必须与提供页面令牌的调用匹配。
|
响应正文
dataSources.list 方法的响应消息。
如果成功,响应正文将包含结构如下的数据:
JSON 表示法 |
{
"dataSources": [
{
object (DataSource )
}
],
"nextPageToken": string
} |
字段 |
dataSources[] |
object (DataSource )
指定账号中的数据源。
|
nextPageToken |
string
可作为 pageToken 发送并用于检索下一页的令牌。如果省略此字段,则不存在后续页面。
|
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/content
如需了解详情,请参阅 OAuth 2.0 Overview。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-01-23。
[null,null,["最后更新时间 (UTC):2025-01-23。"],[[["\u003cp\u003eLists data source configurations for a given Merchant Center account.\u003c/p\u003e\n"],["\u003cp\u003eUses the \u003ccode\u003eGET\u003c/code\u003e method and requires \u003ccode\u003eparent\u003c/code\u003e as a path parameter to specify the account.\u003c/p\u003e\n"],["\u003cp\u003eAccepts optional query parameters for pagination: \u003ccode\u003epageSize\u003c/code\u003e and \u003ccode\u003epageToken\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eReturns a list of \u003ccode\u003eDataSource\u003c/code\u003e objects and a \u003ccode\u003enextPageToken\u003c/code\u003e for subsequent pages, if available.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/content\u003c/code\u003e scope.\u003c/p\u003e\n"]]],["This document details how to list data sources for a given account using an HTTP GET request. The request URL follows a specific format: `https://merchantapi.googleapis.com/datasources/v1beta/{parent=accounts/*}/dataSources`, where `parent` is the required account identifier. Optional query parameters, `pageSize` (maximum 1000) and `pageToken`, control the number of results and pagination. The request body should be empty. The successful response includes an array of `dataSources` and an optional `nextPageToken` for subsequent pages. The `https://www.googleapis.com/auth/content` OAuth scope is required.\n"],null,["# Method: accounts.dataSources.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ListDataSourcesResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nLists the configurations for data sources for the given account.\n\n### HTTP request\n\n`GET https://merchantapi.googleapis.com/datasources/v1beta/{parent=accounts/*}/dataSources`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|---------------------------------------------------------------------------------------|\n| `parent` | `string` Required. The account to list data sources for. Format: `accounts/{account}` |\n\n### Query parameters\n\n| Parameters ||\n|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `pageSize` | `integer` Optional. The maximum number of data sources to return. The service may return fewer than this value. The maximum value is 1000; values above 1000 will be coerced to 1000. If unspecified, the maximum number of data sources will be returned. |\n| `pageToken` | `string` Optional. A page token, received from a previous `dataSources.list` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `dataSources.list` must match the call that provided the page token. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nResponse message for the dataSources.list method.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"dataSources\": [ { object (/merchant/api/reference/rest/datasources_v1beta/accounts.dataSources#DataSource) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|-----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `dataSources[]` | `object (`[DataSource](/merchant/api/reference/rest/datasources_v1beta/accounts.dataSources#DataSource)`)` The data sources from the specified account. |\n| `nextPageToken` | `string` A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/content`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]