API参考:组织
组织管理和用户管理端点的API参考。
模拟可让您在流程模型上运行假设场景。您可以配置处理时间、资源分配和到达率,以预测流程行为。
端点: GET /v1/tenant/{tenantId}/processes/{processId}/simulations
**身份验证:**租户范围API密钥 · read范围
参数:
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | 路径 | 是 | 格式:uuid |
| processId | string | 路径 | 是 | 格式:uuid |
| limit | integer | 查询参数 | 否 | 返回的最大项目数 |
| offset | integer | 查询参数 | 否 | 跳过的项目数 |
响应(200):
模拟列表
[
{
"id": "00000000-0000-0000-0000-000000000000",
"displayName": "string",
"datasetName": "string",
"startTime": "2024-03-15T16:30:00Z",
"endTime": "2024-03-15T16:30:00Z",
"useWarmUp": true
}
] 错误:
端点: POST /v1/tenant/{tenantId}/processes/{processId}/simulations
**身份验证:**租户范围API密钥 · write范围
参数:
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | 路径 | 是 | 格式:uuid |
| processId | string | 路径 | 是 | 格式:uuid |
请求正文:
{
"id": "00000000-0000-0000-0000-000000000000",
"displayName": "string",
"datasetName": "string",
"startTime": "2024-03-15T16:30:00Z",
"endTime": "2024-03-15T16:30:00Z",
"useWarmUp": true
} | 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| id | string | 否 | 用于幂等重试的可选ID(必须是UUID) 格式: uuid |
| displayName | string | 否 | 模拟名称 默认值: New Simulation |
| datasetName | string | 否 | 模拟运行所用数据集的名称 |
| startTime | string | 否 | 模拟开始时间 格式: date-time |
| endTime | string | 否 | 模拟结束时间 格式: date-time |
| useWarmUp | boolean | 否 | 是否舍弃预热期 默认值: false |
响应(201):
模拟已创建
{
"simulation": {
"id": "00000000-0000-0000-0000-000000000000",
"displayName": "string"
},
"message": "string"
} | 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| simulation | object | 是 | |
| message | string | 是 |
错误:
端点: GET /v1/tenant/{tenantId}/processes/{processId}/simulations/{simulationId}
**身份验证:**租户范围API密钥 · read范围
参数:
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | 路径 | 是 | 格式:uuid |
| processId | string | 路径 | 是 | 格式:uuid |
| simulationId | string | 路径 | 是 | 格式:uuid |
响应(200):
模拟详情
{
"simulation": {
"id": "00000000-0000-0000-0000-000000000000",
"displayName": "string",
"datasetName": "string",
"startTime": "2024-03-15T16:30:00Z",
"endTime": "2024-03-15T16:30:00Z",
"useWarmUp": true
},
"elementSettings": [
{
"simulationId": "00000000-0000-0000-0000-000000000000",
"modelElementId": "00000000-0000-0000-0000-000000000000",
"settings": {
"processingTimeDistribution": [
{
"timeslot": {
"periodicity": "Always"
},
"conditions": [
{
"type": "Values",
"attribute": "string",
"values": [
"string"
]
}
],
"distribution": {
"type": "Fixed",
"value": 0
},
"timeUnit": "seconds",
"rateUnit": "perTimeSlot"
}
],
"processingTimeUnit": "seconds",
"updateAttributeRules": [
{
"id": "string",
"attributeId": "00000000-0000-0000-0000-000000000000",
"timeslot": {
"periodicity": "Always"
},
"conditions": [
{
"type": "Values",
"attribute": "string",
"values": [
"string"
]
}
],
"newValue": "string",
"isEnabled": true
}
],
"requiredResources": [
{
"resourceId": "00000000-0000-0000-0000-000000000000",
"amount": 0
}
],
"caseStartsDistribution": [
{
"timeslot": {
"periodicity": "Always"
},
"conditions": [
{
"type": "Values",
"attribute": "string",
"values": [
"string"
]
}
],
"distribution": {
"type": "Fixed",
"value": 0
},
"timeUnit": "seconds",
"rateUnit": "perTimeSlot"
}
],
"caseStartsTimeUnit": "perTimeSlot",
"capacityInterval": "perHour",
"skipChanceDistribution": [
{
"timeslot": {
"periodicity": "Always"
},
"conditions": [
{
"type": "Values",
"attribute": "string",
"values": [
"string"
]
}
],
"distribution": {
"type": "Fixed",
"value": 0
},
"timeUnit": "seconds",
"rateUnit": "perTimeSlot"
}
],
"queueStrategy": "fifo",
"chanceToTakeDistribution": [
{
"timeslot": {
"periodicity": "Always"
},
"conditions": [
{
"type": "Values",
"attribute": "string",
"values": [
"string"
]
}
],
"distribution": {
"type": "Fixed",
"value": 0
},
"timeUnit": "seconds",
"rateUnit": "perTimeSlot"
}
]
}
}
],
"attributes": [
{
"id": "00000000-0000-0000-0000-000000000000",
"simulationId": "00000000-0000-0000-0000-000000000000",
"displayName": "string",
"valueDistribution": {
"type": "Number",
"numberDistributions": [
{
"timeslot": {
"periodicity": "Always"
},
"conditions": [
{
"type": "Values",
"attribute": "string",
"values": [
"string"
]
}
],
"distribution": {
"type": "Fixed",
"value": 0
},
"timeUnit": "seconds",
"rateUnit": "perTimeSlot",
"id": "string",
"isEnabled": true,
"isDefault": true
}
],
"textDistributions": [
{
"id": "string",
"timeslot": {
"periodicity": "Always"
},
"isEnabled": true,
"isDefault": true,
"mode": "list",
"textValues": [
{
"id": "string",
"value": "string",
"chance": 0
}
]
}
]
},
"simulationAttributeType": "string"
}
],
"resources": [
{
"id": "00000000-0000-0000-0000-000000000000",
"simulationId": "00000000-0000-0000-0000-000000000000",
"displayName": "string",
"levelDistribution": [
{
"timeslot": {
"periodicity": "Always"
},
"conditions": [
{
"type": "Values",
"attribute": "string",
"values": [
"string"
]
}
],
"distribution": {
"type": "Fixed",
"value": 0
},
"timeUnit": "seconds",
"rateUnit": "perTimeSlot"
}
],
"attributeId": "00000000-0000-0000-0000-000000000000"
}
]
} | 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| simulation | object | 是 | 模拟标头 |
| elementSettings | object[] | 是 | 每个元素的模拟设置 |
| attributes | object[] | 是 | 模拟属性 |
| resources | object[] | 是 | 资源池 |
错误:
端点: PUT /v1/tenant/{tenantId}/processes/{processId}/simulations/{simulationId}
**身份验证:**租户范围API密钥 · write范围
参数:
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | 路径 | 是 | 格式:uuid |
| processId | string | 路径 | 是 | 格式:uuid |
| simulationId | string | 路径 | 是 | 格式:uuid |
请求正文:
{
"displayName": "string",
"datasetName": "string",
"startTime": "2024-03-15T16:30:00Z",
"endTime": "2024-03-15T16:30:00Z",
"useWarmUp": true,
"elementSettings": [
{
"modelElementId": "00000000-0000-0000-0000-000000000000",
"settings": {
"caseStartsDistribution": [
{
"timeslot": {
"periodicity": "Always"
},
"conditions": [
{
"type": "Values",
"attribute": "string",
"values": [
"string"
]
}
],
"distribution": {
"type": "Fixed",
"value": 0
},
"timeUnit": "seconds",
"rateUnit": "perTimeSlot"
}
],
"processingTimeDistribution": [
{
"timeslot": {
"periodicity": "Always"
},
"conditions": [
{
"type": "Values",
"attribute": "string",
"values": [
"string"
]
}
],
"distribution": {
"type": "Fixed",
"value": 0
},
"timeUnit": "seconds",
"rateUnit": "perTimeSlot"
}
]
}
}
]
} | 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| displayName | string | 否 | 模拟名称 |
| datasetName | string | 否 | 模拟运行所用数据集的名称 |
| startTime | string | 否 | 模拟开始时间 格式: date-time |
| endTime | string | 否 | 模拟结束时间 格式: date-time |
| useWarmUp | boolean | 否 | 是否舍弃预热期 |
| elementSettings | object[] | 否 | 每个元素的设置覆盖值 |
响应(200):
模拟已更新
{
"message": "string"
} | 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| message | string | 是 |
错误:
端点: DELETE /v1/tenant/{tenantId}/processes/{processId}/simulations/{simulationId}
**身份验证:**租户范围API密钥 · write作用域
参数:
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | 路径 | 是 | 格式:uuid |
| processId | string | 路径 | 是 | 格式:uuid |
| simulationId | string | 路径 | 是 | 格式:uuid |
响应(200):
模拟已删除
{
"message": "string"
} | 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| message | string | 是 |
错误:
这些端点会根据流程模型,使用AI自动生成模拟设置。
端点: POST /v1/tenant/{tenantId}/processes/{processId}/simulations/{simulationId}/generate-settings
**身份验证:**租户范围API密钥 · write作用域 · 速率限制2 req/s(突发4)
参数:
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | 路径 | 是 | 格式:uuid |
| processId | string | 路径 | 是 | 格式:uuid |
| simulationId | string | 路径 | 是 | 格式:uuid |
请求正文:
{
"processDescription": "string",
"additionalContext": "string"
} | 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| processDescription | string | 否 | |
| additionalContext | string | 否 |
响应(200):
生成已开始/结果
{
"message": "string"
} | 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| message | string | 是 |
错误:
端点: GET /v1/tenant/{tenantId}/processes/{processId}/simulations/{simulationId}/generate-settings/status
**身份验证:**租户范围API密钥 · write作用域
参数:
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | 路径 | 是 | 格式:uuid |
| processId | string | 路径 | 是 | 格式:uuid |
| simulationId | string | 路径 | 是 | 格式:uuid |
响应(200):
生成状态
{
"message": "string"
} | 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| message | string | 是 |
错误:
端点: POST /v1/tenant/{tenantId}/processes/{processId}/simulations/{simulationId}/run
**身份验证:**租户范围API密钥 · write作用域 · 速率限制5 req/s(突发10)
参数:
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | 路径 | 是 | 格式:uuid |
| processId | string | 路径 | 是 | 格式:uuid |
| simulationId | string | 路径 | 是 | 格式:uuid |
响应(200):
模拟已启动
{
"message": "string"
} | 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| message | string | 是 |
错误:
端点: GET /v1/tenant/{tenantId}/processes/{processId}/simulations/{simulationId}/run/status
**身份验证:**租户范围API密钥 · read作用域
参数:
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | 路径 | 是 | 格式:uuid |
| processId | string | 路径 | 是 | 格式:uuid |
| simulationId | string | 路径 | 是 | 格式:uuid |
响应(200):
运行状态
{
"state": "notStarted",
"startedAt": "2024-03-15T16:30:00Z",
"completedAt": "2024-03-15T16:30:00Z",
"step": "string",
"casesSimulated": 0,
"targetCases": 0,
"eventsGenerated": 0,
"errorMessage": "string",
"simulationId": "00000000-0000-0000-0000-000000000000"
} | 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| state | notStarted | running | processing | ready | error | 是 | 允许值:notStarted、running、processing、ready、error |
| startedAt | string | 否 | 格式:date-time |
| completedAt | string | 否 | 格式:date-time |
| step | string | 否 | |
| casesSimulated | number | 否 | |
| targetCases | number | 否 | |
| eventsGenerated | number | 否 | |
| errorMessage | string | 否 | |
| simulationId | string | 是 | 格式:uuid |
错误: