Skip to content

feat: add DELETE /world/:worldId admin endpoint to gateway#155

Closed
Jing-yilin wants to merge 1 commit into
mainfrom
feat/gateway-delete-world
Closed

feat: add DELETE /world/:worldId admin endpoint to gateway#155
Jing-yilin wants to merge 1 commit into
mainfrom
feat/gateway-delete-world

Conversation

@Jing-yilin
Copy link
Copy Markdown
Contributor

Summary

Adds a DELETE /world/:worldId endpoint to the AWN Gateway for deregistering worlds from the registry.

Changes

  • gateway/server.mjs: New DELETE /world/:worldId route that removes all agents with the matching world: capability. When GATEWAY_ADMIN_KEY env var is set, requires a Bearer <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

tests 211
pass  211
fail  0

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>
@Jing-yilin
Copy link
Copy Markdown
Contributor Author

Superseded by #156 which includes the DELETE endpoint along with the full gateway API rename.

@Jing-yilin Jing-yilin closed this Mar 24, 2026
@Jing-yilin Jing-yilin deleted the feat/gateway-delete-world branch March 24, 2026 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant