# Property definition and class administration (IRPCPropertyDefsAdmin)

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.IRPCPropertyDefsAdmin/

Administers property definitions and classes: reads their full definitions, adds, modifies and
removes them, and starts recalculation of automatic values.

Use this interface to add, modify and remove property definitions.

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

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

## Overview

This is the administrator's side of [IRPCPropertyDefs](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefs/index.md).
M-Files Admin and administrative tools call it; ordinary applications read property definitions
and classes with the Vault API instead.

| | Vault API (read side) | This service |
| --- | --- | --- |
| Property definitions | [GetPropertyDefs](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefs/GetPropertyDefs/index.md): [PropertyDef](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.PropertyDef/index.md) | [GetPropertyDefsAdmin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/GetPropertyDefsAdmin/index.md): [PropertyDefAdmin](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.PropertyDefAdmin/index.md), adding automatic value and validation settings and aliases |
| Classes | [GetObjectClassesAndGroups](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefs/GetObjectClassesAndGroups/index.md) | [GetObjectClasses](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/GetObjectClasses/index.md): [DocClass](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.DocClass/index.md), with workflow, name property and aliases |
| Rights | none | see below |

- **Session and rights.** Every method requires a vault session. Writes need the vault rights
  `change_metadata_structure` and `license_allows_modifications`. Most reads need
  `read_all_metadata_structure`;
  [GetObjectClasses](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/GetObjectClasses/index.md) and
  [GetAssociatedPropertyDefs](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/GetAssociatedPropertyDefs/index.md)
  need no vault rights. Setting or changing VBScript code needs a
  code-execution right (see [AddPropertyDef](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/AddPropertyDef/index.md)).
- **Property definitions**:
  [GetPropertyDefsAdmin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/GetPropertyDefsAdmin/index.md),
  [GetPropertyDefAdmin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/GetPropertyDefAdmin/index.md),
  [AddPropertyDef](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/AddPropertyDef/index.md),
  [UpdatePropertyDef](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/UpdatePropertyDef/index.md),
  [RemovePropertyDef](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/RemovePropertyDef/index.md),
  [GetLastUsedValue](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/GetLastUsedValue/index.md),
  [IsPropertyFullTextSearchIndexable](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/IsPropertyFullTextSearchIndexable/index.md).
- **Classes**:
  [GetObjectClasses](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/GetObjectClasses/index.md),
  [GetAssociatedPropertyDefs](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/GetAssociatedPropertyDefs/index.md),
  [AddObjectClass](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/AddObjectClass/index.md),
  [ModifyObjectClass](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/ModifyObjectClass/index.md),
  [RemoveObjectClass](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/RemoveObjectClass/index.md). Class groups
  are in [IRPCDocClassGroupsAdmin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDocClassGroupsAdmin/index.md).
- **Update existing objects** (server-level jobs):
  [RecalculateProperty](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/RecalculateProperty/index.md),
  [UpdateObjectNames](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/UpdateObjectNames/index.md).

**Metadata structure version.** Adding, updating and removing a property definition increments both
`property_defs_version` and the vault's metadata structure version (see
[GetMetadataStructureVersion](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVault/GetMetadataStructureVersion/index.md)); class
changes increment the metadata structure version.
The methods of this service 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 |
|---|---|---|
| [AddObjectClass](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/AddObjectClass/index.md) | Creates a class with its property associations. | `admin` `session` |
| [AddPropertyDef](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/AddPropertyDef/index.md) | Creates a property definition. | `admin` `session` |
| [GetAssociatedPropertyDefs](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/GetAssociatedPropertyDefs/index.md) | Gets the properties of a class: the property definitions associated with it and whether each is required. | `admin` `session` `idempotent` |
| [GetLastUsedValue](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/GetLastUsedValue/index.md) | Gets the last number used by an automatic numbering property. | `admin` `session` `idempotent` |
| [GetObjectClasses](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/GetObjectClasses/index.md) | Gets the administrative definitions of all classes. | `admin` `session` `idempotent` |
| [GetPropertyDefAdmin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/GetPropertyDefAdmin/index.md) | Gets the administrative definition of one property definition. | `admin` `session` |
| [GetPropertyDefsAdmin](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/GetPropertyDefsAdmin/index.md) | Gets the administrative definitions of all property definitions. | `admin` `session` `idempotent` |
| [IsPropertyFullTextSearchIndexable](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/IsPropertyFullTextSearchIndexable/index.md) | Tells whether the values of a property definition are indexed for full-text search. | `admin` `session` `idempotent` |
| [ModifyObjectClass](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/ModifyObjectClass/index.md) | Saves a changed class and, optionally, its property associations. | `admin` `session` `idempotent` |
| [RecalculateProperty](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/RecalculateProperty/index.md) | Starts a server job that recalculates the automatic values of a property in all existing objects. | `admin` `session` |
| [RemoveObjectClass](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/RemoveObjectClass/index.md) | Deletes a class. | `admin` `session` |
| [RemovePropertyDef](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/RemovePropertyDef/index.md) | Deletes a property definition and its values from all objects, or only counts the values that would be removed. | `admin` `session` |
| [UpdateObjectNames](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/UpdateObjectNames/index.md) | Starts a server job that recalculates the names of all objects of a class from the class's name property. | `admin` `session` |
| [UpdatePropertyDef](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCPropertyDefsAdmin/UpdatePropertyDef/index.md) | Saves a changed property definition. | `admin` `session` `idempotent` |
