Request

Response

    Change Member Roles

    This topic provides instructions on how to:

    • Change the role of a folder member.
    • Change the role of a project member.

    You will use the following operations in this topic:

    TypeOperationDescription
    Query changeFolderMemberRole Changes the role of a folder member.
    Query changeProjectMemberRole Changes the role of a project member.

    Step 1 - Change Folder Member Role

    The following steps demonstrate how you can run the changeFolderMemberRole query to change the role of a folder member.

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

      Query

      mutation changeFolderMemberRole($input: ChangeFolderMemberRoleInput!) {
         changeFolderMemberRole(input: $input) {
            folder {
               id
            }
         }
      }
      
    2. In the Query Variables Pane, enter the following values:

      • emailAddress: The email address of the member whose role you want to change.
      • projectId: The ID of the project that contains the folder where you want to change the member’s role. To know how to obtain the projectId , refer to Retrieve Projects.
      • folderId: The ID of the specific folder where you want to change the member’s role. To know how to obtain the folderId, refer to Retrieve Folders.
      • memberRole: The new role you want to assign to the member. For information on the types of roles that can be assigned, refer to Hub Member Role.

      Query Variables

      {
         "input":{
            "emailAddress": "user1@yopmail.com",
            "projectId": "urn:adsk.workspace:beta.project:3ee562b4-12b1-4e21-9ce3-b86c1989f341",
            "folderId": "urn:adsk.wipstg:fs.folder:co.jHuygK-PSBmcA_zeFLF4Wg",
            "memberRole" : "READER"
         }
      }
      
      Show More
    3. Click Play. All the members with the specified email addresses will be added to the hub.

      Response

      {
         "data": {
            "changeFolderMemberRole": {
               "folder": {
                  "id": "urn:adsk.wipstg:fs.folder:co.49KLb4EBTJWNOZq9a2xZTw"
               }
            }
         }
      }
      
      Show More

    Step 2 - Change Project Member Role

    The following steps demonstrate how you can run the changeProjectMemberRole mutation to change the role of a project member.

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

      Query

      mutation ChangeProjectMemberRole($input: ChangeProjectMemberRoleInput!) {
         changeProjectMemberRole(input: $input) {
            project {
               id
            }
         }
      }
      
    2. In the Query Variables Pane, enter the following values:

      • emailAddress: The email address of the member whose role you want to change.
      • projectId: The ID of the project that contains the folder where you want to change the member’s role. To know how to obtain the projectId , refer to Retrieve Projects.
      • memberRole: The new role you want to assign to the member. For information on the types of roles that can be assigned, refer to Hub Member Role.

      Query Variables

      {
         "input":{
            "projectId": "urn:adsk.workspace:beta.project:fdd03533-c3b1-4d26-957e-81594258ae61",
            "memberRole" : "EDITOR",
            "emailAddress": "user1@yopmail.com"
         }
      }
      
    3. Click Play. All the members with the specified email addresses will be added to the hub.

      Response

      {
         "data": {
            "changeProjectMemberRole": {
               "project": {
                  "id": "urn:adsk.workspace:beta.project:fdd03533-c3b1-4d26-957e-81594258ae61"
               }
            }
         }
      }
      
      Show More