Skip to content

Document joining an all-access project (POST /buckets/:id/admissions.json) - #437

Merged
jorgemanrubia merged 5 commits into
basecamp:masterfrom
jeissonneira:document-join-a-project
Sep 17, 2026
Merged

jorgemanrubia merged 5 commits into
basecamp:masterfrom
jeissonneira:document-join-a-project

Conversation

@jeissonneira

@jeissonneira jeissonneira commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a Join a project section to sections/people.md documenting POST /buckets/:id/admissions.json — the current person joins a project whose admissions policy allows it (all-access: team or employee)
  • Covers the 201 Created empty-body success, the 404 Not Found for people the project's policy doesn't admit (such as clients, or non-owners on invite-only projects), the 403 Forbidden / "You must first seek admission" response from reading inside a project the person could join but hasn't, and why GET /projects.json can't surface a joinable project (it lists only projects you've already joined, so the ID has to come from the project's web URL or someone who can see it)
  • Distinguishes it from Update who can access a project, which grants or revokes other people
  • Adds the endpoint to the section's anchor list. Docs only — no API behavior changed

Notes for maintainers

I ran into this building an agent against the API. The projects it needed were all-access, so it should have been able to reach them — but GET /projects.json returns only projects you've already joined, so those projects were simply invisible to it, and nothing in the docs says how to join one. The fix was manual every time: either I joined the project on the agent's behalf, or someone drove the web UI to do it.

POST /buckets/:id/admissions.json does exactly this, and it's been working well for us — the agent now admits itself to an all-access project instead of waiting on a person. Right now the docs cover admissions only as a policy you set on a project (Update a project), never as something a person can act on, so this fills in the other half.

The wording is a proposal — reshape it however fits. One process note: I don't have bc3 access, so this is a hand-edit against the mirror rather than script/api/sync_to_bc3_api output. Happy for it to be treated as a content proposal for doc/api/ and overwritten by the next sync.

Maintainer update

🤖 Rebased onto master at Jorge's request, after the full sync in #446. jeissonneira's commit and authorship are kept. Correction commits follow it, checked against bc3's Buckets::AdmissionsController, Project::Admissible and BucketableAdmissions:

  • Status codes: 404 for people the policy doesn't admit, 302 for an admitted person who already has access, and the 403 prompt comes from reading inside an unjoined project.
  • Joining through writes: how admission_url behaves, and that most writes join implicitly.
  • Policies: who each policy admits, plus the same correction to the admissions values in sections/projects.md.

The docs also say invite projects admit account owners. And the endpoint works with a user's OAuth token, while agent-principal tokens get 403 Forbidden from it.

The identical text is also in bc3's doc/api in basecamp/bc3#13389, so the next sync keeps it.

Copilot AI balanced review requested due to automatic review settings August 20, 2026 20:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Documents how users can join eligible all-access projects through the admissions endpoint.

Changes:

  • Adds the endpoint to the people API index.
  • Documents success, authorization failures, discovery limitations, and cURL usage.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread sections/people.md
@jeissonneira

Copy link
Copy Markdown
Contributor Author

@jeremy — mind taking a look when you get a chance? Similar situation to the doors one you merged in #409: an endpoint I ended up relying on for an integration that isn't documented yet.

Happy to reword any of it, or to have it land in bc3's doc/api/ first if you'd rather it come through the sync.

jeissonneira and others added 2 commits September 17, 2026 07:02
A person who isn't admissible gets 404, not 403. Someone who already has
access is redirected to the project. The 403 "seek admission" response comes
from reading inside an unjoined all-access project, and carries the URL to
join. Also lists which admissions policy admits whom, and fixes the link to
Get all projects.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The JSON example needs the required response heading and matching route markers before approval.

Get a fresh assessment by requesting another Copilot review.

Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread sections/people.md
The policy is checked before access, so someone already on a project the policy
doesn't admit them to gets 404, not a redirect. admission_url has no .json, so
POST it as JSON to get 201. Writes inside a joinable all-access project join
implicitly. Owners, not the owner. Agent tokens get 403. projects.md's
admissions values now say who can join, and employee is the narrower one.
…t fail later

Bookmark writes don't go through the implicit join, so it's most writes, and a
write that joins and is then refused keeps the join. The 403 example now names
its route and carries the response heading and markers.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The discovery workflow is incomplete, and the PR description contradicts the documented eligibility and status behavior.

Get a fresh assessment by requesting another Copilot review.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Comment thread sections/people.md
Comment thread sections/people.md Outdated
GET /projects.json can't list it, so point at the project's web URL or at
someone who can see the project.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approved

The documentation is consistent, complete, and mirrored in the authoritative bc3 source.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@jorgemanrubia
jorgemanrubia merged commit 6902d72 into basecamp:master Sep 17, 2026
@jorgemanrubia

Copy link
Copy Markdown
Member

🤖 Rebased at Jorge's request onto the #446 sync, corrected to match bc3's admissions controller, and merged. Thanks, @jeissonneira. The same text is in bc3's source in basecamp/bc3#13389.

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.

3 participants