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

# Google API Gateway API

The Google Cloud API Gateway API lets developers create and manage gateways, API configs, and APIs that front backend services running on Cloud Run, Cloud Functions, or App Engine. It exposes resources for the API, ApiConfig (the OpenAPI spec plus auth and rate-limit policy), and Gateway (the deployable endpoint), along with IAM helpers for resource-level permissions and operation tracking for asynchronous deploys.

## For AI agents

Provision and manage Google Cloud API Gateway resources to front Cloud Run, Functions, and App Engine backends. Useful for agents that need to expose internal services as authenticated, rate-limited public APIs.

## Scope

Does not handle backend service hosting, full enterprise API management, or runtime traffic processing - use for control-plane management of Google Cloud API Gateway resources only.

## Capabilities

- Create and update API resources that group related ApiConfigs
- Upload an OpenAPI spec as an ApiConfig with auth and quota policy
- Deploy a Gateway that routes traffic to a specific ApiConfig
- Manage IAM policy on gateways, APIs, and configs
- Track long-running deploy operations through to completion
- List APIs, configs, and gateways across project locations

## Use cases

### Expose Cloud Run services as a managed public API

Teams running services on Cloud Run or Cloud Functions front them with API Gateway to add API key auth, JWT validation, and quota enforcement without writing middleware. The agent uploads an OpenAPI spec as an ApiConfig and deploys a Gateway that becomes the public entry point for the backend.

Example prompt: Create API 'orders-api', upload openapi.yaml as config 'v1', then create a gateway 'orders-prod' bound to that config in us-central1.

### Versioned API rollouts

Engineering ships new contract versions by uploading a new ApiConfig and pointing the Gateway at it. Because the Gateway resource is independently mutable, switching versions is a single update call, and a rollback is the inverse update - no DNS or load-balancer change required.

Example prompt: Patch gateway projects/p/locations/us-central1/gateways/orders-prod to reference apiConfig v2 and poll the returned operation until done.

### IAM-locked partner APIs

When the gateway should only accept calls from specific partner service accounts, IAM bindings on the gateway resource restrict who can invoke it. The setIamPolicy and getIamPolicy endpoints on the gateway resource make this auditable through Terraform or scripts.

Example prompt: Set IAM policy on the orders-prod gateway granting roles/apigateway.invoker to serviceAccount:partner@example.iam.gserviceaccount.com.

### AI agent gateway operations through Jentic

An infra-focused AI agent rolls out new API versions by reading a Pull Request that updates the OpenAPI spec, uploading the new ApiConfig, swapping the gateway, and reporting success. Through Jentic the agent uses search-load-execute and never holds the project's service account JSON.

Example prompt: Read openapi.yaml from the PR diff, create config 'v3', update gateway orders-prod to reference it, and post the new gateway URL into the PR.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /v1/{+parent}/apis | List APIs in a project |
| GET | /v1/{+parent}/configs | List API configs under an API |
| GET | /v1/{+parent}/gateways | List gateways in a location |
| GET | /v1/{+resource}:getIamPolicy | Get IAM policy on a gateway, API, or config |
| GET | /v1/{+name}/locations | List supported locations |
| DELETE | /v1/{+name} | Delete an API, config, or gateway |

## Key resources

- **Apis** — Logical container for API configs
- **ApiConfigs** — Versioned OpenAPI spec plus auth and quota policy
- **Gateways** — Deployable endpoint that routes traffic to a config
- **IamPolicy** — Resource-level access control on APIs, configs, and gateways
- **Operations** — Long-running operation tracking for create and update

## Why Jentic

- **Setup:** Wiring the API Gateway API by hand means configuring Google OAuth2, scoping a service account for Cloud control-plane access, and minting access tokens for each management call yourself. Through Jentic you install once, import the API Gateway API from the API Directory, store the OAuth credential once, and your agent calls it.
- **Permission scoping:** This API puts the resource name in the URL path (/v1/{parent}/gateways, /v1/{name}), so a rule can pin your agent to one project or location: it can list APIs, configs, and gateways there and nothing else. You choose the operations it may call, so destructive ones like deleting a gateway are not included unless you add them.
- **Credential handling:** Your Google Cloud OAuth credential is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'deploy an API gateway' or 'upload an OpenAPI config', and Jentic returns the matching API Gateway operation with its input schema so the agent calls the right endpoint without the gcloud CLI or the full Cloud reference.

## Related APIs

- **Apigee API** — Full enterprise API management platform with deeper analytics and policy.
- **App Engine Admin API** — Hosts backend services that API Gateway can front.
- **Apigee Registry API** — Stores and versions API specs that may be deployed via gateways.

## FAQ

### What authentication does the Google API Gateway API use?

OAuth 2.0 with Google Cloud credentials (service account or user). Through Jentic the credentials are vaulted and exchanged for short-lived scoped access tokens at call time.

### Can I deploy a new gateway version without downtime?

Yes. Upload a new ApiConfig under the same API resource, then patch the gateway to reference the new config. Traffic shifts at the platform level once the operation completes, so there is no DNS change required.

### What are the rate limits for the Google API Gateway API?

Control-plane operations (create, update, list) follow the standard Google Cloud per-project per-minute quotas. Data-plane traffic through the deployed gateway has its own quotas configured per ApiConfig and is independent of this control-plane API.

### How do I deploy a gateway through Jentic?

Search Jentic for 'create google API gateway', load the schema for the gateways.create operation under /v1/{+parent}/gateways, and execute it with parent project and location plus the apiConfig reference. Poll the returned operation until done.

### Is the Google API Gateway API free?

Control-plane calls are free. Data-plane traffic through deployed gateways is billed per million requests, separately from this management API.

### What is the relationship between API, ApiConfig, and Gateway?

An API is the logical grouping; an ApiConfig is a versioned OpenAPI spec plus policy; a Gateway is the deployed endpoint that points at one ApiConfig. Updating the gateway to a different config switches traffic without recreating resources.

### Can I limit what my agent is allowed to do with the Google API Gateway API?

Yes. Because this API carries the resource name in the URL path, such as /v1/{parent}/gateways and /v1/{name}, your self-hosted Jentic One instance lets you write rules that pin the agent to one project or location, so it can list and manage APIs, configs, and gateways there and nothing else. You decide which operations the agent may call, so destructive ones like deleting a gateway or config are excluded unless you explicitly add them. Your own rules, not the agent, decide which operations and which Google Cloud OAuth credential are in scope at call time.
