POST / processes / {processId} / variables
基本信息
为给定进程创建或更新变量。 如果该变量尚不存在,将创建它。
Note:您可以通过在JSON正文中指定变量列表来创建或更新多个变量,如下所示:
[ { "name": "string", "value": "string", "type": "string" }, { "name": "string", "value": "string", "type": "string" } ]
如果将列表指定为输入,则在响应正文中返回分页列表而不是条目。 例如:
{ "list": { "pagination": { "count": 2, "hasMoreItems": false, "totalItems": 2, "skipCount": 0, "maxItems": 100 }, "entries": [ { "entry": { ... } }, { "entry": { ... } } ] } }
请求方式 POST
请求API / processes / {processId} / variables
响应等级(状态200)
成功回应
{ "entry": { "scope": "string", "name": "string", "value": 0, "type": "string" } }
响应内容类型 applicaiton/json
Body参数(variableBody)
request body示例
{ "name": "string", "value": 0, "type": "string" }
错误信息描述
状态码 | 原因 |
400 | 无效的参数: variableBody无效 |
401 | 验证失败 |
404 | processId不存在 |
default | 意外错误 |
返回结果示例
{ "error": { "errorKey": "string", "statusCode": 0, "briefSummary": "string", "stackTrace": "string", "descriptionURL": "string", "logId": "string" } }