Skip to content

docs: add API authentication guidance to bugfix tutorial#89

Merged
jwm4 merged 1 commit intoambient-code:mainfrom
jwm4:docs/tutorial-api-auth
Mar 26, 2026
Merged

docs: add API authentication guidance to bugfix tutorial#89
jwm4 merged 1 commit intoambient-code:mainfrom
jwm4:docs/tutorial-api-auth

Conversation

@jwm4
Copy link
Copy Markdown
Contributor

@jwm4 jwm4 commented Mar 26, 2026

Summary

  • Add a Prerequisites section to the tutorial's automation guide with
    concrete instructions for obtaining ACP_API_URL, ACP_PROJECT, and
    ACP_TOKEN
  • Include the UAT environment backend route URL so users can copy it directly
  • Explain why the browser UI URL does not work for API calls (OAuth proxy
    strips bearer tokens) and that the backend route must be used instead
  • Add a note to the GitHub Action section about storing the backend route URL
    and token as repository secrets

Context

Discovered while testing the tutorial's curl example end-to-end. The request
schema was correct, but users had no way to know which URL to use or how to
get a token. The browser UI URL returns 401 User token required because the
OAuth proxy authenticates the token but strips it before forwarding to the
backend. The backend route (backend-route-ambient-code.*) bypasses the proxy
and works with bearer tokens directly.

See RHOAIENG-55622 for
the related work to add workflow support to the public API.

Test plan

  • Verify the UAT backend route URL in the tutorial is reachable
  • Confirm the curl example works with a valid token and the documented URL
  • Review the prerequisite instructions for clarity

Made with Cursor

The tutorial's automation section documented the curl request schema
correctly but gave no guidance on obtaining the API URL or token, or
which endpoint to use. Users hitting the browser UI URL would get
401 errors because the OAuth proxy strips bearer tokens.

Add a prerequisites section with concrete instructions for ACP_API_URL
(including the UAT environment URL), ACP_PROJECT, and ACP_TOKEN. Clarify
that the backend route must be used instead of the browser UI URL, and
add a note to the GitHub Action section about storing secrets.

Ref: RHOAIENG-55622
Made-with: Cursor
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 26, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2d7e7b0f-c6ef-429c-bc79-45d5b1ed2351

📥 Commits

Reviewing files that changed from the base of the PR and between 2b9d35b and ac57e28.

📒 Files selected for processing (1)
  • docs/bugfix-tutorial.md

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting


Walkthrough

Updated the automation section of the tutorial documentation to provide REST API configuration details, replacing the generic "How it works" heading with "Using the REST API." Added documentation for required environment variables (ACP_API_URL, ACP_PROJECT, ACP_TOKEN) and clarified that ACP_API_URL must point to the backend route to avoid authentication errors.

Changes

Cohort / File(s) Summary
Documentation Update
docs/bugfix-tutorial.md
Replaced "How it works" heading with "Using the REST API" section. Added subsections documenting required configuration values (ACP_API_URL, ACP_PROJECT, ACP_TOKEN). Clarified that ACP_API_URL must reference the backend route to prevent 401 User token required errors. Added "Creating a session" subsection label and GitHub Actions repository secrets storage instructions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jwm4 jwm4 marked this pull request as ready for review March 26, 2026 19:58
@jwm4 jwm4 merged commit 1bd9d6e into ambient-code:main Mar 26, 2026
1 check was pending
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