Endpoints
Call these through the okoro proxy at https://okoro.ai/p/google-bigquery
| Action | Method | Path | Min scope |
|---|---|---|---|
| List datasets | GET | read | |
| Read dataset | GET | read | |
| Create dataset | POST | read | |
| Update dataset | PATCH | update | |
| Delete dataset | DELETE | delete | |
| List tables | GET | read | |
| Read table | GET | read | |
| Create table | POST | read | |
| Update table | PATCH | update | |
| Delete table | DELETE | delete | |
| List table rows | GET | read | |
| Stream insert rows | POST | read | |
| Run async query | POST | read | |
| List jobs | GET | read | |
| Read job | GET | read | |
| Run synchronous query | POST | read | |
| Get query results | GET | read |
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.
readGET
POST/projects/*/datasets
/projects/*/datasets/*
/projects/*/datasets/*/tables
/projects/*/datasets/*/tables/*
/projects/*/datasets/*/tables/*/data
/projects/*/jobs
/projects/*/jobs/*
/projects/*/queries
/projects/*/queries/*writeGET
POST/projects/*/datasets/*/tables/*/insertAll
/projects/*/queries
/projects/*/jobsupdateGET
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/*deleteGET
POST
PUT
PATCH
DELETE/projects/*/datasets
/projects/*/datasets/*
/projects/*/datasets/*/tables
/projects/*/datasets/*/tables/*
/projects/*/jobs
/projects/*/jobs/*
/projects/*/queries
/projects/*/queries/*allGET
POST
PUT
PATCH
DELETE/**