openapi: 3.0.0
info:
  version: 2.7.0
  title: Gitee Team Apps
  description: |
    Gitee Team APPS API
tags:
  - name: market
    description: Apps market apis
  - name: module
    description: Apps module apis
  - name: web-trigger
    description: Apps web trigger apis
paths:
  /apps/api/v1/apps/deploy:
    post:
      tags:
        - market
      summary: Deploy app to app market
  /apps/api/v1/apps/install:
    post:
      tags:
        - market
      summary: Install app
  /apps/api/v1/apps/install/batch:
    post:
      tags:
        - market
      summary: Batch install app
  /apps/api/v1/apps/unpublish/:appKey:
    delete:
      tags:
        - market
      summary: Unpublish app
      parameters:
        - $ref: '#/components/parameters/path_appKey'
  /apps/api/v1/:tenantId/apps/uninstall/:appKey:
    delete:
      tags:
        - market
      summary: Uninstall app
      parameters:
        - $ref: '#/components/parameters/path_tenantId'
        - $ref: '#/components/parameters/path_appKey'
  /apps/api/v1/:tenantId/apps/modules/:module:
    get:
      tags:
        - module
      summary: Fetch installed apps by module
      parameters:
        - $ref: '#/components/parameters/path_tenantId'
        - $ref: '#/components/parameters/path_module'
  /apps/api/v1/:tenantId/:workspaceKey/apps/modules/:module:
    get:
      tags:
        - module
      summary: Fetch installed apps by module and workspaceKey
      parameters:
        - $ref: '#/components/parameters/path_tenantId'
        - $ref: '#/components/parameters/path_workspaceKey'
        - $ref: '#/components/parameters/path_module'
  /apps/api/v1/:tenantId/apps/:appKey/environments/:environmentKey/webtriggers/:webtriggerKey:
    post:
      tags:
        - web-trigger
      summary: Web trigger api
      parameters:
        - $ref: '#/components/parameters/path_tenantId'
        - name: environmentKey
          in: path
          description: Environment Key
          required: true
          schema:
            type: string
            enum:
              - production
              - staging
              - development
        - name: webtriggerKey
          in: path
          description: Webtrigger Key
          required: true
          schema:
            type: string
components:
  parameters:
    path_appKey:
      name: appKey
      in: path
      description: App key
      required: true
      schema:
        type: string
    path_tenantId:
      name: tenantId
      in: path
      description: Tenant Id
      required: true
      schema:
        type: string
    path_module:
      name: module
      in: path
      description: Module key
      required: true
      schema:
        type: string
    path_workspaceKey:
      name: workspaceKey
      in: path
      description: Workspace Key
      required: true
      schema:
        type: string
