orchestrator
2021.10
false
重要 :
请注意此内容已使用机器翻译进行了部分本地化。
不在支持范围内
Orchestrator API 指南
Automation CloudAutomation Cloud Public SectorAutomation SuiteStandalone
Last updated 2024年10月31日

[预览] 更新设置

作为主机或组织管理员,使用此端点为指定的组织和/或用户 ID 更新现有设置或新建设置。

API 端点

PUT /identity_/api/Setting

作用域

需要以下作用域:

  • PM.Setting
  • PM.Setting.Write

请求标头

--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'
注意:如要获取 {access_token},请确保通过此处描述的其中一种方法进行身份验证。

请求正文

请求正文包含组织 ID 和要更新的设置键。

{
  "settings": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "partitionGlobalId": "string",
  "userId": "string"
}{
  "settings": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "partitionGlobalId": "string",
  "userId": "string"
}

响应

200 OK

系统将使用您提供的信息更新设置。

请求示例

假设您收集了构建 API 调用所需的所有信息。

  • 您的 {baseURL} 为:https://{yourDomain}/{organizationName}/{tenantName}/
  • 您的 {access_token} 为:1234(出于长度考虑)。
  • {partitionGlobalId} 为:magic-7
  • 您需要更新身份验证设置,以便以主机管理员身份登录。

调用应如下所示 (cURL):

curl --location --request PUT 'https://{yourDomain}/{organizationName}/{tenantName}/identity_/api/Setting' \)\)
--header 'Authorization: Bearer 1234' \)\)
--header 'Content-Type: application/json'
--data-raw '
{
    "settings": [
        {
            "key": "Auth.Password.DefaultExpirationDays",
            "value": "0"
        },
        {
            "key": "Auth.Password.PasswordComplexity",
             "value": "{\"hasSpecialCharacter\":false,\"hasLowercase\":true,\"hasUppercase\":false,\"hasDigit\":true,\"Length\":\"10\"}" 
        },
        {
            "key": "Auth.Password.PreviousUseLimit",
            "value": "1"
        },
        {
            "key": "Auth.Password.ShouldChangePasswordAfterFirstLogin",
            "value": "true"
        },
        {
            "key": "Auth.UserLockOut.DefaultAccountLockoutSeconds",
            "value": "0"
        },
        {
            "key": "Auth.UserLockOut.IsEnabled",
            "value": "false"
        },
        {
            "key": "Auth.UserLockOut.MaxFailedAccessAttemptsBeforeLockout",
            "value": "2"
        }
    ],
    "partitionGlobalId": "magic-7"
}'curl --location --request PUT 'https://{yourDomain}/{organizationName}/{tenantName}/identity_/api/Setting' \)\)
--header 'Authorization: Bearer 1234' \)\)
--header 'Content-Type: application/json'
--data-raw '
{
    "settings": [
        {
            "key": "Auth.Password.DefaultExpirationDays",
            "value": "0"
        },
        {
            "key": "Auth.Password.PasswordComplexity",
             "value": "{\"hasSpecialCharacter\":false,\"hasLowercase\":true,\"hasUppercase\":false,\"hasDigit\":true,\"Length\":\"10\"}" 
        },
        {
            "key": "Auth.Password.PreviousUseLimit",
            "value": "1"
        },
        {
            "key": "Auth.Password.ShouldChangePasswordAfterFirstLogin",
            "value": "true"
        },
        {
            "key": "Auth.UserLockOut.DefaultAccountLockoutSeconds",
            "value": "0"
        },
        {
            "key": "Auth.UserLockOut.IsEnabled",
            "value": "false"
        },
        {
            "key": "Auth.UserLockOut.MaxFailedAccessAttemptsBeforeLockout",
            "value": "2"
        }
    ],
    "partitionGlobalId": "magic-7"
}'

以下是成功调用的响应:

[
    {
        "id": 4,
        "key": "Auth.Password.DefaultExpirationDays",
        "value": "0",
        "partitionGlobalId": "magic-7",
        "userId": null
    },
    {
        "id": 1,
        "key": "Auth.Password.PasswordComplexity",
        "value": "{\"HasDigit\":true,\"HasLowercase\":true,\"HasSpecialCharacter\":false,\"HasUppercase\":false,\"Length\":10,\"RegexComplexity\":{\"HasDigitRegex\":\"(?=.*\\\\d)\",\"HasLowercaseRegex\":\"(?=.*[a-z])\",\"HasSpecialCharacterRegex\":\"(?=.*[^a-zA-Z\\\\d])\",\"HasUppercaseRegex\":\"(?=.*[A-Z])\",\"LengthRegex\":\"{10,}\",\"Regex\":\"(?=.*\\\\d)(?=.*[a-z]).{10,}\"}}", 
        "partitionGlobalId": "magic-7",
        "userId": null
    },
    {
        "id": 3,
        "key": "Auth.Password.PreviousUseLimit",
        "value": "1",
        "partitionGlobalId": "magic-7",
        "userId": null
    },
    {
        "id": 2,
        "key": "Auth.Password.ShouldChangePasswordAfterFirstLogin",
        "value": "true",
        "partitionGlobalId": "magic-7",
        "userId": null
    },
    {
        "id": 26,
        "key": "Auth.UserLockOut.DefaultAccountLockoutSeconds",
        "value": "0",
        "partitionGlobalId": "magic-7",
        "userId": null
    },
    {
        "id": 27,
        "key": "Auth.UserLockOut.IsEnabled",
        "value": "false",
        "partitionGlobalId": "magic-7",
        "userId": null
    },
    {
        "id": 28,
        "key": "Auth.UserLockOut.MaxFailedAccessAttemptsBeforeLockout",
        "value": "2",
        "partitionGlobalId": "magic-7",
        "userId": null
    }
][
    {
        "id": 4,
        "key": "Auth.Password.DefaultExpirationDays",
        "value": "0",
        "partitionGlobalId": "magic-7",
        "userId": null
    },
    {
        "id": 1,
        "key": "Auth.Password.PasswordComplexity",
        "value": "{\"HasDigit\":true,\"HasLowercase\":true,\"HasSpecialCharacter\":false,\"HasUppercase\":false,\"Length\":10,\"RegexComplexity\":{\"HasDigitRegex\":\"(?=.*\\\\d)\",\"HasLowercaseRegex\":\"(?=.*[a-z])\",\"HasSpecialCharacterRegex\":\"(?=.*[^a-zA-Z\\\\d])\",\"HasUppercaseRegex\":\"(?=.*[A-Z])\",\"LengthRegex\":\"{10,}\",\"Regex\":\"(?=.*\\\\d)(?=.*[a-z]).{10,}\"}}", 
        "partitionGlobalId": "magic-7",
        "userId": null
    },
    {
        "id": 3,
        "key": "Auth.Password.PreviousUseLimit",
        "value": "1",
        "partitionGlobalId": "magic-7",
        "userId": null
    },
    {
        "id": 2,
        "key": "Auth.Password.ShouldChangePasswordAfterFirstLogin",
        "value": "true",
        "partitionGlobalId": "magic-7",
        "userId": null
    },
    {
        "id": 26,
        "key": "Auth.UserLockOut.DefaultAccountLockoutSeconds",
        "value": "0",
        "partitionGlobalId": "magic-7",
        "userId": null
    },
    {
        "id": 27,
        "key": "Auth.UserLockOut.IsEnabled",
        "value": "false",
        "partitionGlobalId": "magic-7",
        "userId": null
    },
    {
        "id": 28,
        "key": "Auth.UserLockOut.MaxFailedAccessAttemptsBeforeLockout",
        "value": "2",
        "partitionGlobalId": "magic-7",
        "userId": null
    }
]
  • API 端点
  • 作用域
  • 请求标头
  • 请求正文
  • 响应
  • 200 OK
  • 请求示例

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo White
信任与安全
© 2005-2024 UiPath。保留所有权利。