Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Kgateway TrafficPolicy API

Attach traffic management policies to routes in an HTTPRoute resource or all routes served by a Gateway. Supports CORS, external auth, external processing, rate limiting, timeouts, retries, transformations, and header modifiers.

Kgateway TrafficPolicy API is one of 7 APIs that Kgateway publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

This API exposes 7 JSON Schema definitions.

Tagged areas include TrafficPolicy. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, a JSON-LD context, and 7 JSON Schemas.

This API exposes 5 operations across 2 paths, and defines 4 schemas. It is described by OpenAPI 3.1.0, at version 2.1.0.

Requests are made against a single base URL, https://{kubernetes-api-server}/apis/gateway.kgateway.dev/v1alpha1.

5 operations 2 paths 4 schemas 1 DELETE2 GET1 POST1 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.0
API Version
2.1.0
Base URL
https://kubernetes.default.svc/apis/gateway.kgateway.dev/v1alpha1
Authentication
HTTP Bearer
Contact
License
Resource Areas
1

Authentication & Security 1

Kgateway TrafficPolicy API declares 1 security scheme for authenticating requests. It accepts HTTP bearer tokens (BearerAuth). By default, every request must be authenticated.

  • BearerAuth — Kubernetes API bearer token authentication. Use a service account token or kubeconfig token.

Paths & Operations 5

Across 2 paths, the API surfaces 5 operations — 1 DELETE, 2 GET, 1 POST, 1 PUT. Each is listed below with its method, path, parameters, and response codes.

TrafficPolicy 5

Attach traffic management policies to routes in an HTTPRoute resource or all routes served by a Gateway. Supports CORS, external auth, external processing, rate limiting, timeouts…

GET
/namespaces/{namespace}/trafficpolicies
Kgateway List TrafficPolicy resources
listTrafficPolicies 4 params → 200401
POST
/namespaces/{namespace}/trafficpolicies
Kgateway Create a TrafficPolicy
createTrafficPolicy 1 param body → 201401409
GET
/namespaces/{namespace}/trafficpolicies/{name}
Kgateway Get a TrafficPolicy
getTrafficPolicy 2 params → 200401404
PUT
/namespaces/{namespace}/trafficpolicies/{name}
Kgateway Replace a TrafficPolicy
replaceTrafficPolicy 2 params body → 200401404
DELETE
/namespaces/{namespace}/trafficpolicies/{name}
Kgateway Delete a TrafficPolicy
deleteTrafficPolicy 2 params → 200401404

Schemas 4

The contract defines 4 schemas that model the data the API accepts and returns. The most detailed are ObjectMeta (6 properties), PolicyTargetRef (5 properties), TrafficPolicy (5 properties), TrafficPolicyList (4 properties). Each schema is shown below with its type and property counts.

TrafficPolicyList
object
List of TrafficPolicy resources.
4 properties
ObjectMeta
object
Standard Kubernetes object metadata.
6 properties
TrafficPolicy
object
TrafficPolicy attaches traffic management policies to routes in an HTTPRoute or all routes served by a Gateway.
5 properties
PolicyTargetRef
object
Reference to a target resource for policy attachment.
5 properties 2 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

kgateway-trafficpolicy-api-openapi.yml Raw ↑

Other APIs Kgateway publishes across the network.

Kgateway AIBackend API
Kgateway Backend API
Kgateway DirectResponse API
Kgateway GatewayExtension API
Kgateway GatewayParameters API
Kgateway HTTPListenerPolicy API