Request

Response

    Mutations

    addGroupsToProject

    mutation

    Add groups to a project.

    Template for Mutation:

    mutation AddGroupsToProject($input: addGroupsToProjectInput!){
      addGroupsToProject(input: $input) {
        # AddGroupsToProjectPayload Fields
      }
    }
    

    Arguments

    input*Input object for adding groups to a project.
    * Required

    Possible Returns

    Value TypeDescription
    AddGroupsToProjectPayload Return payload on add groups to project operation.


    Examples

    Example 1

    Add groups to project.

    Query:

     mutation addGroupsProject($input: AddGroupsToProjectInput!) {
     addGroupsToProject(input: $input) {
       project {
         id
         name
         groups {
           results{
               id
               name
           }
         }
       }
     }
    }
    
    Show More

    Query Variables:

    {
     "input": {
      "groupIds": ["566929135"],
       "groupRole": "EDITOR",
       "projectId": "urn:adsk.workspace:beta.project:e0b62c50-ed1d-4322-a951-a05e2d75845a"
     }
    }
    

    Response:

    {
       "data": {
           "addGroupsToProject": {
               "project": {
                   "id": "urn:adsk.workspace:beta.project:e0b62c50-ed1d-4322-a951-a05e2d75845a",
                   "name": "Docs Project",
                   "groups": {
                       "results": [
                           {
                               "id": "327741550",
                               "name": "admins"
                           },
                           {
                               "id": "566929135",
                               "name": "DocGroup1793373238084"
                           }
                       ]
                   }
               }
           }
       }
    }
    
    Show More