# IRPCDeclarativeMetadataStructure.GenerateDeclarativeMetadataStructureSchema

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/GenerateDeclarativeMetadataStructureSchema/

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

Gets the JSON Schema document that describes the declarative metadata structure format.

- **Service:** [Declarative metadata structure](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDeclarativeMetadataStructure/index.md) `MFiles.IRPCDeclarativeMetadataStructure`
- **gRPC method:** `/MFiles.IRPCDeclarativeMetadataStructure/GenerateDeclarativeMetadataStructureSchema`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/generate-declarative-metadata-structure-schema`
- **Request:** [`GenerateDeclarativeMetadataStructureSchemaRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDeclarativeMetadataStructure/GenerateDeclarativeMetadataStructureSchema/index.md#request)
- **Response:** [`GenerateDeclarativeMetadataStructureSchemaResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDeclarativeMetadataStructure/GenerateDeclarativeMetadataStructureSchema/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`. Changes nothing.
- Validate a document against this schema locally, or on the server with
  [SetDeclarativeMetadataStructure](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDeclarativeMetadataStructure/SetDeclarativeMetadataStructure/index.md)
  and `dry_run_with_schema_validation`.

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

## Request: GenerateDeclarativeMetadataStructureSchemaRequest

No fields.

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

## Response: GenerateDeclarativeMetadataStructureSchemaResponse

> 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_schema` | `string` | The JSON Schema of the declarative metadata structure document, as text. |

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

## Related methods

- [SetDeclarativeMetadataStructure](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDeclarativeMetadataStructure/SetDeclarativeMetadataStructure/index.md): Validates a declarative JSON document against the schema, or converts it for deployment.
