Database Reference
In-Depth Information
https://www.googleapis.com/bigquery/v2/projects/
bigquery-e2e/datasets/application_logs .
Similarly, POST can add an object to a collection, PUT and PATCH will update
an object, and DELETE will delete an object. Not all operations will be valid
on all collections, but the important part is that the model is consistent.
Although the REST collection-based model sounds great in practice, what
do you do if your API doesn't look like collections of objects? This point is
where REST stops becoming a technology and starts becoming a philosophy.
Advocates of REST would say that the act of turning your API into a set
of collections actually makes it a cleaner, more understandable API. They
say that the benefits of an easy-to-describe API outweigh the ugly bits when
you try too hard to make something fit the model. Furthermore, even if you
follow REST, you can have non-REST operations by adding custom RPC
methods.
BigQuery tends to follow the REST model closely; it has collections for
Projects, Datasets, Tables, Table Data, and Jobs. A couple of API methods
that don't fit the model nicely are added as RPCs: Jobs.query() and
Jobs.getQueryResults() . These collections are described in more
detail in Chapter 7, “Running Queries.”
REST URLs
Another of the main design tenets of REST is that URLs used to interact
with the API should be human readable. This is different from other RPC
mechanisms such as SOAP and JsonRPC, in which you send data to a fixed
URL. Google APIs REST URLs consist of six or seven parts: protocol, host,
API selector, version, path, method (optionally), and query string, as shown
in Figure 5.1 .
Figure 5.1 Google APIs REST URLs
Protocol
The protocol used by BigQuery is HTTPS, which is a security layer that uses
SSL on top of raw HTTP. This means that all requests and responses are sent
encrypted. Some Google APIs may be available via HTTP, but in BigQuery,
 
 
Search WWH ::




Custom Search