@@ -34268,6 +34268,358 @@
3426834268 }
3426934269 }
3427034270 },
34271+ "/api/admin/mcp/servers/{serverId}/teams": {
34272+ "get": {
34273+ "summary": "Get teams using MCP server (Global Admin)",
34274+ "tags": [
34275+ "Admin - MCP Servers"
34276+ ],
34277+ "description": "Allows global administrators to view all teams that have installed a specific MCP server with pagination and status summary.",
34278+ "parameters": [
34279+ {
34280+ "schema": {
34281+ "type": "string",
34282+ "pattern": "^\\d+$"
34283+ },
34284+ "in": "query",
34285+ "name": "limit",
34286+ "required": false,
34287+ "description": "Maximum number of items to return (1-100, default: 20)"
34288+ },
34289+ {
34290+ "schema": {
34291+ "type": "string",
34292+ "pattern": "^\\d+$"
34293+ },
34294+ "in": "query",
34295+ "name": "offset",
34296+ "required": false,
34297+ "description": "Number of items to skip (≥0, default: 0)"
34298+ },
34299+ {
34300+ "schema": {
34301+ "type": "string"
34302+ },
34303+ "in": "path",
34304+ "name": "serverId",
34305+ "required": true,
34306+ "description": "MCP Server ID"
34307+ }
34308+ ],
34309+ "security": [
34310+ {
34311+ "cookieAuth": []
34312+ }
34313+ ],
34314+ "responses": {
34315+ "200": {
34316+ "description": "Paginated list of teams using this MCP server",
34317+ "content": {
34318+ "application/json": {
34319+ "schema": {
34320+ "type": "object",
34321+ "properties": {
34322+ "success": {
34323+ "type": "boolean",
34324+ "description": "Indicates operation success"
34325+ },
34326+ "data": {
34327+ "type": "object",
34328+ "properties": {
34329+ "server_info": {
34330+ "type": "object",
34331+ "properties": {
34332+ "server_id": {
34333+ "type": "string",
34334+ "description": "MCP server unique identifier"
34335+ },
34336+ "server_name": {
34337+ "type": "string",
34338+ "description": "MCP server name"
34339+ },
34340+ "server_slug": {
34341+ "type": "string",
34342+ "description": "MCP server slug"
34343+ }
34344+ },
34345+ "required": [
34346+ "server_id",
34347+ "server_name",
34348+ "server_slug"
34349+ ]
34350+ },
34351+ "teams": {
34352+ "type": "array",
34353+ "items": {
34354+ "type": "object",
34355+ "properties": {
34356+ "team_id": {
34357+ "type": "string",
34358+ "description": "Team unique identifier"
34359+ },
34360+ "team_name": {
34361+ "type": "string",
34362+ "description": "Team name"
34363+ },
34364+ "team_slug": {
34365+ "type": "string",
34366+ "description": "Team URL slug"
34367+ },
34368+ "installations": {
34369+ "type": "array",
34370+ "items": {
34371+ "type": "object",
34372+ "properties": {
34373+ "installation_id": {
34374+ "type": "string",
34375+ "description": "Installation unique identifier"
34376+ },
34377+ "installation_name": {
34378+ "type": "string",
34379+ "description": "Installation name"
34380+ },
34381+ "created_at": {
34382+ "type": "string",
34383+ "description": "ISO8601 timestamp"
34384+ },
34385+ "last_used_at": {
34386+ "type": "string",
34387+ "nullable": true,
34388+ "description": "ISO8601 timestamp or null"
34389+ }
34390+ },
34391+ "required": [
34392+ "installation_id",
34393+ "installation_name",
34394+ "created_at"
34395+ ]
34396+ },
34397+ "description": "All installations of this server by the team"
34398+ },
34399+ "installation_count": {
34400+ "type": "integer",
34401+ "description": "Number of installations of this server"
34402+ },
34403+ "status_summary": {
34404+ "type": "object",
34405+ "properties": {
34406+ "total_instances": {
34407+ "type": "integer",
34408+ "description": "Total number of user instances"
34409+ },
34410+ "online": {
34411+ "type": "integer",
34412+ "description": "Number of instances with online status"
34413+ },
34414+ "offline": {
34415+ "type": "integer",
34416+ "description": "Number of instances with offline status"
34417+ },
34418+ "error": {
34419+ "type": "integer",
34420+ "description": "Number of instances with error or permanently_failed status"
34421+ },
34422+ "provisioning": {
34423+ "type": "integer",
34424+ "description": "Number of instances in provisioning states"
34425+ }
34426+ },
34427+ "required": [
34428+ "total_instances",
34429+ "online",
34430+ "offline",
34431+ "error",
34432+ "provisioning"
34433+ ]
34434+ }
34435+ },
34436+ "required": [
34437+ "team_id",
34438+ "team_name",
34439+ "team_slug",
34440+ "installations",
34441+ "installation_count",
34442+ "status_summary"
34443+ ]
34444+ }
34445+ },
34446+ "pagination": {
34447+ "type": "object",
34448+ "properties": {
34449+ "total": {
34450+ "type": "number",
34451+ "description": "Total number of teams"
34452+ },
34453+ "limit": {
34454+ "type": "number",
34455+ "description": "Number of teams per page"
34456+ },
34457+ "offset": {
34458+ "type": "number",
34459+ "description": "Number of teams skipped"
34460+ },
34461+ "has_more": {
34462+ "type": "boolean",
34463+ "description": "Whether there are more teams beyond this page"
34464+ }
34465+ },
34466+ "required": [
34467+ "total",
34468+ "limit",
34469+ "offset",
34470+ "has_more"
34471+ ]
34472+ }
34473+ },
34474+ "required": [
34475+ "server_info",
34476+ "teams",
34477+ "pagination"
34478+ ]
34479+ }
34480+ },
34481+ "required": [
34482+ "success",
34483+ "data"
34484+ ],
34485+ "description": "Paginated list of teams using this MCP server"
34486+ }
34487+ }
34488+ }
34489+ },
34490+ "400": {
34491+ "description": "Bad Request - Invalid pagination parameters",
34492+ "content": {
34493+ "application/json": {
34494+ "schema": {
34495+ "type": "object",
34496+ "properties": {
34497+ "success": {
34498+ "type": "boolean",
34499+ "default": false,
34500+ "description": "Indicates operation failure"
34501+ },
34502+ "error": {
34503+ "type": "string",
34504+ "description": "Error message"
34505+ }
34506+ },
34507+ "required": [
34508+ "success",
34509+ "error"
34510+ ],
34511+ "description": "Bad Request - Invalid pagination parameters"
34512+ }
34513+ }
34514+ }
34515+ },
34516+ "401": {
34517+ "description": "Unauthorized",
34518+ "content": {
34519+ "application/json": {
34520+ "schema": {
34521+ "type": "object",
34522+ "properties": {
34523+ "success": {
34524+ "type": "boolean",
34525+ "default": false,
34526+ "description": "Indicates operation failure"
34527+ },
34528+ "error": {
34529+ "type": "string",
34530+ "description": "Error message"
34531+ }
34532+ },
34533+ "required": [
34534+ "success",
34535+ "error"
34536+ ],
34537+ "description": "Unauthorized"
34538+ }
34539+ }
34540+ }
34541+ },
34542+ "403": {
34543+ "description": "Forbidden - Global admin required",
34544+ "content": {
34545+ "application/json": {
34546+ "schema": {
34547+ "type": "object",
34548+ "properties": {
34549+ "success": {
34550+ "type": "boolean",
34551+ "default": false,
34552+ "description": "Indicates operation failure"
34553+ },
34554+ "error": {
34555+ "type": "string",
34556+ "description": "Error message"
34557+ }
34558+ },
34559+ "required": [
34560+ "success",
34561+ "error"
34562+ ],
34563+ "description": "Forbidden - Global admin required"
34564+ }
34565+ }
34566+ }
34567+ },
34568+ "404": {
34569+ "description": "MCP server not found",
34570+ "content": {
34571+ "application/json": {
34572+ "schema": {
34573+ "type": "object",
34574+ "properties": {
34575+ "success": {
34576+ "type": "boolean",
34577+ "default": false,
34578+ "description": "Indicates operation failure"
34579+ },
34580+ "error": {
34581+ "type": "string",
34582+ "description": "Error message"
34583+ }
34584+ },
34585+ "required": [
34586+ "success",
34587+ "error"
34588+ ],
34589+ "description": "MCP server not found"
34590+ }
34591+ }
34592+ }
34593+ },
34594+ "500": {
34595+ "description": "Internal Server Error",
34596+ "content": {
34597+ "application/json": {
34598+ "schema": {
34599+ "type": "object",
34600+ "properties": {
34601+ "success": {
34602+ "type": "boolean",
34603+ "default": false,
34604+ "description": "Indicates operation failure"
34605+ },
34606+ "error": {
34607+ "type": "string",
34608+ "description": "Error message"
34609+ }
34610+ },
34611+ "required": [
34612+ "success",
34613+ "error"
34614+ ],
34615+ "description": "Internal Server Error"
34616+ }
34617+ }
34618+ }
34619+ }
34620+ }
34621+ }
34622+ },
3427134623 "/api/admin/teams": {
3427234624 "get": {
3427334625 "summary": "List all teams (Global Admin) with pagination",
0 commit comments