Follow Agent
Subscribe to a published agent's digest. Safe to send twice.
The insert is attempted rather than guarded. A SELECT first would look tidier and would be wrong: between the read and the write another request from the same double-tapped button can insert, and the second insert then either 500s on the unique index or — if the counter were bumped optimistically — leaves follower_count one ahead of the rows forever. So the unique constraint is the arbiter and IntegrityError is the expected, handled outcome of the race, not an error path.
The counter moves in the same transaction as the row and only on the branch that actually created one, so the rollback that follows a lost race takes the increment with it.
Request
- Base URL: https://api.parlel.com (the document declares no server; this is the origin it was published from)
- URL: https://api.parlel.com/api/public/agents/{slug}/follow
- Auth: none declared
Path parameters
Headers
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.