canonical: https://jentic.com/apis/googleapis.com/bigqueryreservation

# Google BigQuery Reservation API

The BigQuery Reservation API manages flat-rate compute capacity for BigQuery: capacityCommitments buy slots for a term, reservations group those slots, and assignments bind reservations to projects, folders, or organisations. The API also supports failover, splitting and merging commitments, and searching assignments. Teams use this when on-demand pricing becomes volatile and they want predictable, reserved slot capacity. It does not run queries; it controls how the capacity that runs queries is allocated.

## For AI agents

Manage BigQuery flat-rate slot capacity, reservations, and project assignments. Agents can buy commitments, split slots between teams, and reassign reservations during failover.

## Scope

Does not run queries, transfer data, or manage column-level policies - use for slot capacity, reservation, and assignment management only.

## Capabilities

- Purchase capacityCommitments for a region with a slot count and plan
- Create reservations that hold a subset of committed slots and configure idle slot sharing
- Assign reservations to projects, folders, or organisations for query routing
- Split, merge, or move capacityCommitments to rebalance across regions
- Trigger failover on a reservation to redirect traffic to a secondary region
- Search assignments across the resource hierarchy to audit slot routing
- List reservations and inspect remaining slot capacity per region

## Use cases

### Predictable Slot Capacity

Buy capacityCommitments and group them into reservations so query workloads run on predictable, billed-by-the-hour capacity instead of on-demand pricing. Commitments are managed at /v1/{parent}/capacityCommitments and reservations at /v1/{parent}/reservations. Idle slot sharing lets unused slots flow between reservations within the same admin project.

Example prompt: Create a 12-month FLEX capacityCommitment for 500 slots in the US region under admin project bq-admin.

### Workload Isolation

Create separate reservations for ETL, BI, and ad-hoc analyst workloads, then assign each to the correct projects so a heavy ETL job cannot starve the dashboards. Assignments are managed at /v1/{parent}/assignments with jobType (QUERY, PIPELINE, ML_EXTERNAL). This protects interactive query latency while keeping pipelines on dedicated slots.

Example prompt: Create reservation prod-bi with 200 slots and assign it to project bi-prod for QUERY jobs.

### Capacity Rebalancing

Use split/merge on capacityCommitments and move/searchAllAssignments to rearrange slots between teams without releasing the underlying commitment. /v1/{parent}/capacityCommitments:merge and /v1/{name}:split allow capacity to follow shifting workloads. /v1/{parent}:searchAssignments shows where every reservation is currently bound.

Example prompt: Split capacityCommitment projects/admin/locations/US/capacityCommitments/abc into commitments of 600 and 400 slots.

### DR and Failover

Failover a reservation to a secondary region using /v1/{name}:failoverReservation when the primary region is degraded. Combined with cross-region replication of datasets, this gives a path to keep BI dashboards running during outages. Slot capacity follows the failover rather than requiring fresh purchases.

Example prompt: Trigger failoverReservation on projects/admin/locations/us-central1/reservations/prod-analytics to its configured secondary region.

### Agent-Driven Capacity Ops

An AI agent monitors slot utilisation and submits split/merge or assignment changes through Jentic when workloads shift. Operations teams describe a desired state in natural language and the agent issues the right reservation API calls. OAuth credentials never leave your Jentic One instance.

Example prompt: From the request 'shift 100 slots from BI to ETL during nightly load', split the BI reservation, create or update the ETL reservation, and confirm new slot counts.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /v1/{+parent}/capacityCommitments | Purchase a capacity commitment in a region |
| POST | /v1/{+name}:split | Split a capacity commitment into two |
| POST | /v1/{+parent}/capacityCommitments:merge | Merge multiple commitments into one |
| POST | /v1/{+parent}/reservations | Create a reservation |
| POST | /v1/{+parent}/assignments | Assign a reservation to a project, folder, or org |
| POST | /v1/{+name}:failoverReservation | Failover a reservation to its secondary region |
| GET | /v1/{+parent}:searchAssignments | Search assignments across the hierarchy |

## Key resources

- **Capacity Commitments** — Buy, split, merge, and inspect committed slot capacity per region.
- **Reservations** — Group committed slots into named reservations with sharing rules.
- **Assignments** — Bind reservations to projects, folders, or organisations per jobType.

## Why Jentic

- **Setup:** Wiring the BigQuery Reservation API by hand means learning its Google OAuth 2.0 flow, minting scoped access tokens from refresh tokens, and coordinating capacity commitment, reservation, and assignment calls yourself. Through Jentic you install once, import the BigQuery Reservation API from the API Directory, store the OAuth credentials once, and your agent calls it.
- **Permission scoping:** The API puts the project or location in the URL path (/v1/{+parent}/reservations, /v1/{+name}:split), so a rule can pin your agent to one project's slot capacity: it can create reservations and assignments there and nowhere else. You choose the operations it may call, so ones like splitting a commitment or failing over a reservation are not included unless you add them.
- **Credential handling:** Your Google OAuth client credentials and refresh token are stored once, encrypted, by your own Jentic One instance and injected at execution time. The agent receives only short-lived scoped access tokens and never sees the refresh token in its prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'buy BigQuery slots' or 'assign a reservation to a project', and Jentic returns the matching capacityCommitment, reservation, or assignment operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **BigQuery API** — Runs the queries that consume reserved slot capacity.
- **Cloud Billing API** — Reads billing accounts and links projects so reservations can be charged correctly.
- **Cloud Billing Budget API** — Sets spending alerts that complement flat-rate slot management.

## FAQ

### What authentication does the BigQuery Reservation API use?

The API uses Google OAuth 2.0 with the cloud-platform and bigquery scopes. Through Jentic, the OAuth refresh token is held in the encrypted vault and the agent receives only short-lived access tokens for each call.

### Can I buy and split slot capacity with this API?

Yes. POST /v1/{parent}/capacityCommitments creates a commitment with a slotCount and plan (FLEX, MONTHLY, ANNUAL); POST /v1/{name}:split splits it into two; and POST /v1/{parent}/capacityCommitments:merge combines them again. Reservations and assignments handle how those slots are routed to projects.

### What are the rate limits for the BigQuery Reservation API?

Project-level quotas apply: typically modest write QPS on commitments, reservations, and assignments, and bursty read QPS for list/search endpoints. Specific values are visible per project in the Google Cloud quotas page.

### How do I assign a reservation to a project through Jentic?

Search Jentic for 'assign a BigQuery reservation to a project', load the schema for POST /v1/{parent}/assignments, and execute with assignee, jobType (QUERY, PIPELINE, or ML_EXTERNAL), and the reservation name. Jentic injects the OAuth token automatically.

### Is the BigQuery Reservation API free?

The API has no per-call surcharge, but capacityCommitments are billed by slot count and plan duration, and reserved slots are billed even when idle. Compare flat-rate cost against on-demand bytes-scanned pricing for your workloads before purchasing.

### Does this API run queries?

No. Reservations only allocate the slot capacity that BigQuery consumes when queries run. Use the BigQuery API to submit query, load, and extract jobs against that capacity.

### Can I limit what my agent is allowed to do with the BigQuery Reservation API?

Yes. Because you run Jentic One yourself, your own rules decide which operations and credentials the agent may use. Since this API puts the project or location in the URL path, such as /v1/{parent}/reservations and /v1/{name}:split, you can pin the agent to one project's slot capacity so it creates reservations and assignments there and nowhere else. You choose the operations it may call, so higher-impact ones like splitting a capacityCommitment or triggering failoverReservation are excluded unless you explicitly add them.
