Skip to content

Commit 5c87421

Browse files
author
Lasim
committed
feat(backend): add endpoint to retrieve available satellites for team
1 parent c79f52a commit 5c87421

File tree

5 files changed

+664
-0
lines changed

5 files changed

+664
-0
lines changed

services/backend/api-spec.json

Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12285,6 +12285,218 @@
1228512285
}
1228612286
}
1228712287
},
12288+
"/api/teams/{teamId}/satellites": {
12289+
"get": {
12290+
"summary": "Get available satellites for team",
12291+
"tags": [
12292+
"Teams",
12293+
"Satellites"
12294+
],
12295+
"description": "Retrieves all active satellites available to the team (global satellites + team-specific satellites). Requires satellites.team.view permission. Only returns active satellites. Sensitive fields like api_key_hash are never exposed.",
12296+
"parameters": [
12297+
{
12298+
"schema": {
12299+
"type": "string",
12300+
"minLength": 1
12301+
},
12302+
"in": "path",
12303+
"name": "teamId",
12304+
"required": true,
12305+
"description": "Team ID"
12306+
}
12307+
],
12308+
"security": [
12309+
{
12310+
"cookieAuth": []
12311+
}
12312+
],
12313+
"responses": {
12314+
"200": {
12315+
"description": "Satellites retrieved successfully",
12316+
"content": {
12317+
"application/json": {
12318+
"schema": {
12319+
"type": "object",
12320+
"properties": {
12321+
"success": {
12322+
"type": "boolean",
12323+
"description": "Indicates if the operation was successful"
12324+
},
12325+
"data": {
12326+
"type": "object",
12327+
"properties": {
12328+
"satellites": {
12329+
"type": "array",
12330+
"items": {
12331+
"type": "object",
12332+
"properties": {
12333+
"id": {
12334+
"type": "string",
12335+
"description": "Satellite unique identifier"
12336+
},
12337+
"name": {
12338+
"type": "string",
12339+
"description": "User-friendly satellite name"
12340+
},
12341+
"satellite_type": {
12342+
"type": "string",
12343+
"enum": [
12344+
"global",
12345+
"team"
12346+
],
12347+
"description": "Satellite deployment type"
12348+
},
12349+
"status": {
12350+
"type": "string",
12351+
"enum": [
12352+
"active"
12353+
],
12354+
"description": "Satellite status (only active satellites are returned)"
12355+
},
12356+
"capabilities": {
12357+
"type": "array",
12358+
"items": {
12359+
"type": "string"
12360+
},
12361+
"description": "Supported MCP server types and features"
12362+
},
12363+
"team_id": {
12364+
"type": [
12365+
"null",
12366+
"string"
12367+
],
12368+
"description": "Team ID (null for global satellites)"
12369+
},
12370+
"last_heartbeat": {
12371+
"type": [
12372+
"null",
12373+
"string"
12374+
],
12375+
"description": "ISO 8601 timestamp of last communication"
12376+
}
12377+
},
12378+
"required": [
12379+
"id",
12380+
"name",
12381+
"satellite_type",
12382+
"status",
12383+
"capabilities",
12384+
"team_id"
12385+
]
12386+
},
12387+
"description": "Array of available satellites (global and team-specific)"
12388+
},
12389+
"total_count": {
12390+
"type": "number",
12391+
"description": "Total number of satellites available to the team"
12392+
},
12393+
"global_count": {
12394+
"type": "number",
12395+
"description": "Number of global satellites"
12396+
},
12397+
"team_count": {
12398+
"type": "number",
12399+
"description": "Number of team-specific satellites"
12400+
}
12401+
},
12402+
"required": [
12403+
"satellites",
12404+
"total_count",
12405+
"global_count",
12406+
"team_count"
12407+
]
12408+
}
12409+
},
12410+
"required": [
12411+
"success",
12412+
"data"
12413+
],
12414+
"description": "Satellites retrieved successfully"
12415+
}
12416+
}
12417+
}
12418+
},
12419+
"401": {
12420+
"description": "Unauthorized - Authentication required",
12421+
"content": {
12422+
"application/json": {
12423+
"schema": {
12424+
"type": "object",
12425+
"properties": {
12426+
"success": {
12427+
"type": "boolean",
12428+
"default": false,
12429+
"description": "Indicates failure"
12430+
},
12431+
"error": {
12432+
"type": "string",
12433+
"description": "Error message detailing what went wrong"
12434+
}
12435+
},
12436+
"required": [
12437+
"success",
12438+
"error"
12439+
],
12440+
"description": "Unauthorized - Authentication required"
12441+
}
12442+
}
12443+
}
12444+
},
12445+
"403": {
12446+
"description": "Forbidden - Insufficient permissions or not a team member",
12447+
"content": {
12448+
"application/json": {
12449+
"schema": {
12450+
"type": "object",
12451+
"properties": {
12452+
"success": {
12453+
"type": "boolean",
12454+
"default": false,
12455+
"description": "Indicates failure"
12456+
},
12457+
"error": {
12458+
"type": "string",
12459+
"description": "Error message detailing what went wrong"
12460+
}
12461+
},
12462+
"required": [
12463+
"success",
12464+
"error"
12465+
],
12466+
"description": "Forbidden - Insufficient permissions or not a team member"
12467+
}
12468+
}
12469+
}
12470+
},
12471+
"500": {
12472+
"description": "Internal Server Error",
12473+
"content": {
12474+
"application/json": {
12475+
"schema": {
12476+
"type": "object",
12477+
"properties": {
12478+
"success": {
12479+
"type": "boolean",
12480+
"default": false,
12481+
"description": "Indicates failure"
12482+
},
12483+
"error": {
12484+
"type": "string",
12485+
"description": "Error message detailing what went wrong"
12486+
}
12487+
},
12488+
"required": [
12489+
"success",
12490+
"error"
12491+
],
12492+
"description": "Internal Server Error"
12493+
}
12494+
}
12495+
}
12496+
}
12497+
}
12498+
}
12499+
},
1228812500
"/api/teams/{teamId}/cloud-providers": {
1228912501
"get": {
1229012502
"summary": "List available cloud providers",

services/backend/api-spec.yaml

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8583,6 +8583,157 @@ paths:
85838583
- success
85848584
- error
85858585
description: Internal Server Error
8586+
/api/teams/{teamId}/satellites:
8587+
get:
8588+
summary: Get available satellites for team
8589+
tags:
8590+
- Teams
8591+
- Satellites
8592+
description: Retrieves all active satellites available to the team (global
8593+
satellites + team-specific satellites). Requires satellites.team.view
8594+
permission. Only returns active satellites. Sensitive fields like
8595+
api_key_hash are never exposed.
8596+
parameters:
8597+
- schema:
8598+
type: string
8599+
minLength: 1
8600+
in: path
8601+
name: teamId
8602+
required: true
8603+
description: Team ID
8604+
security:
8605+
- cookieAuth: []
8606+
responses:
8607+
"200":
8608+
description: Satellites retrieved successfully
8609+
content:
8610+
application/json:
8611+
schema:
8612+
type: object
8613+
properties:
8614+
success:
8615+
type: boolean
8616+
description: Indicates if the operation was successful
8617+
data:
8618+
type: object
8619+
properties:
8620+
satellites:
8621+
type: array
8622+
items:
8623+
type: object
8624+
properties:
8625+
id:
8626+
type: string
8627+
description: Satellite unique identifier
8628+
name:
8629+
type: string
8630+
description: User-friendly satellite name
8631+
satellite_type:
8632+
type: string
8633+
enum:
8634+
- global
8635+
- team
8636+
description: Satellite deployment type
8637+
status:
8638+
type: string
8639+
enum:
8640+
- active
8641+
description: Satellite status (only active satellites are returned)
8642+
capabilities:
8643+
type: array
8644+
items:
8645+
type: string
8646+
description: Supported MCP server types and features
8647+
team_id:
8648+
type:
8649+
- "null"
8650+
- string
8651+
description: Team ID (null for global satellites)
8652+
last_heartbeat:
8653+
type:
8654+
- "null"
8655+
- string
8656+
description: ISO 8601 timestamp of last communication
8657+
required:
8658+
- id
8659+
- name
8660+
- satellite_type
8661+
- status
8662+
- capabilities
8663+
- team_id
8664+
description: Array of available satellites (global and team-specific)
8665+
total_count:
8666+
type: number
8667+
description: Total number of satellites available to the team
8668+
global_count:
8669+
type: number
8670+
description: Number of global satellites
8671+
team_count:
8672+
type: number
8673+
description: Number of team-specific satellites
8674+
required:
8675+
- satellites
8676+
- total_count
8677+
- global_count
8678+
- team_count
8679+
required:
8680+
- success
8681+
- data
8682+
description: Satellites retrieved successfully
8683+
"401":
8684+
description: Unauthorized - Authentication required
8685+
content:
8686+
application/json:
8687+
schema:
8688+
type: object
8689+
properties:
8690+
success:
8691+
type: boolean
8692+
default: false
8693+
description: Indicates failure
8694+
error:
8695+
type: string
8696+
description: Error message detailing what went wrong
8697+
required:
8698+
- success
8699+
- error
8700+
description: Unauthorized - Authentication required
8701+
"403":
8702+
description: Forbidden - Insufficient permissions or not a team member
8703+
content:
8704+
application/json:
8705+
schema:
8706+
type: object
8707+
properties:
8708+
success:
8709+
type: boolean
8710+
default: false
8711+
description: Indicates failure
8712+
error:
8713+
type: string
8714+
description: Error message detailing what went wrong
8715+
required:
8716+
- success
8717+
- error
8718+
description: Forbidden - Insufficient permissions or not a team member
8719+
"500":
8720+
description: Internal Server Error
8721+
content:
8722+
application/json:
8723+
schema:
8724+
type: object
8725+
properties:
8726+
success:
8727+
type: boolean
8728+
default: false
8729+
description: Indicates failure
8730+
error:
8731+
type: string
8732+
description: Error message detailing what went wrong
8733+
required:
8734+
- success
8735+
- error
8736+
description: Internal Server Error
85868737
/api/teams/{teamId}/cloud-providers:
85878738
get:
85888739
summary: List available cloud providers

services/backend/src/permissions/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ export const ROLE_DEFINITIONS = {
8989
'mcp.installations.delete',
9090
'mcp.tools.view',
9191
'mcp.tools.stats.view',
92+
'satellites.team.view',
9293
],
9394
team_user: [
9495
'teams.view',
@@ -98,6 +99,7 @@ export const ROLE_DEFINITIONS = {
9899
'mcp.installations.view',
99100
'mcp.tools.view',
100101
'mcp.tools.stats.view',
102+
'satellites.team.view',
101103
],
102104
} as const;
103105

0 commit comments

Comments
 (0)