Request

Response

    Add Or Invite Members

    This topic provides instructions on how to add members to a hub.

    You will use the following query in this topic:

    TypeOperationDescription
    Query addHubMembers Add members to a hub.

    Step 1 - Add Members to a Hub

    The following steps demonstrate how you can run the addHubMembers query to add members to a hub.

    1. Enter the following query in the Query Pane of the Manufacturing Data Model Explorer.

      Query

      mutation AddHubMembers($input: AddHubMembersInput!) {
             addHubMembers(input: $input) {
                 hub {
                     name
                     members {
                         results {
                             user {
                                 id
                                 lastName
                                 lastModifiedOn
                                }
                              }
                            }
                          }
                        }
                      }
      
      Show More
    2. In the Query Variables Pane, enter the value of the hubId and the list of email addresses of the members you want to add to the hub. To know how to obtain the hubId, refer to Retrieve Hubs.

      Query Variables

      {
      "input": {
          "hubId": "urn:adsk.ace:beta.scope:e7c7f5a9-a88a-40b4-85f6-ba1454def997",
          "emailAddresses": [
              "TestUser_IdPR_60600C092E_Test@mailinator.com",
              "user1@yopmail.com"
          ]
      }
      }
      
      Show More
    3. Click Play. All the members with the specified email addresses will be added to the hub.

      Response

      {
        "data": {
            "addHubMembers": {
                "hub": {
                    "name": "stg-hds-test-hub",
                    "members": {
                        "results": [
                            {
                                "user": {
                                    "id": "5MF22T98KDZVCXAD",
                                    "lastName": "Khedkar",
                                    "lastModifiedOn": "2023-03-10T21:09:09.000Z"
                                }
                            },
                            {
                                "user": {
                                    "id": "VM4JYMC4QEZRZWXK",
                                    "lastName": "Singh",
                                    "lastModifiedOn": "2022-05-16T09:50:17.000Z"
                                }
                            },
                            {
                                "user": {
                                    "id": "B4PJ8ZH8KBCUSWJN",
                                    "lastName": "Debnath",
                                    "lastModifiedOn": "2022-09-07T20:28:10.000Z"
                                }
                            },
                            {
                                "user": {
                                    "id": "XV42K7XEJ3PG7626",
                                    "lastName": "Pathak",
                                    "lastModifiedOn": "2022-04-08T06:53:33.000Z"
                                }
                            },
                            {
                                "user": {
                                    "id": "MRJJXC4HNJFS2Y8W",
                                    "lastName": "Shukla",
                                    "lastModifiedOn": "2022-09-07T20:27:40.000Z"
                                }
                            },
                            {
                                "user": {
                                    "id": "22223ZSERD2CEJD6",
                                    "lastName": "User Last name",
                                    "lastModifiedOn": "2023-01-04T05:08:17.000Z"
                                }
                            },
                            {
                                "user": {
                                    "id": "VXBAL5H7DN96",
                                    "lastName": "Drewery Schoeler",
                                    "lastModifiedOn": "2022-10-25T14:36:22.000Z"
                                }
                            },
                            {
                                "user": {
                                    "id": "MHL2DTVKNTQ27PJE",
                                    "lastName": "Lovanshi",
                                    "lastModifiedOn": "2022-09-07T13:43:33.000Z"
                                }
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
      
      Show More