IRPCObjectOperations.GetTemplates
Vault API / core write session or assertion returns metadata structure version
Gets the templates of an object type, optionally only those of one class or matching keywords.
| Service | Objects, versions, properties and files MFiles.IRPCObjectOperations |
|---|---|
| gRPC method | /MFiles.IRPCObjectOperations/GetTemplates |
| HTTP (mf-http-grpc) | POST /grpc/v1/get-templates |
| Request | GetTemplatesRequest |
| Response | GetTemplatesResponse |
| Book and level | Vault API, core |
| Kind | write |
| Session | Required: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata). |
| Idempotent | no |
| Returns metadata structure version | yes (in the mfiles-metadata-version-bin trailer) |
| Streaming | none (unary) |
Request: GetTemplatesRequest
A structure that specifies the request type for the GetTemplates method.
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 |
|---|---|---|
object_type_id | int32 | The object type of the templates. |
class_id | optional int32 | Optional class ID for fetching the templates of a specific class. |
search_keywords[] | repeated string | The search keywords for the templates. |
Response: GetTemplatesResponse
A structure that specifies the response type for the GetTemplates method.
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 |
|---|---|---|
templates[] | repeated Template | Templates. |
templates[].title | string | The title of the template file. |
templates[].title_resource | string | The resource key for the title of the template file. It will be available only for blank template file. |
templates[].file_template_id | string | The file ID of the template file. It will be available only for blank templates. |
templates[].obj_id | ObjID | The template object ID. It will be available only for User defined templates. |
templates[].obj_id.type | int32 | The object type ID, for example 0 for documents. In a lookup value, the value list ID (for a lookup to objects, the object type ID). |
templates[].obj_id.item_id | ItemID | The ID of the object within its type, in item_id.internal_id. |
templates[].class_id | int32 | The class of the object version. For blank templates it will be always 0, For user defined templates the class id of the object will be available. |
templates[].icon | bytes | The icon for the template file. Currently it is not carrying any data. It will be implemented in future. |
templates[].restricted_to_classes[] | repeated uint32 | The array of restrict to class IDs. Currently it is not carrying any data. It will be implemented in future. |