diff options
Diffstat (limited to 'packages/open-api/karakeep-openapi-spec.json')
| -rw-r--r-- | packages/open-api/karakeep-openapi-spec.json | 152 |
1 files changed, 152 insertions, 0 deletions
diff --git a/packages/open-api/karakeep-openapi-spec.json b/packages/open-api/karakeep-openapi-spec.json index ac74abbf..69bf27f7 100644 --- a/packages/open-api/karakeep-openapi-spec.json +++ b/packages/open-api/karakeep-openapi-spec.json @@ -3281,6 +3281,158 @@ } } } + }, + "/admin/users/{userId}": { + "put": { + "description": "Update a user's role, bookmark quota, or storage quota. Admin access required.", + "summary": "Update user", + "tags": [ + "Admin" + ], + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "schema": { + "type": "string", + "description": "The ID of the user to update", + "example": "user_123" + }, + "required": true, + "name": "userId", + "in": "path" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "role": { + "type": "string", + "enum": [ + "user", + "admin" + ] + }, + "bookmarkQuota": { + "type": "integer", + "nullable": true, + "minimum": 0 + }, + "storageQuota": { + "type": "integer", + "nullable": true, + "minimum": 0 + } + }, + "description": "User update data", + "example": { + "role": "admin", + "bookmarkQuota": 1000, + "storageQuota": 5000000000 + } + } + } + } + }, + "responses": { + "200": { + "description": "User updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + } + }, + "required": [ + "success" + ] + } + } + } + }, + "400": { + "description": "Bad request - Invalid input data or cannot update own user", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string" + } + }, + "required": [ + "error" + ] + } + } + } + }, + "401": { + "description": "Unauthorized - Authentication required", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string" + } + }, + "required": [ + "error" + ] + } + } + } + }, + "403": { + "description": "Forbidden - Admin access required", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string" + } + }, + "required": [ + "error" + ] + } + } + } + }, + "404": { + "description": "User not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string" + } + }, + "required": [ + "error" + ] + } + } + } + } + } + } } } }
\ No newline at end of file |
