Skip to content

Update examples for the v2 API - #3

Merged
charliemarlow merged 2 commits into
mainfrom
v2-api
Jul 16, 2026
Merged

Update examples for the v2 API#3
charliemarlow merged 2 commits into
mainfrom
v2-api

Conversation

@charliemarlow

Copy link
Copy Markdown
Collaborator

Moves everything off the v1 routes and onto the v2 API documented at docs.elicit.com.

Ported to v2

  • POST /searchPOST /search/papers, POST /reportsPOST /sessions/reports, and reportIdsessionId across the curl/Python/JS examples, the CLI, the Slack bot, and the Claude Code skill
  • Report polling handles the new pausedForInsufficientQuota status instead of looping until timeout
  • Corpus count corrected to 138M+, report URLs to elicit.com/review/...
  • CLI parses the v2 error envelope ({"error": {code, message}})

New coverage

Every v2 endpoint now has an example:

  • 4_search_trials, 5_systematic_review, and 6_list_sessions (which also demonstrates resume) in each language directory
  • CLI gains trials and resume commands; reports becomes sessions since the v2 listing includes systematic reviews
  • MCP README updated to the server's current eight tools, with parameter tables taken from the live tool schemas
  • Skill rewritten with the full v2 reference, including when to reach for a systematic review vs. a report

Verification

Field names and paths checked against the OpenAPI spec (docs.elicit.com/openapi.json, API v2.0.0) and the live MCP tool schemas. bash -n / py_compile / node --check pass on every script. Not exercised against the live API — no key in this environment — so a quick run of 1_search and 6_list_sessions with a real key is worth doing before merge.

🤖 Generated with Claude Code

charliemarlow and others added 2 commits July 14, 2026 17:31
- Point all scripts and docs at https://elicit.com/api/v2 (reportId -> sessionId, /search -> /search/papers, /reports -> /sessions/reports)
- Add trials search, systematic review, and list/resume examples in curl, Python, and JavaScript
- CLI: add trials and resume commands, rename reports to sessions
- Handle the new pausedForInsufficientQuota status in report polling
- Refresh the MCP server and Claude Code skill docs for the v2 tool set

Co-Authored-By: Claude Fable 5 <[email protected]>
The 6_list_sessions examples looped over every session and POSTed
/resume on anything paused, taking a quota-consuming action from a
"list" example. Reduce them to just listing sessions. Resuming stays
an explicit action in the CLI (`resume <id>`) and the skill/MCP docs.

Co-Authored-By: Claude Fable 5 <[email protected]>
@charliemarlow
charliemarlow merged commit 89e24c1 into main Jul 16, 2026
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