# IRPCDeclarativeMetadataStructureAsProtobuf.GetDeclarativeMetadataStructureAsProtobuf

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) > [Declarative metadata structure (protobuf)](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDeclarativeMetadataStructureAsProtobuf/index.md)

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

Badges: `Administration API / specialized` `internal: not for applications` `admin` `session` `returns metadata structure version`

Gets the vault's current metadata structure as one typed message.

- **Service:** [Declarative metadata structure (protobuf)](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDeclarativeMetadataStructureAsProtobuf/index.md) `MFiles.IRPCDeclarativeMetadataStructureAsProtobuf`
- **gRPC method:** `/MFiles.IRPCDeclarativeMetadataStructureAsProtobuf/GetDeclarativeMetadataStructureAsProtobuf`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-declarative-metadata-structure-as-protobuf`
- **Request:** [`GetDeclarativeMetadataStructureAsProtobufRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDeclarativeMetadataStructureAsProtobuf/GetDeclarativeMetadataStructureAsProtobuf/index.md#request)
- **Response:** [`GetDeclarativeMetadataStructureAsProtobufResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDeclarativeMetadataStructureAsProtobuf/GetDeclarativeMetadataStructureAsProtobuf/index.md#response)
- **Book and level:** Administration API, specialized
- **Kind:** admin
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** no
- **Returns metadata structure version:** yes (in the mfiles-metadata-version-bin trailer)
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

- Fails with "Not implemented." unless the feature is enabled on the server.
- Requires `change_metadata_structure`.
- Always returns the current structure: the server does not read `revision`.
- `mds.revision` is the revision to send back with
  [SetDeclarativeMetadataStructureAsProtobuf](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDeclarativeMetadataStructureAsProtobuf/SetDeclarativeMetadataStructureAsProtobuf/index.md).

<a id="request"></a>

## Request: GetDeclarativeMetadataStructureAsProtobufRequest

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `revision` | `int32` | Not used by the server; the current structure is returned. |

<a id="response"></a>

## Response: GetDeclarativeMetadataStructureAsProtobufResponse

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `mds` | [`DeclarativeMetadataStructure`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.DeclarativeMetadataStructure/index.md) | The complete metadata structure. |
| `mds.revision` | `int32` | Base revision. This is meaningful only if Revision is negative, indicating that the metadata structure is based on a local MFServer revision. In that case, this property indicates the actual revision that the local revision is based on. It may also be zero, which means that there has not been any actual revision deployed to MFServer, and the local revision is based on the initial state of MFServer before any revisions have been deployed. |
| `mds.revision_base` | `int32` | Actual revision-based metadata structure. |
| `mds.object_types[]` | repeated [`ObjectTypeDecl`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectTypeDecl/index.md) | An array of the ObjectTypeDecl structures. |
| `mds.object_types[].ot_admin` | [`ValueListAdmin`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ValueListAdmin/index.md) | Object type admin data. |
| `mds.object_types[].icon` | [`MetadataStructureResourceRef`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.MetadataStructureResourceRef/index.md) | The icon resource reference. |
| `mds.object_types[].secrets[]` | repeated [`MetadataStructureSecretRef`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.MetadataStructureSecretRef/index.md) | Per-language translations. |
| `mds.object_types[].translations[]` | repeated [`ElementTranslationsDecl`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ElementTranslationsDecl/index.md) | Per-language translations. |
| `mds.object_types[].unknown_json` | `string` | Opaque JSON object of schema-recognized, converter-unmapped properties for this element, keyed by original property name. |
| `mds.value_lists[]` | repeated [`ObjectTypeDecl`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectTypeDecl/index.md) | An array of the ObjectTypeDecl structures. |
| `mds.value_lists[].ot_admin` | [`ValueListAdmin`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ValueListAdmin/index.md) | Object type admin data. |
| `mds.value_lists[].icon` | [`MetadataStructureResourceRef`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.MetadataStructureResourceRef/index.md) | The icon resource reference. |
| `mds.value_lists[].secrets[]` | repeated [`MetadataStructureSecretRef`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.MetadataStructureSecretRef/index.md) | Per-language translations. |
| `mds.value_lists[].translations[]` | repeated [`ElementTranslationsDecl`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ElementTranslationsDecl/index.md) | Per-language translations. |
| `mds.value_lists[].unknown_json` | `string` | Opaque JSON object of schema-recognized, converter-unmapped properties for this element, keyed by original property name. |
| `mds.classes[]` | repeated [`ObjectClassDecl`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectClassDecl/index.md) | An array of the ObjectClassDecl structures. |
| `mds.classes[].base_info` | [`ValueListItemDecl`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ValueListItemDecl/index.md) | Value list item representing this element. |
| `mds.classes[].aliases` | `string` | Semicolon-separated list of semantic aliases. |
| `mds.classes[].object_type` | `int32` | The object type with which this class is used. |
| `mds.classes[].is_predefined` | `bool` | True if this is a predefined class (cannot be deleted, editing is restricted). |
| `mds.classes[].associated_property_defs[]` | repeated [`AssociatedPropertyDef`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AssociatedPropertyDef/index.md) | PropertyDefs associated with this class. |
| `mds.classes[].name_property_def` | `int32` | The ID of the property definition that represents the name of the document or other object. Typically PROPERTYDEF_TITLE (0). |
| `mds.classes[].default_workflow` | `int32` | The default workflow of the document class, or zero if there is no default workflow. |
| `mds.classes[].force_workflow` | `bool` | True if the use of the specified workflow is forced. |
| `mds.classes[].acl` | [`AccessControlList`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlList/index.md) | Specifies the ACL that defines the visibility and other permission settings of this class. Also specifies who can attach objects to this class. |
| `mds.classes[].signature_settings_for_new_objects` | [`ElectronicSignatureSettings`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ElectronicSignatureSettings/index.md) | The electronic signature settings for creating an electronic signature for new objects. Reserved for future improvements. |
| `mds.classes[].assignment_class_info` | [`AssignmentClassInfo`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AssignmentClassInfo/index.md) | Assignment class info. |
| `mds.classes[].unknown_json` | `string` | Opaque JSON object of schema-recognized, converter-unmapped properties for this element, keyed by original property name. |
| `mds.class_groups[]` | repeated [`ObjectClassGroupDecl`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectClassGroupDecl/index.md) | An array of the ObjectClassGroupDecl structures. |
| `mds.class_groups[].base_info` | [`ValueListItemDecl`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ValueListItemDecl/index.md) | Value list item representing this element. |
| `mds.class_groups[].object_class_group` | [`ClassGroup`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ClassGroup/index.md) | Other information on the class group. |
| `mds.class_groups[].aliases` | `string` | Semicolon-separated list of semantic aliases. |
| `mds.class_groups[].acl` | [`AccessControlList`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlList/index.md) | Specifies the ACL that defines the visibility and other permission settings of this class. Also specifies who can attach objects to this class. |
| `mds.class_groups[].unknown_json` | `string` | Opaque JSON object of schema-recognized, converter-unmapped properties for this element, keyed by original property name. |
| `mds.property_defs[]` | repeated [`PropertyDefDecl`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.PropertyDefDecl/index.md) | An array of the PropertyDefDecl structures. |
| `mds.property_defs[].pd_admin` | [`PropertyDefAdmin`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.PropertyDefAdmin/index.md) | Property definition admin data. |
| `mds.property_defs[].icon` | [`MetadataStructureResourceRef`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.MetadataStructureResourceRef/index.md) | Per-language translations. |
| `mds.property_defs[].translations[]` | repeated [`ElementTranslationsDecl`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ElementTranslationsDecl/index.md) | Per-language translations. |
| `mds.property_defs[].automatic_numbering_code` | [`MetadataStructureResourceRef`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.MetadataStructureResourceRef/index.md) | The automatic numbering VBScript resource reference. |
| `mds.property_defs[].calc_with_vbscript` | [`MetadataStructureResourceRef`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.MetadataStructureResourceRef/index.md) | The calculated-value VBScript resource reference. |
| `mds.property_defs[].validation_code` | [`MetadataStructureResourceRef`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.MetadataStructureResourceRef/index.md) | The validation VBScript resource reference. |
| `mds.property_defs[].unknown_json` | `string` | Opaque JSON object of schema-recognized, converter-unmapped properties for this element, keyed by original property name. |
| `mds.workflows[]` | repeated [`WorkflowDecl`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.WorkflowDecl/index.md) | An array of the WorkflowDecl structures. |
| `mds.workflows[].base_info` | [`ValueListItemDecl`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ValueListItemDecl/index.md) | Value list item representing this element. |
| `mds.workflows[].workflow` | [`WorkflowAdmin`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.WorkflowAdmin/index.md) | Other information on the workflow. |
| `mds.workflows[].states[]` | repeated [`StateDecl`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.StateDecl/index.md) | The states of this workflow. |
| `mds.workflows[].transitions[]` | repeated [`StateTransitionDecl`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.StateTransitionDecl/index.md) | The state transitions of this workflow. |
| `mds.workflows[].unknown_json` | `string` | Opaque JSON object of schema-recognized, converter-unmapped properties for this element, keyed by original property name. |
| `mds.named_acls[]` | repeated [`NamedAclDecl`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.NamedAclDecl/index.md) | Users and UserGroups as references. |
| `mds.named_acls[].nacl_admin` | [`NamedACLAdmin`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.NamedACLAdmin/index.md) | Per-language translations. |
| `mds.named_acls[].translations[]` | repeated [`ElementTranslationsDecl`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ElementTranslationsDecl/index.md) | Per-language translations. |
| `mds.named_acls[].unknown_json` | `string` | Opaque JSON object of schema-recognized, converter-unmapped properties for this element, keyed by original property name. |
| `mds.user_accounts[]` | repeated [`UserAccountDecl`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.UserAccountDecl/index.md) | An array of the UserAccount structures. |
| `mds.user_accounts[].base_info` | [`ValueListItemDecl`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ValueListItemDecl/index.md) | Value list item representing this element. |
| `mds.user_accounts[].aliases` | `string` | Semicolon-separated list of semantic aliases. |
| `mds.user_accounts[].acl` | [`AccessControlList`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlList/index.md) | Permissions. |
| `mds.user_accounts[].login_name` | `string` | The login name that is associated with this user account (e.g. 'DOMAIN\user'). |
| `mds.user_groups[]` | repeated [`UserGroupDecl`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.UserGroupDecl/index.md) | Value list items as references. |
| `mds.user_groups[].base_info` | [`ValueListItemDecl`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ValueListItemDecl/index.md) | Value list item representing this element. |
| `mds.user_groups[].aliases` | `string` | Semicolon-separated list of semantic aliases. |
| `mds.user_groups[].acl` | [`AccessControlList`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AccessControlList/index.md) | Permissions. |
| `mds.user_groups[].external_name` | `string` | The name for external group. Empty if the group is not external. |
| `mds.value_list_items[]` | repeated [`ValueListItemDecl`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ValueListItemDecl/index.md) | Named references for all the above elements. |
| `mds.value_list_items[].vlitem` | [`ValueListItem`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ValueListItem/index.md) | Value list item. |
| `mds.value_list_items[].icon` | [`MetadataStructureResourceRef`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.MetadataStructureResourceRef/index.md) | The icon of the item. |
| `mds.value_list_items[].translations[]` | repeated [`ElementTranslationsDecl`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ElementTranslationsDecl/index.md) | Per-language translations. |
| `mds.named_references[]` | repeated [`MetadataStructureNamedReference`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.MetadataStructureNamedReference/index.md) | Vault languages. The entry with pwszLanguageCode="" is the default language. |
| `mds.named_references[].reference_type` | [`MetadataStructureItem`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.MetadataStructureItem/index.md) | The structure element type. |
| `mds.named_references[].name` | `string` | The name part of the named reference. |
| `mds.named_references[].element_id` | `int32` | The internal ID of the structure element. |
| `mds.named_references[].type_id` | `int32` | The internal ID of the structure element type. Relevant for MetadataStructureItem::valueListItem only, otherwise ignored. |
| `mds.languages[]` | repeated [`Language`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.Language/index.md) | An array of the Language structures defining the vault languages. |
| `mds.languages[].id` | `int32` | Language ID. |
| `mds.languages[].name` | `string` | The name of the language. |
| `mds.languages[].language_code` | `string` | Language indentifier, e.g. the ISO 639-1 or ISO 639-2 language code such as "en" or "eng". |
| `mds.unknown_json` | `string` | Opaque JSON object of schema-recognized, converter-unmapped top-level properties, keyed by original property name. |
| `mdver` | `int32` | The vault's metadata structure version that the structure belongs to. |
| `writer_info` | `string` | The server that produced the structure, as `M-Files.<version>`. |

<a id="related"></a>

## Related methods

- [SetDeclarativeMetadataStructureAsProtobuf](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDeclarativeMetadataStructureAsProtobuf/SetDeclarativeMetadataStructureAsProtobuf/index.md): Replaces the vault's metadata structure with the given structure.
