← providers

Google BigQuery

Query, manage, and stream data in Google BigQuery

Endpoints

Call these through the okoro proxy at https://okoro.ai/p/google-bigquery

ActionMethodPathMin scope
List datasetsGETread
Read datasetGETread
Create datasetPOSTread
Update datasetPATCHupdate
Delete datasetDELETEdelete
List tablesGETread
Read tableGETread
Create tablePOSTread
Update tablePATCHupdate
Delete tableDELETEdelete
List table rowsGETread
Stream insert rowsPOSTread
Run async queryPOSTread
List jobsGETread
Read jobGETread
Run synchronous queryPOSTread
Get query resultsGETread

Examples

Every request requires a short-lived operation token scoped to a single action.

1. Get an operation token

Exchange your service token for a short-lived operation token scoped to a single action.

TOKEN=$(curl -sX POST "https://okoro.ai/t/tokens" \
  -H "Authorization: Bearer $OKORO_SERVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"provider": "google-bigquery", "scope": "read", "intent": "describe what you are doing"}' \
  | jq -r '.token')

2. Call the API

Use the operation token as a Bearer token. The proxy forwards the request to Google BigQuery and logs the action.

List datasets
curl -X GET "https://okoro.ai/p/google-bigquery/projects/{id}/datasets" \
  -H "Authorization: Bearer $TOKEN"
Read dataset
curl -X GET "https://okoro.ai/p/google-bigquery/projects/{id}/datasets/{id}" \
  -H "Authorization: Bearer $TOKEN"
Create dataset
curl -X POST "https://okoro.ai/p/google-bigquery/projects/{id}/datasets" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Update dataset
curl -X PATCH "https://okoro.ai/p/google-bigquery/projects/{id}/datasets/{id}" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Delete dataset
curl -X DELETE "https://okoro.ai/p/google-bigquery/projects/{id}/datasets/{id}" \
  -H "Authorization: Bearer $TOKEN"
List tables
curl -X GET "https://okoro.ai/p/google-bigquery/projects/{id}/datasets/{id}/tables" \
  -H "Authorization: Bearer $TOKEN"
Read table
curl -X GET "https://okoro.ai/p/google-bigquery/projects/{id}/datasets/{id}/tables/{id}" \
  -H "Authorization: Bearer $TOKEN"
Create table
curl -X POST "https://okoro.ai/p/google-bigquery/projects/{id}/datasets/{id}/tables" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Update table
curl -X PATCH "https://okoro.ai/p/google-bigquery/projects/{id}/datasets/{id}/tables/{id}" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Delete table
curl -X DELETE "https://okoro.ai/p/google-bigquery/projects/{id}/datasets/{id}/tables/{id}" \
  -H "Authorization: Bearer $TOKEN"
List table rows
curl -X GET "https://okoro.ai/p/google-bigquery/projects/{id}/datasets/{id}/tables/{id}/data" \
  -H "Authorization: Bearer $TOKEN"
Stream insert rows
curl -X POST "https://okoro.ai/p/google-bigquery/projects/{id}/datasets/{id}/tables/{id}/insertAll" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Run async query
curl -X POST "https://okoro.ai/p/google-bigquery/projects/{id}/jobs" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
List jobs
curl -X GET "https://okoro.ai/p/google-bigquery/projects/{id}/jobs" \
  -H "Authorization: Bearer $TOKEN"
Read job
curl -X GET "https://okoro.ai/p/google-bigquery/projects/{id}/jobs/{id}" \
  -H "Authorization: Bearer $TOKEN"
Run synchronous query
curl -X POST "https://okoro.ai/p/google-bigquery/projects/{id}/queries" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Get query results
curl -X GET "https://okoro.ai/p/google-bigquery/projects/{id}/queries/{id}" \
  -H "Authorization: Bearer $TOKEN"

Scopes

Your service token must be configured with at least the required scope level.

read
GET POST
/projects/*/datasets /projects/*/datasets/* /projects/*/datasets/*/tables /projects/*/datasets/*/tables/* /projects/*/datasets/*/tables/*/data /projects/*/jobs /projects/*/jobs/* /projects/*/queries /projects/*/queries/*
write
GET POST
/projects/*/datasets/*/tables/*/insertAll /projects/*/queries /projects/*/jobs
update
GET POST PUT PATCH
/projects/*/datasets /projects/*/datasets/* /projects/*/datasets/*/tables /projects/*/datasets/*/tables/* /projects/*/datasets/*/tables/*/data /projects/*/jobs /projects/*/jobs/* /projects/*/queries /projects/*/queries/*
delete
GET POST PUT PATCH DELETE
/projects/*/datasets /projects/*/datasets/* /projects/*/datasets/*/tables /projects/*/datasets/*/tables/* /projects/*/jobs /projects/*/jobs/* /projects/*/queries /projects/*/queries/*
all
GET POST PUT PATCH DELETE
/**