The following query parameters can be used with all methods and all resources in the Cloud Spanner API.
NOTES (on auth tokens):
- You must send an authorization token with every request that requires an OAuth scope. OAuth 2.0 is the only supported authorization protocol.
- You can provide an OAuth 2.0 token with any request in one of two ways:
- Using the
access_token
query parameter like this:?access_token=
oauth2-token
- Using the HTTP
Authorization
header like this:Authorization: Bearer
oauth2-token
- Using the
All parameters are optional except where noted.
Parameter | Meaning | Notes |
---|---|---|
access_token |
OAuth 2.0 token for the current user. |
|
callback |
Callback function. |
|
fields |
Selector specifying a subset of fields to include in the response. td> |
|
prettyPrint |
Returns response with indentations and line breaks. |
|
Performance tips
We strongly recommend using the client libraries for workloads that involve relatively high queries per second, relatively small requests or responses, and where you are concerned about latency or throughput. The libraries have substantially lower overhead than REST or JSON because they are built on top of the gRPC interfaces. There are cases where using the REST API makes sense, and you want to optimize for fewer bytes transferred or smaller JSON responses. In those cases, you can use many of the performance tips for Cloud Storage.