# IRPCDeclarativeMetadataStructure.SetDeclarativeMetadataStructureEndSession

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

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

Reserved for setting a structure in several parts. Not implemented.

- **Service:** [Declarative metadata structure](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDeclarativeMetadataStructure/index.md) `MFiles.IRPCDeclarativeMetadataStructure`
- **gRPC method:** `/MFiles.IRPCDeclarativeMetadataStructure/SetDeclarativeMetadataStructureEndSession`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/set-declarative-metadata-structure-end-session`
- **Request:** [`SetDeclarativeMetadataStructureEndSessionRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDeclarativeMetadataStructure/SetDeclarativeMetadataStructureEndSession/index.md#request)
- **Response:** [`SetDeclarativeMetadataStructureEndSessionResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCDeclarativeMetadataStructure/SetDeclarativeMetadataStructureEndSession/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

- Always fails with "Not implemented.", whether or not the feature is enabled.

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

## Request: SetDeclarativeMetadataStructureEndSessionRequest

> 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 |
|---|---|---|
| `session` | `uint32` | Session identifier. |
| `commit` | `bool` | True to commit the Set operation. |
| `dry_run_with_schema_validation` | `bool` | Reserved. Ignored when `commit` is false. |

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

## Response: SetDeclarativeMetadataStructureEndSessionResponse

> 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 |
|---|---|---|
| `validated` | `bool` | True for dry runs with schema validation. |
| `validation_errors` | `string` | Reserved. Set only when `validated` is true. |

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