Request
JSON 表示法 |
{
"requestId": string,
"methodName": string,
"request": {
"@type": string,
field1: ...,
...
},
"extensions": [
{
"@type": string,
field1: ...,
...
}
]
} |
字段 |
requestId |
string
批次中此请求的唯一 ID。具有匹配 requestId 的响应消息是对此请求的响应。对于请求流方法,可以多次使用相同的 requestId 来传递属于单个方法的所有请求消息。对于响应流式传输方法,同一 requestId 可能出现在多条响应消息中。
|
methodName |
string
调用的方法。必须是完全限定的方法名称。示例:google.rpc.batch.Batch.Execute
|
request |
object
请求载荷。 此对象可以包含任意类型的字段。附加字段 "@type" 包含用于标示相应类型的 URI。示例:{ "id": 1234, "@type": "types.example.com/standard/id" } 。
|
extensions[] |
object
应用专属请求元数据。 此对象可以包含任意类型的字段。附加字段 "@type" 包含用于标示相应类型的 URI。示例:{ "id": 1234, "@type": "types.example.com/standard/id" } 。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-02-27。
[null,null,["最后更新时间 (UTC):2025-02-27。"],[[["Batch requests use JSON to bundle multiple API calls into a single request, each identified by a unique `requestId`."],["Each individual request within the batch specifies the `methodName` and includes a `request` object containing the call's specific data and type information."],["The `extensions` field allows for adding application-specific metadata to individual requests within the batch."]]],["A request within a batch execution is represented in JSON. It includes a unique `requestId` to link it to its response. The `methodName` specifies the fully qualified method being called. The `request` field holds the request payload as an object with a type identifier. `extensions` carries application-specific metadata, also as an object with a type identifier. Multiple requests can share the same `requestId` for streaming methods.\n"]]