我希望一组用户可以在刷新沙箱后访问该沙箱,而无需手动激活他们。
根据我的理解,在 23 年春季发布之后,随着在 SandboxInfo 对象上引入字段 ActivationUserGroupId,这应该是可能的。
当我尝试使用工具 API 刷新沙箱时,出现此错误
[
{
"message": "No such column 'ActivationUserGroupId' on sobject of type SandboxInfo",
"errorCode": "INVALID_FIELD"
}
]
我使用
{{_endpoint}}/services/data/v57.0/tooling/sobjects/SandboxInfo/{{sandbox_id}}
请求刷新,其中 {{_endpoint}} 是生产组织的端点,{{sandbox_id}} 是要刷新的沙箱的 ID。请求的payload如下
{
"LicenseType": "DEVELOPER_PRO",
"AutoActivate": true,
"ActivationUserGroupId": "{{group_id}}"
}
其中 {{group_id}} 是生产中组的 ID,刷新后应该可以访问沙箱。
如果我删除正文中的 ActivationUserGroupId 属性,则请求有效。但是,该用户组将无法访问。
PS:生产组织正在运行 23 年春季发布。但是,当使用工具 API v57.0 来描述 SandboxInfo 对象时,没有名为 ActivationUserGroupId 的字段。
我刚刚使用
ActivationUserGroupId
测试了 SandboxInfo
并确认现在可以正常工作。我的请求是使用 API v57.0 发出的。
sandbox_data = {
'LicenseType': 'DEVELOPER',
'SandboxName': sandbox_name,
'ActivationUserGroupId': 'group_ID'
}