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" } 。
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-02-27 (世界標準時間)。
[null,null,["上次更新時間: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"]]