2024.10.01

  • Added Custom Roles functionality

New features are documented in the Custom Roles Overview

2024.07.10

  • Added options for direct and inherited access to UserAccessFilter for objectAccess query in user.schema

As part of this change, existing filter behavior is updated. If using FolderShares filter, only folders that are directly shared with the given user will be returned (previously, both direct and inherited shares will be returned as part of this filter). Similar changes are added for ModelShares, UserGroupFolderShares, and UserGroupModelShares.

2023.07.20

  • Add lastLogin field to Membership (UserMembership) type

2023.06.28

  • Add UnitType enum with imperial and metric values.
  • Add unitType to Organization, OrganizationSettings and OrganizationSettingsInput types.

2022.01.18

Changes to access query in user.schema

  • Added ID for the resource (denoting SID of the resource) in AccessInfo type for access query

2022.12.14

API Changes

  • Making access query in user.schema to be beta
query {
  organization {
    memberships {
      results {
        user(id: "$userId") {
          access(
            filters: [FolderCreator, FolderShares]
            orderBy: ROLE
            sortOrder: desc
          ) {
            results {
              email
              type
              name
              role
            }
            nextOffset
          }
        }
      }
    }
  }
}

2022.11.16

API Changes

  • Account Membership search now filters out banned users
  • Account Membership search now allows us to query email, lastName, firstName
# Get memberships on an org with emails that contain matterport
query {
  organization {
    id
    memberships(field: email, query: "matterport") {
      results {
        user {
          id
          email
        }
        status
      }
    }
  }
}
  • We added the ability to order membership search results
# Membership search with ordering
query {
  organization {
    id
    memberships(
      field: email
      query: "matterport"
      sortBy: [
        { field: last_name, order: desc }
        { field: first_name }
        { field: last_login, order: asc }
      ]
    ) {
      results {
        user {
          id
          email
          lastName
          lastLogin
          firstName
        }
        status
      }
    }
  }
}

Bug Fixes and Other Enhancements

  • fixed the query field for org/account memberships

2022.10.26

  • Sandbox mode is now blocked on the Account API because there is no specific behavior for this mode on this API.

  • folderShares and folderShareAccessLevels queries no longer beta

2022.09.21

This changes the default serialization of fields with errors or no data from being left out of the response to serializing null explicitly (this is more compliant with the GraphQL standard). There is a graph query which may be used to opt an org out of this behavior to the previous behaviour:

Try it in our interactive console

query getSerialization($orgId: ID) {
  organization(id: $orgId) {
    id
    developer {
      options {
        serializeGraphNulls
      }
    }
  }
}

mutation disableSerializeNulls($orgId: ID) {
  patchDeveloperOptions(organizationId: $orgId, serializeGraphNulls: disabled) {
    serializeGraphNulls
  }
}

mutation enableSerializeNulls($orgId: ID) {
  patchDeveloperOptions(organizationId: $orgId, serializeGraphNulls: enabled) {
    serializeGraphNulls
  }
}

2022.09.07

  • This release exposes full folder manipulation (within org) create, edit, share, move and delete folders. (private beta)

Bug Fixes and Other Enhancements:

  • Allow modelShare queries to filter based on multiple access levels instead of a single one.
# A paginated search to get a list of all the model shares satisfying given query

query {
  organization {
    modelShares(

      # A query string to search for. If the query is not provided, all the results for given organization are returned.
      query: String,

      # If supplied, the query string only searches this field
      field: ModelSharesSearchField,

      # Filter based on the access level granted to user. If more than one level is selected, shares with access given with either level is shown (an OR operation is performed)

      accessLevel: [ModelShareAccess],

      # Desired number of entries in a page of results. If not specified, default will be 10

      pageSize: Int,

      # The offset value to apply, if omitted will start with the first matching result. The result list's 'nextOffset' property provides the offset value for the next page of results.

      offset: String
    ): UserModelShareAccessList
  }
}
  • Query results are returned sorted by created date in descending order.

2022.08.24

This release added mutation to clear default upload folder while deprecating listRoles and model share mutations

  • Rename listRoles to roles:
# List all the roles associated with the account.
# @deprecated v2022.08.24 Use roles instead
query {
  organization {
    listRoles: [OrganizationRole]
  }
}
  • Add mutation to clear default upload folder for a user:

# Clear the default upload folder a user
mutation {
  clearDefaultUploadFolder(
    # ID of the user
    userId: ID!
  ): Boolean
}

  • Deprecated addOrUpdateModelShareAccess and removeModelShareAccess, moving it to model api:
# Add access to a given model for a user with the given role. If the user already has access to the given model, update user role with the given role. Returns the ID of the model that was added/updated.
# @deprecated

mutation {
  addOrUpdateModelShareAccess(
    organizationId: ID,
    userId: ID!,
    roleId: ID!,
    modelId: ID!
  ): UserModelShareAccess
}

# Remove access to a given model for a user.
# @deprecated
mutation {
  removeModelShareAccess(
    organizationId: ID,
    userId: ID!,
    modelId: ID!
  ): Boolean!
}

2022.07.28

This release changes query to list access levels for model shares.

  • Rename listModelShareAccessLevels to modelShareAccessLevels:

# List all the model access levels.
# @deprecated use modelShareAccessLevels instead

query {
  organization {
    listModelShareAccessLevels: [ModelShareAccessLevel]
  }
}

# List all the model access levels.
query {
  organization {
    modelShareAccessLevels: [ModelShareAccessLevel]
  }
}

v2022.05.26

This release adds support to manage default upload folders as well as manage user access to a given space.

  • Query or Update default upload folders for a given user :

# Update default upload folder id for a given user

mutation {
  updateDefaultUploadFolder(
    # User ID
    userId: ID!,

    # Default folder id will be updated to the given value
    folderId: ID!
  ): UserMembership
}

  • Query model shares based on the given criteria

# A paginated search to get a list of all the model shares satisfying given query

query {
  organization {
    modelShares(

      # A query string to search for. If the query is not provided, all the results for given organization are returned.
      query: String,

      # If supplied, the query string only searches this field
      field: ModelSharesSearchField,

      # Filter based on the access level granted to user
      accessLevel: ModelShareAccess,

      # Desired number of entries in a page of results. If not specified, default will be 10
      pageSize: Int,

      # The offset value to apply, if omitted will start with the first matching result. The result list's 'nextOffset' property provides the offset value for the next page of results.

      offset: String

    ): UserModelShareAccessList
  }
}

# List all the model access levels.
query {
  organization {
    listModelShareAccessLevels: [ModelShareAccessLevel]
  }
}

  • Manage user access to a given space

# Add access to a given model for a user with the given role. If the user already has access to the given model, update user role with the given role. Returns the ID of the model that was added/updated.

query {
  organization {
    addOrUpdateModelShareAccess(
        userId: ID!,
        roleId: ID!,
        modelId: ID!
    ): UserModelShareAccess
  }
}

# Remove access to a given model for a user.

query {
  organization {
    removeModelShareAccess(
      userId: ID!,
      modelId: ID!
    ): Boolean!
  }
}

Examples for given query and mutations:

# Query to get default upload folder

query {
organization {
  membershipByEmail(email:"webmaster@matterport.com") {
    defaultUploadFolder {
      path
      id
      creator {
        id
        email
        firstName
        lastName
      }
    }
  }
}

# Query for model shares for a given user

query {
  organization {
    modelShares (field: userId, query: "r6wRPLhXvjz", pageSize:20) {
      results {
        user {
          id
          email
        }
        modelId
        modelShareAccessLevel {
          name
          id
        }
      }
    }
  }
}

# Add or update model share for a given user

mutation {
  addOrUpdateModelShareAccess(userId:"r6wRPLhXvjz", modelId:"pcJ2TYcQPDo", roleId:"00000000002") {
    user {
      email
    }
    modelId
    modelShareAccessLevel {
      name
    }
  }
}

# Remove user access to a given space
mutation {
  removeModelShareAccess(userId:"r6wRPLhXvjz", modelId:"pcJ2TYcQPDo")
}