IRPCVault.GetMetadataStructureItemIdByAlias

View as Markdown

Vault API / core read session or assertion idempotent returns metadata structure version

Finds the vault-specific ID of a metadata structure item from one of its aliases.

ServiceVault information MFiles.IRPCVault
gRPC method/MFiles.IRPCVault/GetMetadataStructureItemIdByAlias
HTTP (mf-http-grpc)POST /grpc/v1/get-metadata-structure-item-id-by-alias
RequestGetMetadataStructureItemIdByAliasRequest
ResponseGetMetadataStructureItemIdByAliasResponse
Book and levelVault API, core
Kindread
SessionRequired: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata).
Idempotentyes
Returns metadata structure versionyes (in the mfiles-metadata-version-bin trailer)
Streamingnone (unary)

Remarks

Aliases are names that the vault administrator gives to structure items so that code can refer to them, for example PD.InvoiceNumber. One item can have several aliases.

Matching ignores case and leading and trailing spaces. When no item, or more than one item, of the given type has the alias, id is -1; for METADATA_STRUCTURE_ITEM_NAMED_ACL it is -1000, because -1 is a valid named ACL ID.

Supported item_type values: OBJECT_TYPE, VALUE_LIST, PROPERTY_DEF, OBJECT_CLASS, WORKFLOW, STATE, STATE_TRANSITION, NAMED_ACL and USER_GROUP (all prefixed METADATA_STRUCTURE_ITEM_). Object types and value lists are one collection: OBJECT_TYPE and VALUE_LIST both search both. Other types and an empty alias fail with E_INVALIDARG.

To resolve many aliases, fetch them all at once with GetAllMetadataStructureItemIdswithAliases and cache the result with the metadata structure version.

Request: GetMetadataStructureItemIdByAliasRequest

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

FieldTypeDescription
item_typeMetadataStructureItemThe kind of item to look for. The method description lists the supported values.
aliasstringOne alias, without the ; that separates an item's aliases. Case does not matter.

Response: GetMetadataStructureItemIdByAliasResponse

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

FieldTypeDescription
idint32The item's ID, or -1 (-1000 for named ACLs) if no item or several items of item_type have the alias.