Skip to content

BigQuery API API

by googleapis.com

OAuthHTTPSAnalytics
Open documentation ↗

Overview

A data platform for customers to create, manage, share and query data.

BigQuery API is an analytics API from googleapis.com. Requests are authenticated with OAuth. It is served over HTTPS. Its OpenAPI description documents 36 endpoints.

At a glance

Authentication
OAuth
HTTPS
Yes
CORS
Unknown
Category
Analytics
Base URL
https://bigquery.googleapis.com/bigquery/v2
Version
v2
Endpoints
36
Spec updated
2023-04-21

Make a first request

Replace the placeholders; the documentation says exactly where credentials go.

cURL
curl -X GET "https://bigquery.googleapis.com/bigquery/v2/projects" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN"
JavaScript
const response = await fetch("https://bigquery.googleapis.com/bigquery/v2/projects", {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "Authorization": "Bearer YOUR_TOKEN",
  },
});
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    "GET",
    "https://bigquery.googleapis.com/bigquery/v2/projects",
    headers={
    "Accept": "application/json",
    "Authorization": "Bearer YOUR_TOKEN",
    },
    timeout=30,
)
print(response.json())

Endpoints

MethodPathWhat it does
GET/projectsLists all projects to which you have been granted any project role.
GET/projects/{projectId}/datasetsLists all datasets in the specified project to which you have been granted the READER dataset role.
POST/projects/{projectId}/datasetsCreates a new empty dataset.
GET/projects/{projectId}/datasets/{datasetId}Returns the dataset specified by datasetID.
PUT/projects/{projectId}/datasets/{datasetId}Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provi
PATCH/projects/{projectId}/datasets/{datasetId}Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provi
DELETE/projects/{projectId}/datasets/{datasetId}Deletes the dataset specified by the datasetId value. Before you can delete a dataset, you must delete all its tables, either manually or by specifying deleteCo
GET/projects/{projectId}/datasets/{datasetId}/modelsLists all models in the specified dataset. Requires the READER dataset role. After retrieving the list of models, you can get information about a particular mod
GET/projects/{projectId}/datasets/{datasetId}/models/{modelId}Gets the specified model resource by model ID.
PATCH/projects/{projectId}/datasets/{datasetId}/models/{modelId}Patch specific fields in the specified model.
DELETE/projects/{projectId}/datasets/{datasetId}/models/{modelId}Deletes the model specified by modelId from the dataset.
GET/projects/{projectId}/datasets/{datasetId}/routinesLists all routines in the specified dataset. Requires the READER dataset role.
POST/projects/{projectId}/datasets/{datasetId}/routinesCreates a new routine in the dataset.
GET/projects/{projectId}/datasets/{datasetId}/routines/{routineId}Gets the specified routine resource by routine ID.
PUT/projects/{projectId}/datasets/{datasetId}/routines/{routineId}Updates information in an existing routine. The update method replaces the entire Routine resource.
DELETE/projects/{projectId}/datasets/{datasetId}/routines/{routineId}Deletes the routine specified by routineId from the dataset.
GET/projects/{projectId}/datasets/{datasetId}/tablesLists all tables in the specified dataset. Requires the READER dataset role.
POST/projects/{projectId}/datasets/{datasetId}/tablesCreates a new, empty table in the dataset.
GET/projects/{projectId}/datasets/{datasetId}/tables/{tableId}Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes the struct
PUT/projects/{projectId}/datasets/{datasetId}/tables/{tableId}Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided
PATCH/projects/{projectId}/datasets/{datasetId}/tables/{tableId}Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided
DELETE/projects/{projectId}/datasets/{datasetId}/tables/{tableId}Deletes the table specified by tableId from the dataset. If the table contains data, all the data will be deleted.
GET/projects/{projectId}/datasets/{datasetId}/tables/{tableId}/dataRetrieves table data from a specified set of rows. Requires the READER dataset role.
POST/projects/{projectId}/datasets/{datasetId}/tables/{tableId}/insertAllStreams data into BigQuery one record at a time without needing to run a load job. Requires the WRITER dataset role.
GET/projects/{projectId}/datasets/{datasetId}/tables/{tableId}/rowAccessPoliciesLists all row access policies on the specified table.
GET/projects/{projectId}/jobsLists all jobs that you started in the specified project. Job information is available for a six month period after creation. The job list is sorted in reverse
POST/projects/{projectId}/jobsStarts a new asynchronous job. Requires the Can View project role.
GET/projects/{projectId}/jobs/{jobId}Returns information about a specific job. Job information is available for a six month period after creation. Requires that you're the person who ran the job, o
POST/projects/{projectId}/jobs/{jobId}/cancelRequests that a job be cancelled. This call will return immediately, and the client will need to poll for the job status to see if the cancel completed successf
DELETE/projects/{projectId}/jobs/{jobId}/deleteRequests the deletion of the metadata of a job. This call returns when the job's metadata is deleted.
POST/projects/{projectId}/queriesRuns a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout.
GET/projects/{projectId}/queries/{jobId}Retrieves the results of a query job.
GET/projects/{projectId}/serviceAccountReturns the email address of the service account for your project used for interactions with Google Cloud KMS.
POST/{resource}:getIamPolicyGets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
POST/{resource}:setIamPolicySets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` erro
POST/{resource}:testIamPermissionsReturns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND`

Questions

Does the BigQuery API API need an API key?

Yes. The BigQuery API API uses OAuth authentication; the documentation explains how to get credentials.

Does the BigQuery API API support HTTPS?

Yes, the BigQuery API API is served over HTTPS.

How many endpoints does the BigQuery API API have?

Its OpenAPI description lists 36 endpoints in version v2. All of them are shown on this page.

What are alternatives to the BigQuery API API?

Other Analytics APIs include Google Play Integrity API, versionhistory.googleapis.com API, Doc Converter, Perspective Comment Analyzer API, Safe Browsing API.

Compare alternatives →

Google Play Integrity API

Analytics

The Play Integrity API helps you check that you're interacting with your genuine app on a genuine Android device powered by Google Play services. The Play Integrity API has replaced SafetyNet Attestation and Android Device Verification.

OAuth1 endpoints

versionhistory.googleapis.com API

Analytics

Version History API - Prod

No auth4 endpoints

Doc Converter

Analytics

This api converts file formats of OpenXml and OpenOffice documents formats to vector files (e.g., svg)

No auth1 endpoints

Perspective Comment Analyzer API

Analytics

The Perspective Comment Analyzer API provides information about the potential impact of a comment on a conversation (e.g. it can provide a score for the "toxicity" of a comment). Users can leverage the "SuggestCommentScore" method to submit corrections to improve Perspective over time. Users can set the "doNotStore" flag to ensure that all submitted comments are automatically deleted after scores are returned.

OAuth2 endpoints

Safe Browsing API

Analytics

Enables client applications to check web resources (most commonly URLs) against Google-generated lists of unsafe web resources. The Safe Browsing APIs are for non-commercial use only. If you need to use APIs to detect malicious URLs for commercial purposes – meaning “for sale or revenue-generating purposes” – please refer to the Web Risk API.

No auth7 endpoints

Web Fonts Developer API

Analytics

The Google Web Fonts Developer API lets you retrieve information about web fonts served by Google.

No auth1 endpoints

Listed from APIs.guru (CC0).