IRPCVaultExtensionMethods.RunExtensionMethod
Vault API / standard write session returns metadata structure version
Runs a vault extension method, either an event handler method or an application extension method, with optional compression of the input and output.
| Service | Vault extension methods MFiles.IRPCVaultExtensionMethods |
|---|---|
| gRPC method | /MFiles.IRPCVaultExtensionMethods/RunExtensionMethod |
| HTTP (mf-http-grpc) | POST /grpc/v1/run-extension-method |
| Request | RunExtensionMethodRequest |
| Response | RunExtensionMethodResponse |
| Book and level | Vault API, standard |
| Kind | write |
| Session | Required: the session ID from LogIn in the mfiles-session-id-bin metadata. |
| Idempotent | no |
| Returns metadata structure version | yes (in the mfiles-metadata-version-bin trailer) |
| Streaming | none (unary) |
Remarks
- Requires a vault session; no special vault rights. The method's own code decides what the caller may do.
- With an all-zero (or empty)
application_id,method_namenames an event handler method andextensionandinstanceare ignored. Otherwise the call goes to the extension object of the application. - Compression. Set either
inputorcompressed_input. Whencompressed_inputis set, the server returns the output incompressed_outputand leavesoutputempty. The compressed format is not plain zlib: it is a 4-byte little-endian length of the uncompressed data, followed by the zlib stream (RFC 1950) of the UTF-8 text with a terminating zero byte; the length includes that byte. Data in another format fails with "The parameter is incorrect.". The uncompressed size is limited to 100 MiB.
Request: RunExtensionMethodRequest
Request data for running an extension 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 |
|---|---|---|
application_id | string | The GUID of the vault application. All zeros or empty for an event handler method. |
extension | string | The identifier of the application's extension object; empty for an event handler method. |
instance | string | The identifier of the extension object instance; empty for an event handler method. |
method_name | string | The name of the method. For an event handler method, the name of the VaultExtensionMethod event handler. |
input | string | The input as text. Leave empty when compressed_input is used. |
compressed_input | bytes | The compressed input: the 4-byte little-endian length of the UTF-8 text including a terminating zero byte, followed by the zlib stream of that text. Leave empty to use input. |
Response: RunExtensionMethodResponse
The request data for RunExtensionMethod 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 |
|---|---|---|
output | string | The output as text, when the input was not compressed. |
compressed_output | bytes | When compressed_input was used, the output in the same compressed format: a 4-byte little-endian length, then the zlib stream of the UTF-8 text with a terminating zero byte. |