Update examples for the v2 API - #3
Merged
Merged
Conversation
- 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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves everything off the v1 routes and onto the v2 API documented at docs.elicit.com.
Ported to v2
POST /search→POST /search/papers,POST /reports→POST /sessions/reports, andreportId→sessionIdacross the curl/Python/JS examples, the CLI, the Slack bot, and the Claude Code skillpausedForInsufficientQuotastatus instead of looping until timeoutelicit.com/review/...{"error": {code, message}})New coverage
Every v2 endpoint now has an example:
4_search_trials,5_systematic_review, and6_list_sessions(which also demonstrates resume) in each language directorytrialsandresumecommands;reportsbecomessessionssince the v2 listing includes systematic reviewsVerification
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 --checkpass on every script. Not exercised against the live API — no key in this environment — so a quick run of1_searchand6_list_sessionswith a real key is worth doing before merge.🤖 Generated with Claude Code