Skip to content

Commit 917c551

Browse files
authored
Merge pull request #6850 from devtron-labs/main-specs-cut-v2
misc: helm app details API spec
2 parents 59ffafe + 0622e6a commit 917c551

File tree

1 file changed

+376
-0
lines changed

1 file changed

+376
-0
lines changed

specs/helm/app-store.yaml

Lines changed: 376 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,185 @@ paths:
258258
schema:
259259
$ref: '#/components/schemas/ErrorResponse'
260260

261+
/orchestrator/app-store/installed-app/detail/v2:
262+
get:
263+
tags:
264+
- App Store Deployment
265+
summary: Get installed app details v2
266+
description: |
267+
Retrieves comprehensive details about a deployed app store application including
268+
deployment information, environment details, and application metadata.
269+
270+
**Authentication & Authorization**:
271+
- Requires valid user session
272+
- User must have GET permission on the Helm app resource
273+
- RBAC enforced based on cluster, namespace, and app name
274+
275+
**Use Cases**:
276+
- View current deployment status and details
277+
- Get application metadata and configuration
278+
- Access environment and cluster information
279+
- Retrieve deployment history and version information
280+
operationId: fetchAppDetailsForInstalledAppV2
281+
parameters:
282+
- name: installed-app-id
283+
in: query
284+
required: true
285+
description: |
286+
The ID of the installed app to retrieve details for.
287+
This is the unique identifier for a deployed app store application.
288+
schema:
289+
type: integer
290+
minimum: 1
291+
example: 2
292+
- name: env-id
293+
in: query
294+
required: true
295+
description: |
296+
The environment ID where the app is deployed.
297+
Used to identify the specific environment instance of the app.
298+
schema:
299+
type: integer
300+
minimum: 1
301+
example: 1
302+
responses:
303+
'200':
304+
description: Installed app details retrieved successfully
305+
content:
306+
application/json:
307+
schema:
308+
type: object
309+
properties:
310+
code:
311+
type: integer
312+
description: HTTP status code
313+
example: 200
314+
status:
315+
type: string
316+
description: Response status
317+
example: "OK"
318+
result:
319+
$ref: '#/components/schemas/AppDetailContainer'
320+
examples:
321+
successful_response:
322+
summary: Successful retrieval of installed app details
323+
value:
324+
code: 200
325+
status: "OK"
326+
result:
327+
installedAppId: 2
328+
appId: 12
329+
appName: "my-nginx-app"
330+
environmentId: 1
331+
environmentName: "production"
332+
namespace: "default"
333+
clusterId: 1
334+
clusterName: "prod-cluster"
335+
appStoreChartName: "nginx"
336+
appStoreChartId: 10
337+
appStoreAppVersion: "1.21.0"
338+
lastDeployedTime: "2024-01-15T10:30:00Z"
339+
lastDeployedBy: "[email protected]"
340+
status: "Healthy"
341+
deploymentAppType: "HELM"
342+
helmPackageName: "my-nginx-app-production-20240115"
343+
deprecated: false
344+
k8sVersion: "1.28"
345+
instanceDetail: []
346+
otherEnvironment: []
347+
linkOuts: []
348+
'400':
349+
description: Bad Request - Invalid query parameters
350+
content:
351+
application/json:
352+
schema:
353+
$ref: '#/components/schemas/ErrorResponse'
354+
examples:
355+
invalid_installed_app_id:
356+
summary: Invalid installed-app-id parameter
357+
value:
358+
code: 400
359+
status: "Bad Request"
360+
errors:
361+
- code: "11003"
362+
userMessage: "Invalid query parameter 'installed-app-id': must be a valid positive integer"
363+
internalMessage: "strconv.Atoi: parsing \"abc\": invalid syntax"
364+
invalid_env_id:
365+
summary: Invalid env-id parameter
366+
value:
367+
code: 400
368+
status: "Bad Request"
369+
errors:
370+
- code: "11003"
371+
userMessage: "Invalid query parameter 'env-id': must be a valid positive integer"
372+
internalMessage: "strconv.Atoi: parsing \"xyz\": invalid syntax"
373+
'401':
374+
description: Unauthorized - Missing or invalid authentication
375+
content:
376+
application/json:
377+
schema:
378+
$ref: '#/components/schemas/ErrorResponse'
379+
examples:
380+
unauthorized:
381+
summary: User not authenticated
382+
value:
383+
code: 401
384+
status: "Unauthorized"
385+
errors:
386+
- code: "11010"
387+
userMessage: "Authentication required. Please log in to continue."
388+
internalMessage: "unauthorized"
389+
'403':
390+
description: Forbidden - Insufficient permissions
391+
content:
392+
application/json:
393+
schema:
394+
$ref: '#/components/schemas/ErrorResponse'
395+
examples:
396+
forbidden:
397+
summary: User lacks permissions
398+
value:
399+
code: 403
400+
status: "Forbidden"
401+
errors:
402+
- code: "11008"
403+
userMessage: "Access denied. You do not have permission to view this installed app."
404+
internalMessage: "unauthorized user"
405+
'404':
406+
description: Not Found - Installed app does not exist
407+
content:
408+
application/json:
409+
schema:
410+
$ref: '#/components/schemas/ErrorResponse'
411+
examples:
412+
not_found:
413+
summary: Installed app not found
414+
value:
415+
code: 404
416+
status: "Not Found"
417+
errors:
418+
- code: "11006"
419+
userMessage: "Installed app with ID '2' not found in environment '1'"
420+
internalMessage: "sql: no rows in result set"
421+
'500':
422+
description: Internal Server Error
423+
content:
424+
application/json:
425+
schema:
426+
$ref: '#/components/schemas/ErrorResponse'
427+
examples:
428+
internal_error:
429+
summary: Unexpected server error
430+
value:
431+
code: 500
432+
status: "Internal Server Error"
433+
errors:
434+
- code: "11009"
435+
userMessage: "An unexpected error occurred while retrieving the installed app details"
436+
internalMessage: "database connection failed"
437+
security:
438+
- bearerAuth: []
439+
261440
/orchestrator/app-store/deployment/application/version/{installedAppVersionId}:
262441
get:
263442
tags:
@@ -705,6 +884,203 @@ components:
705884
description: App store application version ID
706885
example: 45
707886

887+
AppDetailContainer:
888+
type: object
889+
description: |
890+
Comprehensive details about a deployed app store application including
891+
deployment information, environment details, instance information, and resource tree.
892+
properties:
893+
installedAppId:
894+
type: integer
895+
description: Installed app ID
896+
example: 2
897+
appId:
898+
type: integer
899+
description: Application ID
900+
example: 12
901+
appName:
902+
type: string
903+
description: Application name
904+
example: "my-nginx-app"
905+
environmentId:
906+
type: integer
907+
description: Environment ID where the app is deployed
908+
example: 1
909+
environmentName:
910+
type: string
911+
description: Environment name
912+
example: "production"
913+
namespace:
914+
type: string
915+
description: Kubernetes namespace where the app is deployed
916+
example: "default"
917+
clusterId:
918+
type: integer
919+
description: Cluster ID where the app is deployed
920+
example: 1
921+
clusterName:
922+
type: string
923+
description: Cluster name
924+
example: "prod-cluster"
925+
appStoreChartName:
926+
type: string
927+
description: App store chart name
928+
example: "nginx"
929+
appStoreChartId:
930+
type: integer
931+
description: App store chart ID
932+
example: 10
933+
appStoreAppVersion:
934+
type: string
935+
description: App store application version
936+
example: "1.21.0"
937+
appStoreInstalledAppVersionId:
938+
type: integer
939+
description: App store installed app version ID
940+
example: 5
941+
lastDeployedTime:
942+
type: string
943+
description: Last deployment timestamp
944+
example: "2024-01-15T10:30:00Z"
945+
lastDeployedBy:
946+
type: string
947+
description: Email of user who last deployed the app
948+
example: "[email protected]"
949+
status:
950+
type: string
951+
description: Application health status
952+
example: "Healthy"
953+
statusMessage:
954+
type: string
955+
description: Detailed status message
956+
example: "All resources are healthy"
957+
releaseVersion:
958+
type: string
959+
description: Helm release version
960+
example: "1"
961+
deploymentAppType:
962+
type: string
963+
description: Deployment application type (HELM, ACD, etc.)
964+
example: "HELM"
965+
helmPackageName:
966+
type: string
967+
description: Generated Helm package name
968+
example: "my-nginx-app-production-20240115"
969+
deprecated:
970+
type: boolean
971+
description: Whether the chart version is deprecated
972+
example: false
973+
k8sVersion:
974+
type: string
975+
description: Kubernetes version of the cluster
976+
example: "1.28"
977+
dataSource:
978+
type: string
979+
description: Data source for the application
980+
example: "HELM"
981+
default:
982+
type: boolean
983+
description: Whether this is the default environment
984+
example: false
985+
isVirtualEnvironment:
986+
type: boolean
987+
description: Whether this is a virtual environment
988+
example: false
989+
deploymentAppDeleteRequest:
990+
type: boolean
991+
description: Whether a delete request is pending
992+
example: false
993+
ipsAccessProvided:
994+
type: boolean
995+
description: Whether IPS access is provided
996+
example: false
997+
releaseMode:
998+
type: string
999+
description: Release mode (NORMAL, ROLLBACK, etc.)
1000+
example: "NORMAL"
1001+
instanceDetail:
1002+
type: array
1003+
description: List of pod instances with resource usage
1004+
items:
1005+
$ref: '#/components/schemas/InstanceDetail'
1006+
otherEnvironment:
1007+
type: array
1008+
description: List of other environments where this app is deployed
1009+
items:
1010+
$ref: '#/components/schemas/Environment'
1011+
linkOuts:
1012+
type: array
1013+
description: External links associated with the application
1014+
items:
1015+
$ref: '#/components/schemas/LinkOut'
1016+
resourceTree:
1017+
type: object
1018+
description: Kubernetes resource tree for the application
1019+
additionalProperties: true
1020+
notes:
1021+
type: string
1022+
description: Helm chart notes
1023+
example: "Application deployed successfully"
1024+
1025+
InstanceDetail:
1026+
type: object
1027+
description: Pod instance details with resource usage
1028+
properties:
1029+
podName:
1030+
type: string
1031+
description: Pod name
1032+
example: "my-nginx-app-7d8f9c5b6-abc12"
1033+
cpuUsage:
1034+
type: string
1035+
description: CPU usage percentage
1036+
example: "15%"
1037+
memoryUsage:
1038+
type: string
1039+
description: Memory usage percentage
1040+
example: "45%"
1041+
status:
1042+
type: string
1043+
description: Pod status
1044+
example: "Running"
1045+
1046+
Environment:
1047+
type: object
1048+
description: Environment information
1049+
properties:
1050+
environmentId:
1051+
type: integer
1052+
description: Environment ID
1053+
example: 2
1054+
environmentName:
1055+
type: string
1056+
description: Environment name
1057+
example: "staging"
1058+
namespace:
1059+
type: string
1060+
description: Kubernetes namespace
1061+
example: "staging"
1062+
clusterName:
1063+
type: string
1064+
description: Cluster name
1065+
example: "staging-cluster"
1066+
1067+
LinkOut:
1068+
type: object
1069+
description: External link configuration
1070+
properties:
1071+
name:
1072+
type: string
1073+
description: Link name
1074+
example: "Grafana Dashboard"
1075+
url:
1076+
type: string
1077+
description: Link URL
1078+
example: "https://grafana.example.com/d/app-dashboard"
1079+
description:
1080+
type: string
1081+
description: Link description
1082+
example: "Application monitoring dashboard"
1083+
7081084
ErrorResponse:
7091085
required:
7101086
- code

0 commit comments

Comments
 (0)