IRPCVault.GetMetadataStructureItemIdByGUID
Vault API / core read session or assertion idempotent returns metadata structure version
Finds the vault-specific ID of a metadata structure item (object type, property definition, class, workflow, ...) from its GUID.
| Service | Vault information MFiles.IRPCVault |
|---|---|
| gRPC method | /MFiles.IRPCVault/GetMetadataStructureItemIdByGUID |
| HTTP (mf-http-grpc) | POST /grpc/v1/get-metadata-structure-item-id-by-guid |
| Request | GetMetadataStructureItemIdByGUIDRequest |
| Response | GetMetadataStructureItemIdByGUIDResponse |
| 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
Use this to resolve structure items by GUID instead of hard-coding their vault-specific IDs.
Supported item_type values: OBJECT_TYPE, VALUE_LIST, PROPERTY_DEF, OBJECT_CLASS,
CLASS_GROUP, WORKFLOW, STATE, STATE_TRANSITION, NAMED_ACL, USER, USER_GROUP and
VIEW_DEF (all prefixed METADATA_STRUCTURE_ITEM_). Object types and value lists are one
collection: OBJECT_TYPE and VALUE_LIST both find either kind.
A GUID that matches nothing of the given type returns is_found false and id 0. An all-zero or
malformed GUID, and METADATA_STRUCTURE_ITEM_VALUE_LIST_ITEM, fail with E_INVALIDARG.
The result is cacheable; the response carries the metadata structure version in the
mfiles-metadata-version-bin trailer.
Request: GetMetadataStructureItemIdByGUIDRequest
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. |
guid | string | The item's GUID, with or without braces, in any case, for example {9725854F-4A75-403F-A364-F390A67A0535}. |
Response: GetMetadataStructureItemIdByGUIDResponse
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 |
|---|---|---|
is_found | bool | True if an item of item_type has this GUID. |
id | int32 | The item's ID in this vault. 0 when is_found is false. |
Related methods
- GetMetadataStructure -- Gets the vault's real object types (not value lists), with icons, in one call.