Named value storage (IRPCNamedValueStorage)

View as Markdown

Reads and writes named values: small key-value settings stored in the vault, grouped by storage type and namespace.

gRPC serviceMFiles.IRPCNamedValueStorage
Book and levelVault API, standard
Methods3
Proto filemfiles/IRPCNamedValueStorage.proto

Overview

Named value storage keeps configuration and state for applications, vault applications and M-Files itself. A value is addressed by three things:

  1. Storage type (NamedValueType): decides who can read and write, and whether the value is shared or private to one user.
  2. Namespace: a string of at most 100 characters, for example "MyCompany.MyApp". Choose one that is unique to your application.
  3. Key: the key of a NamedValue, at most 100 characters. The value is a TypedValue, usually DATATYPE_TEXT or DATATYPE_MULTILINE_TEXT holding the setting as text.

Use the same spelling and case for namespaces and keys every time; keys that differ only in case are stored as separate values.

Storage type Who can read Who can write and remove
NAMED_VALUE_TYPE_USER_CONFIGURATION_VALUE any user any user (shared by all users)
NAMED_VALUE_TYPE_USER_SPECIFIC_VALUE the user only the user only (private to each user)
NAMED_VALUE_TYPE_METADATA_CONFIGURATION_VALUE any user vault right change_metadata_structure
NAMED_VALUE_TYPE_FOLDER_CONFIGURATION_VALUE any user vault right manage_common_views
NAMED_VALUE_TYPE_ADMIN_CONFIGURATION_VALUE vault right read_all_metadata_structure vault right change_metadata_structure
NAMED_VALUE_TYPE_SYSTEM_CONFIGURATION_VALUE system administrators change_metadata_structure and full server rights
NAMED_VALUE_TYPE_REGISTRY_VALUE any user nobody (read-only)

NAMED_VALUE_TYPE_PROPERTY_AUTOMATIC_NUMBERING and NAMED_VALUE_TYPE_VAULT_SHARED_VARIABLE are not accessible through this service ("Access denied."), and NAMED_VALUE_TYPE_UNINITIALIZED fails with "The parameter is incorrect.". Anonymous sessions cannot set values. Vault rights are in VaultAccess.

Some namespaces of the configuration types hold M-Files' own vault configuration, such as vault settings and metadata card configuration. Writing to them changes how the vault behaves and can change the metadata structure version. Do not write to namespaces that your application does not own.

Methods

MethodSummaryFacts
GetNamedValuesGets all named values of one storage type and namespace.read session idempotent returns metadata structure version
RemoveNamedValuesRemoves named values from one namespace by key.write session returns metadata structure version
SetNamedValuesCreates or replaces the given named values in one namespace, optionally only if the current values are as expected.write session idempotent returns metadata structure version