---
title: "CreateExperimentByUpload"
method: POST
path: "/di/v2/experiment/upload"
tags: ["Experiment"]
---

# CreateExperimentByUpload

`POST /di/v2/experiment/upload`

## Request

- Base URL: `https://di.prophecis.com`
- URL: `https://di.prophecis.com/di/v2/experiment/upload`
- 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/upload/post.ts> (a function with typed inputs; its response is checked against the schema)

通过上传方式创建一个实验

## Request body `multipart/form-data`

- object
  - `file` string, binary, required: 上传的表示实验工作流的zip文件，zip文件里应该包含一个名为flow.json的json文件
  - `fileName` string: 上传文件的文件名
  - `name` string, required: 创建实验的名称
  - `group_name` string, required: 创建实验所属的项目组
  - `description` string: 创建实验的描述
  - `tags` string[]: 创建实验的标签
  - `origin_system` 'MLSS' | 'DSS' | 'WTSS': 表示实验在哪个系统创建的, 默认为"MLSS"；可选的枚举值为 "WTSS" "DSS" "MLSS"
  - `cluster_type` 'BDAP' | 'BDP': 实验所属的集群类型，默认为"BDAP"；可选枚举值为 "BDAP" "BDP"
  - `dss_workspace_id` string: 创建DSS类型的实验的dss相关信息（dss工作流的工作空间id）
  - `dss_workspace_name` string: 创建DSS类型的实验的dss相关信息（dss工作流的工作空间名称）
  - `dss_project_id` string: 创建DSS类型的实验的dss相关信息（dss工作流的项目id）
  - `dss_project_name` string: 创建DSS类型的实验的dss相关信息（dss工作流的项目名）
  - `dss_flow_id` string: 创建DSS类型的实验的dss相关信息（dss工作流的id）
  - `dss_flow_name` string: 创建DSS类型的实验的dss相关信息（dss工作流的名称）
  - `dss_flow_version` string: 创建DSS类型的实验的dss相关信息（dss工作流的版本）

## 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)
