# IRPCDeclarativeMetadataStructure.GetDeclarativeMetadataStructure

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](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDeclarativeMetadataStructure/index.md)

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

Badges: `Administration API / specialized` `admin` `session` `returns metadata structure version`

Gets the vault's current metadata structure as a declarative JSON document.

- **Service:** [Declarative metadata structure](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDeclarativeMetadataStructure/index.md) `MFiles.IRPCDeclarativeMetadataStructure`
- **gRPC method:** `/MFiles.IRPCDeclarativeMetadataStructure/GetDeclarativeMetadataStructure`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/get-declarative-metadata-structure`
- **Request:** [`GetDeclarativeMetadataStructureRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDeclarativeMetadataStructure/GetDeclarativeMetadataStructure/index.md#request)
- **Response:** [`GetDeclarativeMetadataStructureResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDeclarativeMetadataStructure/GetDeclarativeMetadataStructure/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`.
- The conversion runs in a separate converter process on the server, with a one-minute limit.

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

## Request: GetDeclarativeMetadataStructureRequest

> 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: GetDeclarativeMetadataStructureResponse

> 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 |
|---|---|---|
| `declmds` | `string` | The declarative metadata structure document (JSON text). Its format is described by [GenerateDeclarativeMetadataStructureSchema](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDeclarativeMetadataStructure/GenerateDeclarativeMetadataStructureSchema/index.md). |
