feat: add DELETE /world/:worldId admin endpoint to gateway#155
Closed
Jing-yilin wants to merge 1 commit into
Closed
feat: add DELETE /world/:worldId admin endpoint to gateway#155Jing-yilin wants to merge 1 commit into
Jing-yilin wants to merge 1 commit into
Conversation
Adds a DELETE /world/:worldId endpoint for deregistering worlds from the gateway registry. Supports optional GATEWAY_ADMIN_KEY bearer token auth when the env var is set, and returns the count of removed agents. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Contributor
Author
|
Superseded by #156 which includes the DELETE endpoint along with the full gateway API rename. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
DELETE /world/:worldIdendpoint to the AWN Gateway for deregistering worlds from the registry.Changes
gateway/server.mjs: NewDELETE /world/:worldIdroute that removes all agents with the matchingworld:capability. WhenGATEWAY_ADMIN_KEYenv var is set, requires aBearer <key>authorization header; returns 403 otherwise. Returns{ ok: true, removed: N }on success, 404 if the world is not found.test/gateway-world-record.test.mjs: 4 new tests covering 404 on unknown world, successful deletion (world disappears from GET after DELETE), 403 with missing token when admin key is set, and 200 with correct token.Test results