POST / tasks / {taskId} / variables
基本信息
为给定 taskId创建或更新变量。 如果该变量尚不存在,将创建它。
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 / tasks / {taskId} / variables
响应等级(状态200)
成功回应
{ "entry": { "scope": "string", "name": "string", "value": 0, "type": "string" } }
响应内容类型 applicaiton/json
Path参数
名称 | 类型 | 是否必填 | 示例值 | 描述 |
taskId | string | 是 | 任务的标识符。 |
Body参数(variable)
request body示例
{ "scope": "string", "name": "string", "value": 0, "type": "string" }
错误信息描述
状态码 | 原因 |
401 | 验证失败 |
404 | taskId不存在 |
default | 意外错误 |
返回结果示例
{ "error": { "errorKey": "string", "statusCode": 0, "briefSummary": "string", "stackTrace": "string", "descriptionURL": "string", "logId": "string" } }