Expand description
Admin API endpoints for consumer CRUD. Mutations rewrite the in-memory
gateway config and trigger SharedState::reload, which rebuilds and
atomically swaps the consumer store (no graph recompile is strictly
needed, but reload keeps the semantics uniform with routes/policies).
FunctionsΒ§
- create_
consumer π POST /api/consumersβ creates a new consumer from the JSON body, then rebuilds the consumer store. Returns201 Createdon success.- delete_
consumer π DELETE /api/consumers/{name}β removes the named consumer and rebuilds the store. Returns{"status": "deleted"}.- get_
consumer π GET /api/consumers/{name}β returns the named consumer as JSON.- list_
consumers π GET /api/consumersβ returns all declared consumers as a JSON array.- router
- Builds the router for the
/api/consumersendpoints. - upsert_
consumer π PUT /api/consumers/{name}β creates or replaces the named consumer (the path name overrides any name in the body), matching the policies endpointβs upsert semantics. Returns{"status": "updated"}.