Skip to content

Get a claim

One claim's body, files and diff, cut to a size limit

GET /api/v1/guides/{guide}/claims/{claim}

Personal token · read

Example request

Link to this section
Shell
# Set your token and resource IDs first.
API_BASE_URL="https://app.theseus.dev/api/v1"

curl --fail-with-body --request GET \
  -H "Authorization: Bearer ${THESEUS_API_TOKEN:?}" \
  "${API_BASE_URL}/guides/${GUIDE_ID:?}/claims/${CLAIM_ID:?}"
NameInTypeDescription
guide requiredpathstringA guide ID (ver_…)

Pattern ^ver_[0-9A-Z]{26}$

claim requiredpathstringA chg_ ID

Pattern ^chg_[0-9A-Za-z_]{1,128}$

The claim

Response fields

Content type application/json

  • id string required

    Example chg_01K6Z3M4N5P6Q7R8S9T0V1W2X3

  • guide_id string required

    The guide this claim belongs to

  • position integer required

    Its place in priority order, from 0

  • title string required

  • summary string required

  • body string required

    Markdown

  • files array of object required

    files fields
    • path string required

    • previous_path string or null required

    • status string required

      One of added, deleted, modified, renamed

  • diff array of object required

    The claim's hunks, most important first. Hunks past the size limit are left out, and truncated says so

    diff fields
    • path string required

    • type string required

      One of behavior, cleanup, refactor, move, config, schema, dependency, test, docs, comment, formatting, generated, binary

    • level string required

      How much the hunk matters to this claim

      One of decides, enables, evidence, incidental

    • patch string or null required

      The hunk as a git patch; null when it is too large to serve

  • truncated boolean required

    Whether the body or diff was cut to fit; url shows all of it

  • url string (uri) required

    The claim in the web app

Example responses

Link to this section

Claim detail

Illustrative response · selected fields

{
  "id": "chg_EXAMPLE",
  "guide_id": "ver_EXAMPLE",
  "position": 0,
  "title": "Notifications survive a reconnect",
  "summary": "Reconnecting keeps the existing notification preference.",
  "body": "The saved notification preference is reused when the connection returns.",
  "files": [
    {
      "path": "src/notifications.ts",
      "previous_path": null,
      "status": "modified"
    }
  ],
  "truncated": false,
  "url": "https://example-team.theseus.dev/example/project/pr/42?claim=chg_EXAMPLE"
}
400 · The request is not valid

Error response fields

401 · A valid bearer token is required

Error response fields

403 · The credential's scopes do not allow this

Error response fields

404 · Not found

Error response fields

426 · Upgrade the CLI: run theseus update

Error response fields

429 · Too many requests

Headers

  • Retry-After integer

    Seconds to wait before the next request, when known

Error response fields

503 · Theseus is unavailable; retry the same request

Headers

  • Retry-After integer

    Seconds to wait before the next request, when known

Error response fields

Error response fields

Content type application/problem+json

  • type string (uri) required

    Identifies the problem type; branch on code instead

  • title string required

  • status integer required

  • detail string

  • code string required

    Why the request failed. New codes may be added: treat an unknown one by its status

    One of invalid_request, unauthenticated, not_in_plan, insufficient_scope, admission_required, not_found, ambiguous, conflict, rate_limited, internal_error, unavailable, search_authorization_pending, search_unavailable, cli_upgrade_required

  • request_id string required

    Quote this when reporting the problem

  • errors array of FieldError

    With invalid_request: what is wrong with each field

    errors fields
    • path string required

      Where in the request, as dotted segments

    • message string required

  • required_scope string

    With insufficient_scope: the scope the operation needs

  • next string

    Recovery action, such as theseus update

  • candidates array of Candidate

    With ambiguous: what the request could mean; ask which

    candidates fields
    • id string required

    • path string required

    • kind string required

    • title string required

    • url string (uri) required