ProjectTech4DevAI / ProjectTech4DevAI/kaapi-backend
Idempotency key for expensive POST requests
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 18
- Forks
- 10
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 14
Description
Is your feature request related to a problem? Please describe.
Clients retrying POST actions is bad especially when it's expensive like in documents.
Describe the solution you'd like
To overcome processing expensive duplicate requests, we can introduce an idempotency_key in requests which clients can use to retry. This idempotency_key needs to be stored against the relevant entity, so when users/clients retries creating the same entity, entity creation can be skipped and the API can just return the already existing entity.
Additional context
See Stripe's API docs - https://docs.stripe.com/api/idempotent_requests
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by locating the POST handlers and persistence model for the relevant entity, then read Stripe's idempotent requests documentation. Done means duplicate retries with the same key skip entity creation and return the existing entity.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100