Google 的 API 平台為使用該平台建立的所有 Google API 提供一組通用功能。為了使用及控制這類功能,該平台預先訂立了一組稱為「系統參數」的要求參數。這些參數可在所有 Google REST API 和 gRPC API 中使用。系統參數可透過 HTTP 查詢參數或 HTTP 標頭指定。如果是 Google gRPC API,則只能透過 HTTP 標頭指定。
大部分使用者不需要直接使用這些參數。但 Google 提供的用戶端程式庫常常會用到。如果您需要編寫自訂程式碼來直接存取 Google API,系統參數可發揮不少功用,例如協助控制 JSON 美化作業或用來指定 API 金鑰。
Google API 金鑰。詳情請參閱 https://cloud.google.com/docs/authentication/api-keys。
passwd、 password
會保留下來,以防網址中出現密碼。
$prettyPrint、 prettyPrint
美化 JSON 回應。支援的值為 true (預設值)、false。
quotaUser
X-Goog-Quota-User
用於計算使用者配額的虛擬使用者 ID。如未指定,則會使用已驗證的主體。如果沒有已驗證的主體,則會使用用戶端 IP 位址。在指定時,需使用具有服務限制的有效 API 金鑰,以辨識配額專案,否則系統會忽略這項參數。
$outputDefaults
JSON 回應的強制輸出 proto 預設值。
$unique
用於停用要求快取的不重複查詢參數。
X-Goog-Api-Client
API 用戶端身分識別資訊。值是以空格分隔的 NAME "/" SEMVER 字串清單,其中 NAME 應只包含小寫字母、數字和「-」,SEMVER 則應為語意版本字串。例如:X-Goog-Api-Client: python/3.5.0 grpc-google-pubsub-v1/0.1.0-beta2 linux/2.7.0。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-08-11 (世界標準時間)。"],[[["\u003cp\u003eGoogle's API platform utilizes system parameters to manage common functionalities across all Google REST and gRPC APIs, which can be specified via HTTP query parameters or headers.\u003c/p\u003e\n"],["\u003cp\u003eWhile most users won't interact with system parameters directly, they are commonly used by Google-provided client libraries and can be useful for custom code in scenarios like JSON formatting or API key specification.\u003c/p\u003e\n"],["\u003cp\u003eSystem parameters in HTTP requests are sent as URL query parameters or headers, denoted by a \u003ccode\u003e$\u003c/code\u003e prefix to avoid conflicts with regular parameters.\u003c/p\u003e\n"],["\u003cp\u003eFor gRPC requests, system parameters are sent as HTTP request headers with lowercase keys, in contrast to the query parameters for HTTP requests.\u003c/p\u003e\n"],["\u003cp\u003eA variety of system parameters exist, such as \u003ccode\u003e$alt\u003c/code\u003e for alternative response formats, \u003ccode\u003e$key\u003c/code\u003e for API keys, \u003ccode\u003equotaUser\u003c/code\u003e for user-specific quotas, and \u003ccode\u003eX-Server-Timeout\u003c/code\u003e for request timeouts.\u003c/p\u003e\n"]]],[],null,["# System parameters\n\nGoogle's API platform provides a set of common functionality to all Google APIs\nbuilt using the platform. In order to use and control such functionality,\nthe platform pre-defines a special set of request parameters called\n*system parameters*. These parameters are available across all Google REST APIs\nand gRPC APIs. A system parameter can be specified either using an HTTP query\nparameter or an HTTP header. For Google gRPC APIs, only HTTP headers are\nsupported.\n\nMost users will not need to use these parameters directly. However, they are\noften used by Google-provided\n[client libraries](/apis/docs/client-libraries-explained). If you need to write\ncustom code to access Google APIs directly, the system parameters can be\nuseful in cases such as controlling JSON pretty-printing or specifying API Keys.\n\nHTTP Mapping\n------------\n\nFor HTTP requests, system parameters are sent as URL query parameters or\nHTTP request headers. For example, if you have a system parameter `$foo`, it's\nsent as `?$foo=xxx` in the URL, or `?%24foo=xxx` if URL-encoded. See the\ntable below for details.\n| **Note:** The `$` name prefix is added to avoid conflicting with normal request parameters.\n\ngRPC Mapping\n------------\n\nFor [gRPC](https://grpc.io/) requests, system parameters are sent as HTTP\nrequest headers with keys in lowercase. See the table below for details.\n\nDefinitions\n-----------\n\nThe following table lists all system parameters and their definitions.\n\nChangelog\n---------\n\n- 2021-11 Published documentation for `x-goog-request-params`.\n- 2021-02 Published documentation for `quotaUser`.\n- 2020-07 Deprecated OAuth 2.0 query parameters.\n- 2019-10 Introduced `X-Server-Timeout` system parameter.\n- 2017-10 Introduced `X-Goog-User-Project` system parameter."]]