---
title: "CreateExperimentRun"
method: POST
path: "/di/v2/experiment_run"
tags: ["ExperimentRun"]
---

# CreateExperimentRun

`POST /di/v2/experiment_run`

## Request

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

根据传入的实验ID和版本信息，创建了一个基于该实验的执行

## Request body

- CreateExperimentRunRequest
  - `exp_id` string: 所要执行的实验ID
  - `exp_version_name` string: 所要执行的实验的版本名字
  - `run_config` RunConfig
    - `global_variables` GlobalVariable[]
      - `key` string: 全局变量，变量的key
      - `type` 'string' | 'number' | 'model' | 'processline': 全局变量，变量的类型
      - `value` object: 全局变量的值，根据类型的不同，可能是String, Number, Model, ProcessLine; Model的数据结构请看GetPipelineGlobalVariablesModel的返回，PorcessLine的数据结构请看GetPipelineGlobalVariablesProcessLine的返回
    - `wtss_variables` WTSSVariables
      - `run_date` string: wtss的变量，run_date
      - `run_date_std` string: wtss的变量，run_date_std
      - `run_mon` string: wtss的变量，run_mon
      - `run_mon_end` string: wtss的变量，run_mon_end
      - `run_mon_end_std` string: wtss的变量，run_mon_end_std

## Response `200`

OK

- CreateExperimentRunResponse
  - `exp_run_id` string: 实验执行记录的ID
  - `exp_id` string: 执行的实验ID
  - `exp_version_name` string: 执行的实验的版本名字
  - `create_user` string: 执行创建人
  - `create_time` string, date-time: 执行创建的时候/执行提交的时间
  - `end_time` string, date-time: 执行结束的时间

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