Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/api-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ login. Attempts are advisory only: they do not create payments, claim
acceptance, mutate ledger balances, or stop maintainers from accepting useful
work.

For authenticated examples, replace `<browser-session-cookie>` with the cookie
from a GitHub-authenticated browser session for the same account. Unauthenticated
attempt registration and release requests return `401`.

List active attempts for a bounty:

```bash
Expand Down Expand Up @@ -121,6 +125,7 @@ Register an attempt with a submitter identity, optional source URL, and TTL:

```bash
curl -s -X POST "$API_HOST/api/v1/bounties/<bounty_id>/attempts" \
-b "<browser-session-cookie>" \
-H "Content-Type: application/json" \
-d '{"submitter_account":"github:tatelyman","source_url":"https://github.com/ramimbo/mergework/tree/attempt-bounty-321","ttl_seconds":86400}'
```
Expand Down Expand Up @@ -154,6 +159,7 @@ Release an active attempt when you stop working:

```bash
curl -s -X POST "$API_HOST/api/v1/bounty-attempts/<attempt_id>/release" \
-b "<browser-session-cookie>" \
-H "Content-Type: application/json" \
-d '{"submitter_account":"github:tatelyman"}'
```
Expand Down
Loading