Declarative metadata structure (IRPCDeclarativeMetadataStructure)
Reads and validates the whole metadata structure of a vault as one declarative JSON document. Preview feature, off by default.
| gRPC service | MFiles.IRPCDeclarativeMetadataStructure |
|---|---|
| Book and level | Administration API, specialized |
| Methods | 8 |
| Proto file | mfiles/IRPCDeclarativeMetadataStructure.proto |
Overview
Not available by default. The declarative metadata structure is a preview feature. On a
server where it is not enabled, every method fails with "Not implemented." (gRPC status
UNKNOWN, error code 0x80004001) before any rights check.
SetDeclarativeMetadataStructureBeginSession,
SetDeclarativeMetadataStructureEndSession
and
NewDeclarativeMetadataStructureRevisionAvailable
are not implemented even when the feature is on.
The declarative format. A declarative metadata structure document is a JSON text that
describes the vault's object types, value lists, classes, class groups, property definitions,
workflows and named access control lists, with the users, user groups and value list items they
refer to. Elements refer to each other by name, not by vault-specific ID, so the document can
be read, compared and edited by people and tools. Property names are camelCase and enumerations
are strings. The document also carries schemaVersion, writerInfo, and the structure's
revision (positive: a revision from the declarative configuration service; negative: a
revision made locally on this server, with revisionBase naming the revision it is based on).
GenerateDeclarativeMetadataStructureSchema
returns the JSON Schema of the format.
How the two services relate. IRPCDeclarativeMetadataStructureAsProtobuf exchanges the same structure as a typed DeclarativeMetadataStructure message that uses the vault's IDs. This service exchanges the declarative JSON document as a string. The server converts between the two with the declarative configuration converter that is installed with M-Files Server: GetDeclarativeMetadataStructure builds the typed structure and converts it to JSON; SetDeclarativeMetadataStructure validates or converts JSON in the other direction.
- Session and rights. Every method requires a vault session and the vault right
change_metadata_structure, reads included. - Who calls it. Declarative configuration tooling for M-Files. Applications should read the structure with the Vault API (IRPCObjectTypes, IRPCPropertyDefs) and should not call this service.
- Revision generation. When this feature is on, every local structure change makes the server generate a new revision of the declarative structure. PauseDeclarativeMetadataStructureRevisionGeneration lets one session make a batch of changes with one catch-up revision at the end.
- Every method sends the
mfiles-metadata-version-bintrailer when it succeeds.
Methods
| Method | Summary | Facts |
|---|---|---|
| CancelDeclarativeMetadataStructureRevisionGenerationPause | Ends the calling session's pause of automatic revision generation. | admin session returns metadata structure version |
| GenerateDeclarativeMetadataStructureSchema | Gets the JSON Schema document that describes the declarative metadata structure format. | admin session returns metadata structure version |
| GetDeclarativeMetadataStructure | Gets the vault's current metadata structure as a declarative JSON document. | admin session returns metadata structure version |
| NewDeclarativeMetadataStructureRevisionAvailable | Reserved for telling the server that a new structure revision is available. Not implemented. | admin session returns metadata structure version |
| PauseDeclarativeMetadataStructureRevisionGeneration | Starts, extends or reads a pause of automatic revision generation for the calling session. | admin session returns metadata structure version |
| SetDeclarativeMetadataStructure | Validates a declarative JSON document against the schema, or converts it for deployment. | admin session returns metadata structure version |
| SetDeclarativeMetadataStructureBeginSession | Reserved for setting a structure in several parts. Not implemented. | admin session returns metadata structure version |
| SetDeclarativeMetadataStructureEndSession | Reserved for setting a structure in several parts. Not implemented. | admin session returns metadata structure version |