Automation Suite
2021.10
バナーの背景画像
UiPath Automation Suite API ガイド
最終更新日 2024年4月19日

[プレビュー] ユーザーを更新する

指定したローカル ユーザーの情報を更新します。

API エンドポイント

docs imagehttps://{yourDomain}/identity_/api/User/{userId}

スコープ

次のスコープが必要です。

  • PM.User
  • PM.User.Write

要求ヘッダー

--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'
注: {access_token} を取得するには、必ずこちらで説明するいずれかの方法で認証を行ってください。

パス パラメーター

パラメーター

データ型

説明

userId

(必須)

文字列

更新するユーザーの ID です。

要求本文

要求本文には、更新するユーザー情報 (名前、メール アドレス、グループ メンバーシップなど) が含まれます。

{
  "name": "string",
  "surname": "string",
  "email": "user@example.com",
  "isActive": true,
  "password": "string",
  "groupIDsToAdd": [
    "string"
  ],
  "groupIDsToRemove": [
    "string"
  ],
  "bypassBasicAuthRestriction": true,
  "invitationAccepted": true
}{
  "name": "string",
  "surname": "string",
  "email": "user@example.com",
  "isActive": true,
  "password": "string",
  "groupIDsToAdd": [
    "string"
  ],
  "groupIDsToRemove": [
    "string"
  ],
  "bypassBasicAuthRestriction": true,
  "invitationAccepted": true
}

応答

200 OK

指定した情報でカスタム グループが更新されます。

400 Bad Request

更新を実行できませんでした。

{
    "errors": {
        "bypassBasicAuthRestriction": [
            "Unexpected character encountered while parsing value: h. Path 'bypassBasicAuthRestriction', line 17, position 35.",
            "Unexpected character encountered while parsing value: a. Path 'bypassBasicAuthRestriction', line 17, position 35."
        ]
    },
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "00-aec3de9099a9934e9c31e26c19f5e0dd-8c0d3d5f476c7742-00"
}{
    "errors": {
        "bypassBasicAuthRestriction": [
            "Unexpected character encountered while parsing value: h. Path 'bypassBasicAuthRestriction', line 17, position 35.",
            "Unexpected character encountered while parsing value: a. Path 'bypassBasicAuthRestriction', line 17, position 35."
        ]
    },
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "00-aec3de9099a9934e9c31e26c19f5e0dd-8c0d3d5f476c7742-00"
}

要求の例

API 呼び出しの構築に必要な情報をすべて収集したとします。

  • {baseURL}https://{yourDomain}/{organizationName}/{tenantName}/ です。
  • {access_token}1234 です (長さを考慮)。
  • ユーザー ID her-1909 の情報とメンバーシップを更新します。

呼び出しは以下のようになります (cURL)。

curl --location --request PUT 'https://{yourDomain}/{organizationName}/{tenantName}/identity_/api/User/her-1909' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json'
--data-raw '{
    "name": "Hermione",
    "surname": "Granger-Weasley",
    "email": "hermione@hogwarts.com",
    "groupIDsToAdd": [
        "gryff-01",
        "alumni-02",
        "teachers-03"
    ],
    "groupIDsToRemove": [],
    "bypassBasicAuthRestriction": false
}'curl --location --request PUT 'https://{yourDomain}/{organizationName}/{tenantName}/identity_/api/User/her-1909' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json'
--data-raw '{
    "name": "Hermione",
    "surname": "Granger-Weasley",
    "email": "hermione@hogwarts.com",
    "groupIDsToAdd": [
        "gryff-01",
        "alumni-02",
        "teachers-03"
    ],
    "groupIDsToRemove": [],
    "bypassBasicAuthRestriction": false
}'

呼び出しが成功した場合、応答は次のようになります。

{
    "succeeded": true,
    "errors": []
}{
    "succeeded": true,
    "errors": []
}
  • API エンドポイント
  • スコープ
  • 要求ヘッダー
  • パス パラメーター
  • 要求本文
  • 応答
  • 200 OK
  • 400 Bad Request
  • 要求の例

Was this page helpful?

サポートを受ける
RPA について学ぶ - オートメーション コース
UiPath コミュニティ フォーラム
UiPath ロゴ (白)
信頼とセキュリティ
© 2005-2024 UiPath. All rights reserved.