Build a console
A console is a client of the gateway’s routes, like a CLI or a script. It holds the user’s IdP token and calls routes by slug. The paths below follow identity’s reference routes.
Signing in and the user
Section titled “Signing in and the user”Send the IdP’s access token as Authorization: Bearer. There are no Plat5 sessions: the same token reaches every tree the user is in (access).
GET /userreturns the user (nameisnulluntil known).PATCH /user { name }sets or clears their name (a user’s name).GET /user/nodes?kind=organizationlists every org they can see, for an org switcher. Each node carries itsancestors, so the console builds its own URLs from the chain.
Navigating the tree
Section titled “Navigating the tree”Paths carry slugs: /orgs/acme/projects/web/…. Lists return only what the caller can see, so a project-only member sees their projects rather than a 403 (lists). A filtered page can return fewer than limit items with has_more: true; keep walking until has_more is false (reference/lists.md).
What to show
Section titled “What to show”Each page or action maps to the request it needs. Ask the gateway once per page or navigation in a single batch at POST /access/routes:
POST /access/routes{ "checks": [ { "method": "GET", "path": "/orgs/acme/bindings" }, { "method": "POST", "path": "/orgs/acme/projects" }, { "method": "DELETE", "path": "/orgs/acme/projects/web" }] }→ { "checks": [ { "allowed": false }, { "allowed": true }, { "allowed": false } ] }Ask by route rather than permission name so permission renames in config don’t break the UI (up to 100 checks per call, reference/gateway.md).
GET …/membership on a node (available whenever roles is configured — built-in RBAC or authorizer + roles) returns the caller’s member id, status, active bindings, and (in built-in RBAC) permissions ([] when authorizer is set) — use it to show the caller’s roles and mark “you” in member lists. When authorizer is used without roles, this route returns 404.
Both answers are advisory: the gateway still enforces every request when it is made.
Errors
Section titled “Errors”Display error.message (reference/errors.md). Through the gateway, a missing node and a denied one return the same 403; on permission-gated routes, details.permissions lists which permissions would have admitted the call.
Nodes with service fields
Section titled “Nodes with service fields”When a creation form includes product-specific fields owned by one of your services, submit in two steps: create the node through identity (POST /orgs/acme/projects { display_name }), then PUT the service’s fields to your service’s route for the new node. If the second call fails, keep the form open and retry only the idempotent PUT.
Who has access
Section titled “Who has access”Default identity permissions: Built-in access-management reads (
GET …/members,GET …/bindings,GET …/groups,GET …/service-accounts,GET …/security-policy) require<kind>:bindings:read(and writes require<kind>:bindings:write). The default startingplat5.ymlgrants thememberrole only<kind>:read, so amembercallingGET /<roots>/{root}/membersreceives 403 unless you grant<kind>:bindings:readto that role inplat5.ymlor adjust the route inservices/identity.yml. Inspect every expanded route and required permission inservices/identity.ymlor withplat5 routes list.
GET /orgs/{organization}/memberslists the org’s non-removed members (active and suspended), withtype: "user" | "service_account"(filterable via?type=). UsePATCH /orgs/{organization}/members/{member_id}/statusto reversibly suspend or reactivate a member without rotating theirmember_id, andDELETE /orgs/{organization}/members/{member_id}to remove a member (works on both users and service accounts).GET/PATCH /orgs/{organization}/security-policyconfigures org-wideallow_personal_keys,allow_member_keys,allowed_cidrs, andrequired_idp_claims.GET/POST/PATCH/DELETE /user/keysmanages personal user keys ("{brand}-uk-1-…"with optionalallowed_roots),GET/POST/PATCH/DELETE /orgs/{organization}/membership/keysmanages the caller’s own org-scoped member keys ("{brand}-mk-1-…"),GET/DELETE /orgs/{organization}/members/{member_id}/keyslets org admins inspect and revoke any member’s keys, and…/service-accounts/{id}/keysmanages service account keys ("{brand}-mk-1-…"). All keys support optionalallowed_cidrs,scopes, andexpires_at/expires_in. OnPOST(201), the one-time secret is returned in"key"; subsequentGETresponses omit"key"and return"key_prefix"instead.- When
rolesis configured (rolesonly orauthorizer+roles) — whenauthorizeris used withoutroles, these routes return 404:GET …/bindingslists every active binding that counts at the node (member and group) by ID (member_id/group_id,role,inherited,expires_at). A member or group can hold multiple distinct roles on the same node. Removing bindings does not remove the member; they stay active with zero permissions/roles until explicitly removed.GET /orgs/{organization}/groupsand…/groups/{group_id}/membersmanage in-tree groups; bind a group on any node just like a member.GET …/roleslists roles bindable at that node, for role pickers (GET /orgs/{organization}/roles?all=truereturns every role in the org). Inroles-only mode withcustom_rolesenabled,GET /orgs/{organization}/permissionspopulates a custom-role editor andPOST/PATCH/DELETE /orgs/{organization}/rolesmanage custom roles (these custom-role and permission-catalog routes return 404 wheneverauthorizeris configured).
- Adding a member by IdP subject (
POST /orgs/{organization}/members) is not exposed in the default routes; offer it only whenPOST /access/routesanswerstruefor it.
Inviting
Section titled “Inviting”- Invites live at the root:
POST /orgs/{organization}/invites. Wheneverrolesis configured (rolesonly orauthorizer+roles), passrole(bound at the org),grants(roles bound on specific child nodes, for project-only access), or both. Whenauthorizeris used withoutroles, omit bothroleandgrants. OnPOST(201), the one-time invite secret is returned in"token"("{brand}-i-1-…"), while subsequentGETresponses return"token_prefix". - The invitee redeems with
POST /user/invites/redeemsending{ "token": "…" }; the response returns{ member_id, node }(the root node). Plat5 sends no email.
Deleting, restoring, and leaving
Section titled “Deleting, restoring, and leaving”- Node deletes are soft until
purge_after. List deleted nodes with?status=deleted, and restore withPOST …/restore(lifecycle). Find deleted orgs withGET /user/nodes?kind=organization&status=deleted. DELETE /orgs/{organization}/membershipleaves an org.DELETE /userdeletes the account.