chore: v2.8.11 — switch a pool account's users from its Edit

This commit is contained in:
2026-10-19 11:03:54 +07:00
parent c042adc51b
commit 0c8782ea75
5 changed files with 151 additions and 6 deletions
+146 -1
View File
@@ -3,7 +3,7 @@
openapi: 3.0.3
info:
title: Agent Dashboard for Claude Code API
version: 2.8.10
version: 2.8.11
description: HTTP API for real-time Claude Code session monitoring, agent lifecycle tracking, analytics, pricing, hooks ingestion, and workflow intelligence.
contact:
name: Nguyễn Ngọc Trí Vĩ
@@ -4785,6 +4785,22 @@ components:
description: Events attributed to this run's inner agents, ordered by created_at then id. Capped at 5000 rows.
items:
$ref: '#/components/schemas/DashboardEvent'
AccountPin:
type: object
required:
- userId
- username
- account
properties:
userId:
type: integer
username:
type: string
account:
type: string
description: The pool account's name
pinnedAt:
type: string
UserPrefs:
type: object
required:
@@ -15141,6 +15157,18 @@ paths:
nullable: true
full:
type: boolean
pins:
type: object
description: Per tool, the users an admin pinned to one account (empty in local mode)
properties:
claude:
type: array
items:
$ref: '#/components/schemas/AccountPin'
codex:
type: array
items:
$ref: '#/components/schemas/AccountPin'
codex:
type: array
description: The Codex account pool (server/lib/codex-pool.js), same fields plus `kind`; no expiry
@@ -15241,6 +15269,62 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/accounts/pins:
put:
tags:
- Auth
operationId: pinPoolAccount
summary: 'Admin: switch one user''s sessions of a tool to one pool account (`account: null` = automatic), with their own password again. A Claude login is written into their home at once; running panes take it without a restart'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- tool
- userId
- currentPassword
properties:
tool:
type: string
enum:
- claude
- codex
userId:
type: integer
account:
type: string
nullable: true
currentPassword:
type: string
responses:
'200':
description: '`{pin: {userId, username, account}, switched}` — `account` null when unpinned; `switched`: switched | kept | own-login | expired | next-session | null'
'400':
description: EBADTOOL
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: EREAUTH — wrong password; EADMIN — not an admin; ELOCALMODE
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: ENOUSER, ENOACCOUNT
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: ETOOMANY — too many wrong passwords
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/accounts/profiles:
get:
tags:
@@ -15250,6 +15334,67 @@ paths:
responses:
'200':
description: '`{profiles: [{name, label, email, subscriptionType, active}]}`'
/api/accounts/{name}/users:
put:
tags:
- Auth
operationId: setPoolAccountUsers
summary: 'Admin: exactly these users run on this pool account (a user on another account moves here; one left out goes back to the balancer), with their own password again. A Claude login is written into each added user''s home at once'
parameters:
- name: name
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- tool
- userIds
- currentPassword
properties:
tool:
type: string
enum:
- claude
- codex
userIds:
type: array
items:
type: integer
currentPassword:
type: string
responses:
'200':
description: '`{added: [{userId, username, switched}], removed: [{userId, username}]}` — `switched`: switched | kept | own-login | expired | next-session'
'400':
description: EBADTOOL, EBADUSER
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: EREAUTH — wrong password; EADMIN — not an admin; ELOCALMODE
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: ENOUSER, ENOACCOUNT
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: ETOOMANY — too many wrong passwords
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/api/accounts/{name}:
delete:
tags: