test-cloud
latest
false
- 入门指南
- 身份验证
- 作用域和权限
- 平台管理 API
重要 :
新发布内容的本地化可能需要 1-2 周的时间才能完成。

Test Cloud API 指南
上次更新日期 2026年4月7日
更新规则
更新现有的 SAML 配置规则。
Endpoint
PUT /api/Rule
请求正文
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
ruleId | 整数 | 是 | 待更新规则的唯一标识符 |
partitionGlobalId | GUID | 是 | 组织的全局标识符。有关检索partitionGlobalId的步骤,请参阅检索 API 使用的分区全局 ID 。 |
name | 字符串 | 是 | 更新后的规则名称 |
description | 字符串 | 否 | 已更新说明 |
enabled | 布尔值 | 是 | 规则是否处于活动状态 |
definition | 字符串 | 否 | 规则定义 |
请求标头
--header 'Authorization: Bearer {access_token}'
--header 'Content-Type: application/json'
--header 'Authorization: Bearer {access_token}'
--header 'Content-Type: application/json'
响应
备注:
更新规则端点不会返回RuleDto 。不会返回已分配的组。
{
"id": 3685,
"name": "Test",
"description": "Test",
"enabled": true,
"partitionId": 28728,
"definition": "{\"GroupsToAssign\":[\"4d161738-7204-4794-b839-8f7fed28366c\"],\"Conditions\":[]}",
"creationTime": "2026-01-29T16:09:41.7203623",
"lastModificationTime": "2026-01-29T16:11:18.691478Z"
}
{
"id": 3685,
"name": "Test",
"description": "Test",
"enabled": true,
"partitionId": 28728,
"definition": "{\"GroupsToAssign\":[\"4d161738-7204-4794-b839-8f7fed28366c\"],\"Conditions\":[]}",
"creationTime": "2026-01-29T16:09:41.7203623",
"lastModificationTime": "2026-01-29T16:11:18.691478Z"
}
请求示例
{
"ruleId": 3685,
"partitionGlobalId": "{{prtId}}",
"name": "Test",
"description": "Test",
"enabled": true,
"definition": "{\"GroupsToAssign\":[\"4d161738-7204-4794-b839-8f7fed28366c\"],\"Conditions\":[]}"
}
{
"ruleId": 3685,
"partitionGlobalId": "{{prtId}}",
"name": "Test",
"description": "Test",
"enabled": true,
"definition": "{\"GroupsToAssign\":[\"4d161738-7204-4794-b839-8f7fed28366c\"],\"Conditions\":[]}"
}
错误响应
400 Bad Request:无效请求正文或验证错误401 Unauthorized:身份验证令牌缺失或无效403 Forbidden:权限不足404 Not Found:组织或规则不存在