IRPCNamedValueStorage.SetNamedValues
Vault API / standard write session idempotent returns metadata structure version
Creates or replaces the given named values in one namespace, optionally only if the current values are as expected.
| Service | Named value storage MFiles.IRPCNamedValueStorage |
|---|---|
| gRPC method | /MFiles.IRPCNamedValueStorage/SetNamedValues |
| HTTP (mf-http-grpc) | POST /grpc/v1/set-named-values |
| Request | SetNamedValuesRequest |
| Response | SetNamedValuesResponse |
| Book and level | Vault API, standard |
| Kind | write |
| Session | Required: the session ID from LogIn in the mfiles-session-id-bin metadata. |
| Idempotent | yes |
| Returns metadata structure version | yes (in the mfiles-metadata-version-bin trailer) |
| Streaming | none (unary) |
Remarks
- Requires a vault session; the write rights depend on
storage_type(see the service overview). Anonymous sessions get "Access denied.". - Only the keys in
valuesare written; other keys in the namespace stay as they are. Each written key gets the new value as a whole. - Optimistic concurrency with
required_existing_value: every listed key must currently have exactly the listed value, or, if the listed value is empty, must have no value. If any of them differs, nothing is written and the call fails with "An SQL update statement yielded a probable lock conflict." (0x800403F9). Read the values again, merge and retry. - If no value would change, nothing is written.
- With
NAMED_VALUE_TYPE_USER_SPECIFIC_VALUEthe values are stored for the calling user only.
Request: SetNamedValuesRequest
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 |
|---|---|---|
storage_type | NamedValueType | The storage type to write. See the table in the service overview.Values: NAMED_VALUE_TYPE_UNINITIALIZED (0), NAMED_VALUE_TYPE_PROPERTY_AUTOMATIC_NUMBERING (1), NAMED_VALUE_TYPE_VAULT_SHARED_VARIABLE (2), NAMED_VALUE_TYPE_METADATA_CONFIGURATION_VALUE (3), NAMED_VALUE_TYPE_USER_CONFIGURATION_VALUE (4), NAMED_VALUE_TYPE_REGISTRY_VALUE (5), NAMED_VALUE_TYPE_FOLDER_CONFIGURATION_VALUE (6), NAMED_VALUE_TYPE_ADMIN_CONFIGURATION_VALUE (7), NAMED_VALUE_TYPE_SYSTEM_CONFIGURATION_VALUE (8), NAMED_VALUE_TYPE_USER_SPECIFIC_VALUE (9). |
namespace_name | string | The namespace, at most 100 characters. |
values[] | repeated NamedValue | The values to create or replace. Keys are at most 100 characters. |
values[].key | string | The name of the value. |
values[].value | TypedValue | The value as a serialized bytearray. |
values[].value.is_null_value | bool | True if the value is empty. data is then unset. |
values[].value.type | Datatype | The data type of the value. |
values[].value.data | TypedValueUnion | The value, in the member that matches type. Unset for an empty value. |
required_existing_value[] | repeated NamedValue | Optional. Values that must be current before the write, typically the values you read with GetNamedValues. A key with an empty value means "must not exist". On a mismatch the call fails with 0x800403F9 and nothing is written. |
required_existing_value[].key | string | The name of the value. |
required_existing_value[].value | TypedValue | The value as a serialized bytearray. |
required_existing_value[].value.is_null_value | bool | True if the value is empty. data is then unset. |
required_existing_value[].value.type | Datatype | The data type of the value. |
required_existing_value[].value.data | TypedValueUnion | The value, in the member that matches type. Unset for an empty value. |
Response: SetNamedValuesResponse
No fields.