BigQuery API
A data platform for customers to create, manage, share and query data.
Data & analytics#openapi#analytics#media
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
A data platform for customers to create, manage, share and query data.
Endpoints 42
datasets
- GETReturns the dataset specified by datasetID
/projects/:projectId/datasets/:datasetId?accessPolicyVersion=0&datasetView=DATASET_VIEW_UNSPECIFIEDReturns the dataset specified by datasetID. # IAM Permissions Requires the bigquery.datasets.get permission on the dataset. - PUTUpdates information in an existing dataset
/projects/:projectId/datasets/:datasetId?accessPolicyVersion=0&updateMode=UPDATE_MODE_UNSPECIFIEDUpdates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are… - DELETEDeletes the dataset specified by the datasetId value
/projects/:projectId/datasets/:datasetId?deleteContents=trueDeletes the dataset specified by the datasetId value. Before you can delete a dataset, you must delete all its tables, either manually or by specifying… - PATCHUpdates information in an existing dataset
/projects/:projectId/datasets/:datasetId?accessPolicyVersion=0&updateMode=UPDATE_MODE_UNSPECIFIEDUpdates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are… - GETLists all datasets in the specified project to which the user has been granted the READER dataset role
/projects/:projectId/datasets?all=true&filter=string&maxResults=0&pageToken=stringLists all datasets in the specified project to which the user has been granted the READER dataset role. # IAM Permissions Requires no specific IAM… - POSTCreates a new empty dataset
/projects/:projectId/datasets?accessPolicyVersion=0Creates a new empty dataset. # IAM Permissions Requires the bigquery.datasets.create permission on the project. - POSTUndeletes a dataset which is within time travel window based on datasetId
/projects/:projectId/datasets/:datasetId:undeleteUndeletes a dataset which is within time travel window based on datasetId. If a time is specified, the dataset version deleted at that time is undeleted, else…
jobs
- POSTRequests that a job be cancelled
/projects/:projectId/jobs/:jobId/cancel?location=stringRequests 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… - DELETERequests the deletion of the metadata of a job
/projects/:projectId/jobs/:jobId/delete?location=stringRequests the deletion of the metadata of a job. This call returns when the job's metadata is deleted. # IAM Permissions Requires the bigquery.jobs.delete… - GETReturns information about a specific job
/projects/:projectId/jobs/:jobId?location=stringReturns 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,… - GETRPC to get the results of a query job
/projects/:projectId/queries/:jobId?formatOptions.timestampOutputFormat=TIMESTAMP_OUTPUT_FORMAT_UNSPECIFIED&formatOptions.useInt64Timestamp=true&location=string&maxResults=0&pageToken=string&startIndex=string&timeoutMs=0RPC to get the results of a query job. # IAM Permissions Requires the following IAM permission(s) to use this method: - bigquery.jobs.get on the job. -… - GETLists all jobs that you started in the specified project
/projects/:projectId/jobs?allUsers=true&maxCreationTime=string&maxResults=0&minCreationTime=string&pageToken=string&parentJobId=string&projection=full&stateFilter=doneLists 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… - POSTStarts a new asynchronous job
/projects/:projectId/jobsStarts a new asynchronous job. This API has two different kinds of endpoint URIs, as this method supports a variety of use cases. * The *Metadata* URI is used… - POSTRuns a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout
/projects/:projectId/queriesRuns a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout. # IAM Permissions Requires the…
models
- GETGets the specified model resource by model ID
/projects/:projectId/datasets/:datasetId/models/:modelIdGets the specified model resource by model ID. # IAM Permissions Requires the bigquery.models.getMetadata permission on the model. - DELETEDeletes the model specified by modelId from the dataset
/projects/:projectId/datasets/:datasetId/models/:modelIdDeletes the model specified by modelId from the dataset. # IAM Permissions Requires the bigquery.models.delete permission on the model. - PATCHPatch specific fields in the specified model
/projects/:projectId/datasets/:datasetId/models/:modelIdPatch specific fields in the specified model. # IAM Permissions Requires the bigquery.models.updateMetadata permission on the model. - GETLists all models in the specified dataset
/projects/:projectId/datasets/:datasetId/models?maxResults=0&pageToken=stringLists all models in the specified dataset. Requires the READER dataset role. After retrieving the list of models, you can get information about a particular…
projects
- GETRPC to get the service account for a project used for interactions with Google Cloud KMS
/projects/:projectId/serviceAccountRPC to get the service account for a project used for interactions with Google Cloud KMS. Requires the bigquery.jobs.create permission on the project… - GETRPC to list projects to which the user has been granted any project role
/projects?maxResults=0&pageToken=stringRPC to list projects to which the user has been granted any project role. Users of this method are encouraged to consider the Resource Manager API, which…
routines
- GETGets the specified routine resource by routine ID
/projects/:projectId/datasets/:datasetId/routines/:routineId?readMask=stringGets the specified routine resource by routine ID. # IAM Permissions Requires the bigquery.routines.get permission on the routine. - PUTUpdates information in an existing routine
/projects/:projectId/datasets/:datasetId/routines/:routineIdUpdates information in an existing routine. The update method replaces the entire Routine resource. # IAM Permissions Requires the bigquery.routines.update… - DELETEDeletes the routine specified by routineId from the dataset
/projects/:projectId/datasets/:datasetId/routines/:routineIdDeletes the routine specified by routineId from the dataset. # IAM Permissions Requires the bigquery.routines.delete permission on the routine. - GETLists all routines in the specified dataset
/projects/:projectId/datasets/:datasetId/routines?filter=string&maxResults=0&pageToken=string&readMask=stringLists all routines in the specified dataset. Requires the READER dataset role. # IAM Permissions Requires the bigquery.routines.list permission on the dataset. - POSTCreates a new routine in the dataset
/projects/:projectId/datasets/:datasetId/routinesCreates a new routine in the dataset. # IAM Permissions Requires the bigquery.routines.create permission on the dataset.
tables
- POSTGets the access control policy for a resource
/:resource:getIamPolicyGets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. - POSTSets the access control policy on the specified resource
/:resource:setIamPolicySets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. - POSTReturns permissions that a caller has on the specified resource
/: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… - GETGets the specified table resource by table ID
/projects/:projectId/datasets/:datasetId/tables/:tableId?selectedFields=string&view=TABLE_METADATA_VIEW_UNSPECIFIEDGets 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… - PUTUpdates information in an existing table
/projects/:projectId/datasets/:datasetId/tables/:tableId?autodetect_schema=trueUpdates information in an existing table. The update method replaces the entire Table resource, whereas the patch method only replaces fields that are… - DELETEDeletes the table specified by tableId from the dataset
/projects/:projectId/datasets/:datasetId/tables/:tableIdDeletes the table specified by tableId from the dataset. If the table contains data, all the data will be deleted. # IAM Permissions Requires the… - PATCHUpdates information in an existing table
/projects/:projectId/datasets/:datasetId/tables/:tableId?autodetect_schema=trueUpdates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are… - GETLists all tables in the specified dataset
/projects/:projectId/datasets/:datasetId/tables?maxResults=0&pageToken=stringLists all tables in the specified dataset. Requires the READER dataset role. # IAM Permissions Requires the bigquery.tables.list permission on the dataset. - POSTCreates a new, empty table in the dataset
/projects/:projectId/datasets/:datasetId/tablesCreates a new, empty table in the dataset. # IAM Permissions Requires the bigquery.tables.create permission on the dataset.
rowAccessPolicies
- POSTDeletes provided row access policies
/projects/:projectId/datasets/:datasetId/tables/:tableId/rowAccessPolicies:batchDeleteDeletes provided row access policies. # IAM Permissions Requires the following IAM permission(s) on the table: - bigquery.rowAccessPolicies.delete -… - GETGets the specified row access policy by policy ID
/projects/:projectId/datasets/:datasetId/tables/:tableId/rowAccessPolicies/:policyIdGets the specified row access policy by policy ID. # IAM Permissions Requires the bigquery.rowAccessPolicies.get permission on the table. - PUTUpdates a row access policy
/projects/:projectId/datasets/:datasetId/tables/:tableId/rowAccessPolicies/:policyIdUpdates a row access policy. # IAM Permissions Requires the following IAM permission(s) on the table: - bigquery.rowAccessPolicies.update -… - DELETEDeletes a row access policy
/projects/:projectId/datasets/:datasetId/tables/:tableId/rowAccessPolicies/:policyId?force=trueDeletes a row access policy. # IAM Permissions Requires the following IAM permission(s) on the table: - bigquery.rowAccessPolicies.delete -… - GETLists all row access policies on the specified table
/projects/:projectId/datasets/:datasetId/tables/:tableId/rowAccessPolicies?pageSize=0&pageToken=stringLists all row access policies on the specified table. # IAM Permissions Requires the bigquery.rowAccessPolicies.list permission on the table. - POSTCreates a row access policy
/projects/:projectId/datasets/:datasetId/tables/:tableId/rowAccessPoliciesCreates a row access policy. # IAM Permissions Requires the following IAM permission(s) on the table: - bigquery.rowAccessPolicies.create -…
tabledata
- POSTStreams data into BigQuery one record at a time without needing to run a load job
/projects/:projectId/datasets/:datasetId/tables/:tableId/insertAllStreams data into BigQuery one record at a time without needing to run a load job. # IAM Permissions Requires the following IAM permission(s) to use this… - GETList the content of a table in rows
/projects/:projectId/datasets/:datasetId/tables/:tableId/data?formatOptions.timestampOutputFormat=TIMESTAMP_OUTPUT_FORMAT_UNSPECIFIED&formatOptions.useInt64Timestamp=true&maxResults=0&pageToken=string&selectedFields=string&startIndex=stringList the content of a table in rows. # IAM Permissions Requires the bigquery.tables.getData permission on the table.
API details
- Base URL
https://bigquery.googleapis.com/bigquery/v2- Authentication
- OAuth 2.0 (authorization code flow) with 7 scopes
An API key in the key query parameter - Operations
- 42 operations on 25 pathsGET 16POST 13DELETE 6PUT 4PATCH 3
- Main resources
- tables 9datasets 7jobs 7rowAccessPolicies 6routines 5models 4projects 2tabledata 2
- Response formats
application/json- Description format
- Google API Discovery, API version
v2 - Links
- Documentation · OpenAPI document
- Listed from
- Google API Discovery document (googleapis/discovery-artifact-manager) (Apache-2.0)
How to test the BigQuery API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the BigQuery API collection, without the publisher's secrets.
- Add your credentialsThis API uses OAuth 2.0 (authorization code flow) with 7 scopes. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Returns the dataset specified by datasetID” (GET /projects/:projectId/datasets/:datasetId?accessPolicyVersion=0&datasetView=DATASET_VIEW_UNSPECIFIED), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the BigQuery API?
A data platform for customers to create, manage, share and query data. It is listed under Data & analytics and has 42 endpoints.
Who publishes the BigQuery API?
It is listed from Google's public API description (an OpenAPI document), not published by Google on Swastik Codes. Anyone who controls googleapis.com can claim the profile by adding a DNS TXT record.
What is the base URL of the BigQuery API?
Requests go to https://bigquery.googleapis.com/bigquery/v2. Endpoint paths are added to this base URL.
How do I authenticate with the BigQuery API?
It accepts 2 methods: OAuth 2.0 (authorization code flow) with 7 scopes; an API key in the key query parameter.
How many endpoints does the BigQuery API have?
42 operations on 25 paths (16 GET, 13 POST, 6 DELETE, 4 PUT, 3 PATCH). The largest groups are tables, datasets, jobs, rowAccessPolicies.
Is forking the BigQuery API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.