IRPCVault.GetMetadataStructureItemIdByAlias
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.
| Service | Vault information MFiles.IRPCVault |
|---|---|
| gRPC method | /MFiles.IRPCVault/GetMetadataStructureItemIdByAlias |
| HTTP (mf-http-grpc) | POST /grpc/v1/get-metadata-structure-item-id-by-alias |
| Request | GetMetadataStructureItemIdByAliasRequest |
| Response | GetMetadataStructureItemIdByAliasResponse |
| Book and level | Vault API, core |
| Kind | read |
| Session | Required: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata). |
| Idempotent | yes |
| Returns metadata structure version | yes (in the mfiles-metadata-version-bin trailer) |
| Streaming | none (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.
| Field | Type | Description |
|---|---|---|
item_type | MetadataStructureItem | The kind of item to look for. The method description lists the supported values. |
alias | string | One 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.
| Field | Type | Description |
|---|---|---|
id | int32 | The item's ID, or -1 (-1000 for named ACLs) if no item or several items of item_type have the alias. |
Related methods
- GetAllMetadataStructureItemIdswithAliases -- Gets all unambiguous alias-to-ID mappings of one kind of metadata structure item, or of all kinds, as typed lists.
- GetMetadataStructure -- Gets the vault's real object types (not value lists), with icons, in one call.