---
title: "CopyExperiment"
method: POST
path: "/di/v2/experiment/{exp_id}/copy"
tags: ["Experiment"]
---

# CopyExperiment

`POST /di/v2/experiment/{exp_id}/copy`

## Request

- Base URL: `https://di.prophecis.com`
- URL: `https://di.prophecis.com/di/v2/experiment/{exp_id}/copy`
- Auth: one of:
  - API key in header `Authorization`
  - API key in header `X-Watson-Authorization-Token`
  - API key in query parameter `watson-token`
- TypeScript: <https://skmtc.dev/webankfintech/apis/prophecis-rest-service-v2/docs/di/v2/experiment/:exp_id/copy/post.ts> (a function with typed inputs; its response is checked against the schema)

复制一个已有的实验来创建一个新的实验

## Path parameters

- `exp_id` string, required

## Request body

- PatchExperimentRequest
  - `name` string: 修改实验的名称.
  - `group_id` string: 修改实验所属的项目组ID.(理论上传group_id就够了，但是group的相关接口暂时不支持byId查询，所以暂时需要传group_id和group_name)
  - `group_name` string: 修改实验所属的项目组名字.(理论上传group_id就够了，但是group的相关接口暂时不支持byId查询，所以暂时需要传group_id和group_name)
  - `description` string: 修改实验的描述.
  - `tags` string[]: 修改的实验的标签
  - `flow_json` string: 修改的实验的工作流
  - `deploy_setting` DeploySetting
    - `can_deploy_as_offline_service` boolean: 是否可发布为离线服务

## Response `200`

OK

- CreateExperimentResponse
  - `id` string, required: 返回创建的实验的id

## Other responses

- `401`: Unauthorized
- `404`: The Models cannot be found

---

[API](https://skmtc.dev/webankfintech/apis/prophecis-rest-service-v2.md) - [All operations](https://skmtc.dev/webankfintech/apis/prophecis-rest-service-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/webankfintech/apis/prophecis-rest-service-v2/revisions/ea40aedea89c?raw)
