IRPCDeclarativeMetadataStructure.SetDeclarativeMetadataStructure
Administration API / specialized admin session returns metadata structure version
Validates a declarative JSON document against the schema, or converts it for deployment.
| Service | Declarative metadata structure MFiles.IRPCDeclarativeMetadataStructure |
|---|---|
| gRPC method | /MFiles.IRPCDeclarativeMetadataStructure/SetDeclarativeMetadataStructure |
| HTTP (mf-http-grpc) | POST /grpc/v1/set-declarative-metadata-structure |
| Request | SetDeclarativeMetadataStructureRequest |
| Response | SetDeclarativeMetadataStructureResponse |
| 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) |
Remarks
- Fails with "Not implemented." unless deploying declarative structures is enabled on the server.
- Requires
change_metadata_structure. - With
dry_run_with_schema_validationtrue, nothing changes:validatedis true andvalidation_errorslists the schema violations (empty when the document is valid). - With
dry_run_with_schema_validationfalse, the server converts the document but, in this server version, does not apply the result to the vault. sessionis not used; the begin and end session methods are not implemented.
Request: SetDeclarativeMetadataStructureRequest
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 | Not used by the server. Leave 0. |
declmds_as_json | string | The declarative metadata structure document, as returned by GetDeclarativeMetadataStructure. |
dry_run_with_schema_validation | bool | True to only validate the document against the schema. |
Response: SetDeclarativeMetadataStructureResponse
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 when the call was a dry run. |
validation_errors | string | The schema validation errors as text, empty if the document is valid. Set only when validated is true. |
Related methods
- SetDeclarativeMetadataStructureBeginSession -- Reserved for setting a structure in several parts. Not implemented.
- SetDeclarativeMetadataStructureEndSession -- Reserved for setting a structure in several parts. Not implemented.