---
title: "获取应用的所有Jenkins环境配置"
method: GET
path: "/apps/{id}/jenkins-envs"
tags: ["JenkinsEnv"]
---

# 获取应用的所有Jenkins环境配置

`GET /apps/{id}/jenkins-envs`

根据应用ID获取所有Jenkins环境配置

## Path parameters

- `id` integer, required

## Response `200`

OK

- object
  - `code` integer — 状态码
  - `data` ModelJenkinsEnv[] — 返回的数据
    - `app_id` integer — 应用ID
    - `application` ModelApplication
      - `business_dept_id` integer — 业务部门ID(关联sys_dept)
      - `business_group_id` integer — 基本信息
      - `code` string — 应用编码
      - `created_at` string
      - `databases` integer[] — 关联数据库(cmdb_sql表ID)
      - `description` string — 应用介绍
      - `dev_owners` integer[] — 负责人信息 (多个用户ID，关联sys_admin表)
      - `domains` string[] — 关联资源 (存储资源ID)
      - `health_api` string — 健康检查接口
      - `hosts` integer[] — 关联主机(cmdb_host表ID)
      - `id` integer
      - `jenkins_envs` ModelJenkinsEnv[] — 关联的Jenkins环境配置（级联删除）
      - `name` string — 应用名称
      - `ops_owners` integer[] — 运维负责人
      - `other_res` ModelOtherResources
        - `kafka` string[]
        - `other` string[]
        - `rabbitmq` string[]
        - `redis` string[]
        - `zookeeper` string[]
      - `programming_lang` string — 技术信息
      - `repo_url` string — 仓库地址
      - `start_command` string — 启动命令
      - `status` integer — 状态
      - `stop_command` string — 停止命令
      - `test_owners` integer[] — 测试负责人
      - `updated_at` string
    - `created_at` string
    - `env_name` string — 环境名称
    - `id` integer
    - `jenkins_server_id` integer — Jenkins服务器ID(关联account_auth)
    - `job_name` string — Jenkins任务名称
    - `updated_at` string
  - `message` string — 提示信息

---

[API](https://skmtc.net/opsre/apis/devops.md) · [All operations](https://skmtc.net/opsre/apis/devops/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/opsre/devops/revisions/25cac8835c4c/schema)
