Skip to content

docs: add endpoint delete and clarify CORS in API contract - #10

Merged
devinder-dev merged 2 commits into
mainfrom
docs/api-endpoint-delete
Oct 29, 2026
Merged

devinder-dev merged 2 commits into
mainfrom
docs/api-endpoint-delete

Conversation

@devinder-dev

Copy link
Copy Markdown
Owner

Follow-up to #8, answering the three review questions there.

Changes to docs/api.md

  • DELETE /v1/endpoints/:id is now part of v1. It's a soft delete: the endpoint disappears from the list and frees its slot, but its old deliveries still show its name and URL. Deliveries still pending for it become dead with last_error: "endpoint_deleted". Without it, test typos would use up the 20 slots for good.
  • EndpointStatus is active | failing. disabled could never occur in v1. Deleted endpoints simply aren't listed.
  • New error codes:
    • 409 endpoint_limit_reached when creating a 21st endpoint;
    • 409 endpoint_deleted when replaying a delivery whose endpoint was deleted.
  • Replay: the dashboard can't know in advance that a delivery is being sent right now, so the button tries, and a 409 in_flight is shown as "being sent right now, try again in a moment".
  • CORS and local development: browsers may call the API only from https://cdn.myrelay.tech and http://localhost:4173 (Playwright's preview server in CI). For local development, the Vite dev server proxies /v1 to the API, so CORS never applies. The config snippet is in the doc.

docs/CONTEXT.md lists the new route.

The types block in docs/api.md compiles with strict TypeScript.

Adds DELETE /v1/endpoints/:id (soft delete) to v1, drops the unreachable disabled endpoint status, adds the endpoint_limit_reached and endpoint_deleted errors, and documents the Vite dev proxy for local development.

@AbdikhaniAbdirashid AbdikhaniAbdirashid left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks - this answers all three. Happy with dropping disabled and adding DELETE, and the Vite proxy is good news: I was expecting to have to run the API locally.

I'll update #7 to the new types once this lands, then rebase #9 onto main.

@AbdikhaniAbdirashid AbdikhaniAbdirashid left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approving after the new commit - the 503 note is exactly the clarification I was after, and it belongs in the contract rather than only in the code.

Nothing else changed since my first read, so the three answers still stand.

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.

2 participants