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

[プレビュー] 新しいローカル グループを作成する

指定した組織 ID に新しいローカル グループを作成し、指定したユーザーを追加します。

API エンドポイント

docs image https://{yourDomain}/identity_/api/Group

スコープ

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

  • PM.Group
  • PM.Group.Write

要求ヘッダー

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

要求本文

要求本文には、グループの追加先の組織 ID が含まれます。任意で、新しいグループのメンバーとして追加するユーザーも含まれます。

{
  "partitionGlobalId": "string",
  "id": "string",
  "name": "string",
  "directoryUserMemberIDs": [
    "string", "string"
  ]
}{
  "partitionGlobalId": "string",
  "id": "string",
  "name": "string",
  "directoryUserMemberIDs": [
    "string", "string"
  ]
}

応答

201 Successful

指定した組織内にカスタム グループが作成され、ID が取得されます。

要求の例

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

  • {baseURL}https://{yourDomain}/{organizationName}/{tenantName}/ です。
  • {access_token}1234 です (長さを考慮)。
  • {partitionGlobalId}magic-7 です。
  • グループ名は "Gryffindors" にします。
  • ユーザー Ron、Harry、Hermione をグループに追加します。各ユーザーのユーザー ID は次のとおりです。

    • Ron のユーザー ID: ron-0103
    • Harry のユーザー ID: har-3107
    • Hermione のユーザー ID: her-1909

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

curl --location --request POST 'https://{yourDomain}/{organizationName}/{tenantName}/identity_/api/Group' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json'
--data-raw '{
    "partitionGlobalId":"magic-7",
    "name":"Gryffindors",
    "id": "gryff-01",
    "directoryUserMemberIDs":
    ["ron-0103", "har-3107", "her-1909"]
}'curl --location --request POST 'https://{yourDomain}/{organizationName}/{tenantName}/identity_/api/Group' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json'
--data-raw '{
    "partitionGlobalId":"magic-7",
    "name":"Gryffindors",
    "id": "gryff-01",
    "directoryUserMemberIDs":
    ["ron-0103", "har-3107", "her-1909"]
}'

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

{
    "id": "gryff-01",
    "name": "Gryffindors",
    "displayName": "Gryffindors",
    "type": 1,
    "creationTime": "2021-10-19T15:37:49.1853184",
    "lastModificationTime": null,
    "members": [
        {
            "objectType": "DirectoryUser",
            "firstName": "Hermione",
            "lastName": "Granger",
            "jobTitle": "student",
            "companyName": "Hogwarts",
            "city": "London",
            "department": "magic",
            "displayName": "Hermione Granger",
            "source": "local",
            "identifier": "her-1909",
            "name": "Hermione",
            "email": "hermione@hogwarts.com"
        },
        {
            "objectType": "DirectoryUser",
            "firstName": "Harry",
            "lastName": "Potter",
            "jobTitle": ""student"",
            "companyName": "Hogwarts",
            "city": "London",
            "department": "magic",
            "displayName": "Harry Potter",
            "source": "local",
            "identifier": "har-3107",
            "name": "Harry",
            "email": "harry@hogwarts.com"
        },
        {
            "objectType": "DirectoryUser",
            "firstName": "Ron",
            "lastName": "Weasley",
            "jobTitle": "student",
            "companyName": "Hogwarts",
            "city": "London",
            "department": "magic",
            "displayName": "Ron Weasley",
            "source": "local",
            "identifier": "ron-0103",
            "name": "Ron",
            "email": "ron@hogwarts.com"
        }
    ]
}{
    "id": "gryff-01",
    "name": "Gryffindors",
    "displayName": "Gryffindors",
    "type": 1,
    "creationTime": "2021-10-19T15:37:49.1853184",
    "lastModificationTime": null,
    "members": [
        {
            "objectType": "DirectoryUser",
            "firstName": "Hermione",
            "lastName": "Granger",
            "jobTitle": "student",
            "companyName": "Hogwarts",
            "city": "London",
            "department": "magic",
            "displayName": "Hermione Granger",
            "source": "local",
            "identifier": "her-1909",
            "name": "Hermione",
            "email": "hermione@hogwarts.com"
        },
        {
            "objectType": "DirectoryUser",
            "firstName": "Harry",
            "lastName": "Potter",
            "jobTitle": ""student"",
            "companyName": "Hogwarts",
            "city": "London",
            "department": "magic",
            "displayName": "Harry Potter",
            "source": "local",
            "identifier": "har-3107",
            "name": "Harry",
            "email": "harry@hogwarts.com"
        },
        {
            "objectType": "DirectoryUser",
            "firstName": "Ron",
            "lastName": "Weasley",
            "jobTitle": "student",
            "companyName": "Hogwarts",
            "city": "London",
            "department": "magic",
            "displayName": "Ron Weasley",
            "source": "local",
            "identifier": "ron-0103",
            "name": "Ron",
            "email": "ron@hogwarts.com"
        }
    ]
}
  • API エンドポイント
  • スコープ
  • 要求ヘッダー
  • 要求本文
  • 応答
  • 201 Successful
  • 要求の例

Was this page helpful?

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