Imported from fyziktom/CanDoItAll.SharedInfo (
codex/skills/candoitall-api-access/SKILL.md). Install upstream withnpx skills add fyziktom/CanDoItAll.SharedInfo --skill candoitall-api-access. Copyright stays with the author.
CanDoItAll API Access
Use the supported access API for account and credential operations. The configured administrator manages access; business operations use separately granted capabilities.
Contract and exposure
- Inspect anonymous
GET /api/access/statusand the target host's OpenAPI document. - Use the shared snapshot when its provenance manifest matches the target.
- Read authentication, configuration and capability rules before choosing a credential or interpreting a 401, 403 or 404.
Api:UserAuthentication:Enabledmaps login/me/logout;Api:AccessManagement:Enabledseparately maps administrator operations. A disabled surface returns 404.- Swagger and its documents are anonymous when enabled. Use HTTPS and Authorize with a raw JWT to call protected operations. Swagger's Logout clears its authorization; the API logout operation revokes the current session.
Session workflow
- Use the intended host and the caller's supplied or privately configured credentials.
Send
userNameandpasswordtoPOST /api/access/login; never print credentials. - Send the returned token as
Authorization: Bearer <token>. UseGET /api/access/mefor the current user/administrator session, not for machine-token validation. - Handle expiry and revocation by authenticating again; there is no refresh-token flow.
POST /api/access/logoutrevokes only that session.
Account administration
Use a registered configured-administrator session on a management-enabled host.
A token claiming api, api.tokens.issue, a role or an administrator-looking subject
cannot substitute. Ordinary users cannot be promoted through account properties.
- Read
/api/access/scopesand select only the requested, user-selectable capabilities. Read/write/execute grants are independent; an empty business selection is self-session only. - Search
/api/access/usersbefore creating an account when avoiding duplicates matters. Paging usesoffsetandpageSize(default 25, maximum 100). - Create with explicit
userName,displayName,password,enabledandscopes. The returned account GUID is the identity; the configured administrator name is reserved. - Read the account and carry its current version as
expectedVersionin a replacement or password reset, or in the delete query. On 409, reread and reconcile. - Read back the result. Profile, grant, password and enabled-state changes invalidate existing sessions. Re-enabling never restores them; a recreated username gets a new GUID.
Perform only the requested account/grant changes. Do not edit private account or registry files to work around a denied operation. Workspace settings are a separate business API: see workspace settings.
Machine tokens and session registrations
Issue a machine credential at POST /api/access/tokens using administrator authority.
Select machine-assignable catalog capabilities and an allowed lifetime. Return/store the
one-time plaintext only through the caller's intended private credential channel.
GET /api/access/tokens lists metadata, defaulting to machine credentials; use
kind=UserSession or kind=AdministratorSession for session metadata. Revoke with
POST /api/access/tokens/{id}/revoke or delete the exact registration at
DELETE /api/access/tokens/{id}. Account edits do not revoke unrelated machine tokens.
Source route appendix
| Method | Route |
|---|---|
GET |
/api/access/status |
POST |
/api/access/login |
GET |
/api/access/me |
POST |
/api/access/logout |
GET |
/api/access/scopes |
GET |
/api/access/users |
POST |
/api/access/users |
GET |
/api/access/users/{id} |
PUT |
/api/access/users/{id} |
DELETE |
/api/access/users/{id} |
POST |
/api/access/users/{id}/reset-password |
GET |
/api/access/tokens |
POST |
/api/access/tokens |
POST |
/api/access/tokens/{id}/revoke |
DELETE |
/api/access/tokens/{id} |