# Class groups (IRPCDocClassGroupsAdmin)

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Administration API](https://developer.m-files.com/APIs/gRPC-API/admin/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocClassGroupsAdmin/

Administers class groups: reads, adds, modifies and removes the groups that organize document
classes.

Use this interface to add, modify and delete document class groups in a vault.

- **gRPC service:** `MFiles.IRPCDocClassGroupsAdmin`
- **Book and level:** [Administration API](https://developer.m-files.com/APIs/gRPC-API/admin/index.md), specialized
- **Methods:** 4
- **Proto file:** [`mfiles/IRPCDocClassGroupsAdmin.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/IRPCDocClassGroupsAdmin.proto)

<a id="overview"></a>

## Overview

A class group bundles document classes. Class groups are items of the built-in value list 2.
M-Files Admin calls this service; applications read class groups with
[GetObjectClassesAndGroups](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefs/GetObjectClassesAndGroups/index.md), which
needs no special rights and also returns the classes with the caller's permissions.

- **Session and rights.** Every method requires a vault session.
  [GetDocClassGroups](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocClassGroupsAdmin/GetDocClassGroups/index.md) needs the vault
  right `read_all_metadata_structure` (a normal user gets "Access denied."). The write
  methods need `change_metadata_structure` and `license_allows_modifications`.
- **Calls**: [GetDocClassGroups](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocClassGroupsAdmin/GetDocClassGroups/index.md),
  [AddDocClassGroup](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocClassGroupsAdmin/AddDocClassGroup/index.md),
  [ModifyDocClassGroup](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocClassGroupsAdmin/ModifyDocClassGroup/index.md),
  [RemoveDocClassGroup](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocClassGroupsAdmin/RemoveDocClassGroup/index.md). The classes
  themselves are in [IRPCPropertyDefsAdmin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/index.md); value list 2
  cannot be edited with the item methods of
  [IRPCObjectTypesAdmin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypesAdmin/index.md).
- **Metadata structure version.** Every successful add, modify and remove increments the vault's metadata
  version when it commits. The methods do not send the `mfiles-metadata-version-bin` trailer;
  see [Metadata structure version and caching](https://developer.m-files.com/APIs/gRPC-API/concepts/metadata-structure-version-and-caching/index.md).

<a id="methods"></a>

## Methods

| Method | Summary | Facts |
|---|---|---|
| [AddDocClassGroup](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocClassGroupsAdmin/AddDocClassGroup/index.md) | Creates a class group. | `admin` `session` |
| [GetDocClassGroups](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocClassGroupsAdmin/GetDocClassGroups/index.md) | Gets all class groups with their member classes. | `admin` `session` `idempotent` |
| [ModifyDocClassGroup](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocClassGroupsAdmin/ModifyDocClassGroup/index.md) | Saves a changed class group: its name and member classes. | `admin` `session` `idempotent` |
| [RemoveDocClassGroup](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocClassGroupsAdmin/RemoveDocClassGroup/index.md) | Deletes a class group. | `admin` `session` |
