Skip to content

docs: correct the API guide so its steps run end to end [PYSDK-158] - #741

Merged
omid-aignostics merged 2 commits into
mainfrom
docs/fix-api-guide
Oct 21, 2026
Merged

omid-aignostics merged 2 commits into
mainfrom
docs/fix-api-guide

Conversation

@omid-aignostics

@omid-aignostics omid-aignostics commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Change request: PYSDK-158

Corrects the "Get started with the API" guide (docs/partials/get_started_api.md). A full run of the guide on production on 2026-10-20 found three errors that stop anyone who follows it word for word, plus missing information about per-slide metadata. Documentation only — no code, requirements, specifications, or tests change.

Blocking errors fixed

Step Problem Fix
3 AWS CLI 2.23+ fails every upload over 8 MB with SignatureDoesNotMatch against GCS export AWS_REQUEST_CHECKSUM_CALCULATION / AWS_RESPONSE_CHECKSUM_VALIDATION=when_required
4 input name input_slide and metadata key media-type → HTTP 422 whole_slide_image; only the three required fields in the example
6 /file answers with a redirect; curl without -L downloads nothing curl -L, plus a loop that downloads all results

Other changes

  • Step 1: client ID is one per organization and comes with the invitation; hello-world fails with the real error, saves the refresh token, documents chmod +x; expired-token 401 / jq parse error explained.
  • Step 2: Atlas H&E-TME 2.0.1; table of the three required metadata fields.
  • Step 3: own storage or the provided bucket; credentials loaded from GET /v1/me; checksum read from x-goog-hash after upload, with a local fallback.
  • Step 4: request built with jq; one run can hold all slides.
  • Step 6: /file as primary route instead of the deprecated download_url; results saved into step folders (artifact names contain : and have no extension).

Verification

  • Every command ran on production on 2026-10-20: run 783e3428-5efb-41d8-b08f-6529e0aa3ab2 on test-app 1.3.0, 1/1 item succeeded, 12 artifacts downloaded. Login through a new per-org device client verified on 2026-10-21.
  • All 16 shell snippets pass bash -n; checksum, request-body, and download-loop parsing tested against sample data.
  • make -C docs html passes; no new warnings.

🤖 Generated with Claude Code

omid-aignostics and others added 2 commits October 21, 2026 09:07
Found by running the guide on production against test-app:
- step 4 used input name "input_slide" and metadata key "media-type";
  the API expects "whole_slide_image" and "media_type" (422 otherwise)
- step 3 upload failed with SignatureDoesNotMatch on AWS CLI 2.23+;
  set the checksum env vars GCS needs
- step 6 /file is a redirect: follow it with -L, create step folders,
  and lead with /file instead of the deprecated download_url
- bump Atlas H&E-TME to 2.0.1 and list its three required fields
- show where the checksum comes from (x-goog-hash after upload)
- load bucket credentials from /me; say own storage works too
- hello-world: fail with the real error, save the refresh token,
  document chmod +x; explain expired-token 401 and jq parse errors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…zation

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omid-aignostics
omid-aignostics requested a review from a team as a code owner October 21, 2026 09:33
@omid-aignostics omid-aignostics added documentation Improvements or additions to documentation skip:test:long_running Skip long-running tests (≥5min) labels Oct 21, 2026
@ox-security

ox-security Bot commented Oct 21, 2026

Copy link
Copy Markdown

OX Security Logo

OX Security reviewed this pull request — nothing to fix.

✔ No issues found

Branch docs/fix-api-guide → main

View scan in OX Security →

@codecov

codecov Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

❌ Your project check has failed because the head coverage (65.10%) is below the target coverage (70.00%). You can increase the head coverage or adjust the target coverage.

❗ There is a different number of reports uploaded between BASE (6d8d651) and HEAD (0ec2e8c). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (6d8d651) HEAD (0ec2e8c)
3 2

see 24 files with indirect coverage changes

@sonarqubecloud

Copy link
Copy Markdown

@omid-aignostics
omid-aignostics merged commit dd46ee9 into main Oct 21, 2026
46 of 48 checks passed
@omid-aignostics
omid-aignostics deleted the docs/fix-api-guide branch October 21, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation skip:test:long_running Skip long-running tests (≥5min)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants