IRPCVault.GetMetadataStructureItemIdsByAliases

View as Markdown

Vault API / core write session or assertion returns metadata structure version

Gets all unambiguous alias-to-ID mappings of one kind of metadata structure item, or of all kinds, as JSON.

ServiceVault information MFiles.IRPCVault
gRPC method/MFiles.IRPCVault/GetMetadataStructureItemIdsByAliases
HTTP (mf-http-grpc)POST /grpc/v1/get-metadata-structure-item-ids-by-aliases
RequestGetMetadataStructureItemIdsByAliasesRequest
ResponseGetMetadataStructureItemIdsByAliasesResponse
Book and levelVault API, core
Kindwrite
SessionRequired: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata).
Idempotentno
Returns metadata structure versionyes (in the mfiles-metadata-version-bin trailer)
Streamingnone (unary)

Remarks

unambiguous_aliases_only must be true; false fails with E_NOTIMPL. Aliases used by more than one item of the same kind are left out.

data is UTF-8 JSON followed by one NUL byte. If uncompressed_length is 4294967295 the bytes are the JSON as is; otherwise they are zlib-compressed (zlib.decompress in Python) and uncompressed_length is the decompressed size including the NUL. The JSON maps the item kind to an object of alias-to-ID pairs; kinds without aliases are left out, so an empty vault gives {}:

{"PropertyDef": {"PD.InvoiceNumber": 1021}, "Class": {"CL.Invoice": 5}}

Kind names: ObjectType, ValueList, PropertyDef, Class, Workflow, State, StateTransition, NamedACL, UserGroup. Aliases keep the case the administrator gave them. Object types and value lists are one collection, so with METADATA_STRUCTURE_ITEM_ALL an alias of either appears under both ObjectType and ValueList.

GetAllMetadataStructureItemIdswithAliases returns the same data as typed messages and is easier to use.

Request: GetMetadataStructureItemIdsByAliasesRequest

Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

FieldTypeDescription
emsiMetadataStructureItemThe kind of item, or METADATA_STRUCTURE_ITEM_ALL for every kind that can have aliases.
unambiguous_aliases_onlyboolMust be true; false fails with E_NOTIMPL.

Response: GetMetadataStructureItemIdsByAliasesResponse

Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

FieldTypeDescription
databytesNUL-terminated UTF-8 JSON, zlib-compressed unless uncompressed_length is 4294967295. The method description shows the format.
uncompressed_lengthuint32Size of the decompressed data, or 4294967295 if data is not compressed.