CallVerticalAgentService
Description
Calls the Vertical Agent Service, an internal M-Files service, with the specified HTTP method.
Generalizes {@link CallSimplifiedAPI}'s calling convention to a second internal service: same
feature-flag gate, cloud-vault-only routing, and M-Files-Session header injection, but routed
to /vertical-agent instead of /core.
NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any future release. Use of this feature is not recommended for production environments.
Syntax
// shellFrame points to instance of IShellFrame
const result = await shellFrame.CallVerticalAgentService(
requestRelativeURL,
method,
payload,
files,
);
Parameters
| Name | Optionality | Type | Description |
|---|---|---|---|
| requestRelativeURL | Required | string | The relative URL path of the API endpoint to call. Must start with "/" and may include a query string, but cannot include fragments, backslashes, or traversal segments. |
| method | Required | string | The HTTP method to use. Only "GET", "POST", "PUT", "PATCH", and "DELETE" are allowed. |
| payload | Optional | string | Optional JSON string to include as the request body (for POST, PUT, or PATCH requests). When files is also provided (non-empty), payload must decode to a flat object (string/number/boolean values only) — its entries are appended as additional multipart form fields alongside the files, rather than sent as a JSON body. |
| files | Optional | FileList | Optional files to attach. Only allowed for POST, PUT, or PATCH requests. When provided and non-empty, the request body becomes FormData: each file is appended under the field name "files". An empty FileList is treated the same as not passing files at all. |
Return type
| Type | Description |
|---|---|
Promise < any > | A promise that resolves to the parsed JSON response from the server, or rejects with an error if the HTTP request fails or response parsing fails |
Exceptions
NotSupportedError - when the CE3224_SimplifiedCoreAPISupportUIX2 feature flag is not enabled, or when called from a non-cloud vault.
Error - an error if the HTTP response status is not ok, if the request input is invalid, if the user session is unavailable, or if there is a network or parsing error