automation-suite
2023.4
false
- Démarrage
- Authentification
- Étendues et autorisations
- API de gestion de plate-forme
- [Aperçu] Obtenir les paramètres
- [Aperçu] Mettre à jour les paramètres
[Aperçu] Mettre à jour les paramètres
Important :
Veuillez noter que ce contenu a été localisé en partie à l’aide de la traduction automatique.
Guide d'Automation Suite
Last updated 11 nov. 2024
[Aperçu] Mettre à jour les paramètres
En tant qu'administrateur d'hôte ou d'organisation, utilisez ce point de terminaison pour mettre à jour les paramètres existants ou créer de nouveaux paramètres pour l'organisation et/ou l'ID utilisateur indiqués.
--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'
--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'
Remarque : pour obtenir le
{access_token}
, assurez-vous de vous authentifier via l'une des méthodes décrites ici.
Le corps de la demande contient l'ID de l'organisation et les clés de paramètre que vous souhaitez mettre à jour.
{
"settings": [
{
"key": "string",
"value": "string"
}
],
"partitionGlobalId": "string",
"userId": "string"
}
{
"settings": [
{
"key": "string",
"value": "string"
}
],
"partitionGlobalId": "string",
"userId": "string"
}
Supposons que vous ayez rassemblé toutes les informations nécessaires pour créer l'appel d'API.
- Votre
{baseURL}
est :https://{yourDomain}/{organizationName}/{tenantName}/
-
Votre
{access_token}
est :1234
(pour des considérations de longueur). - Le
{partitionGlobalId}
est :magic-7
- Pour mettre à jour les paramètres d'authentification, connectez-vous en tant qu'administrateur hôte.
L’appel devrait ressembler à l'exemple ci-dessous (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"
}'
Voici la réponse pour un appel réussi :
[
{
"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
}
]