Skip to main content

Built-in Resources

VEF registers several RPC resources for you when the corresponding modules are enabled in the default boot chain.

Unless noted otherwise:

  • resources in this page are RPC resources mounted under /api
  • operations use the standard RPC request envelope: resource, action, version, params, and meta
  • non-public operations inherit the API engine's default Bearer authentication
  • operations without a custom rate limit inherit the API engine default rate limit The stock engine default is 100 requests per 5 minutes, but applications may override it

Resource Overview

ResourceModuleDefault access modelNotes
security/authsecurityMixed: some actions are public, some require Bearer authLogin flow, token refresh, logout, challenge resolution, current-user info
sys/storagestorageBearer auth by defaultMultipart upload session lifecycle (init / part / list / complete / abort). Downloads are served via the /storage/files/<key> app proxy, not via RPC.
sys/schemaschemaBearer auth by defaultDatabase schema inspection
sys/monitormonitorBearer auth by defaultRuntime and host monitoring data
approval/*approvalBearer auth required; per-action permissions where declaredOptional workflow resources registered only when vef.ApprovalModule is enabled

security/auth

Authentication resource provided by the security module.

Operations

ActionAccessRate limitPurposeParams
loginPublicmax = vef.security.login_rate_limit (module default 6)Authenticates a user or external app and returns either tokens or the first pending login challengeLoginParams
refreshPublicmax = vef.security.refresh_rate_limit (module default 1)Exchanges a valid refresh token for a fresh token pairRefreshParams
logoutBearer auth requiredAPI engine defaultReturns success immediately; token invalidation is expected to happen on the client sideNone
resolve_challengePublicmax = vef.security.login_rate_limit (module default 6)Resolves the current login challenge and returns either the next challenge or final tokensResolveChallengeParams
get_user_infoBearer auth requiredAPI engine defaultLoads current-user profile, menus, permission tokens, and other session data through security.UserInfoLoaderRaw params map, application-defined

login parameters

ParameterTypeRequiredDescription
typestringYesLogin type. The built-in login flow currently supports password only
principalstringYesLogin identifier, typically the username
credentialsstringYesLogin credential. For type = "password", this is the plaintext password

Minimal request example:

{
"resource": "security/auth",
"action": "login",
"version": "v1",
"params": {
"type": "password",
"principal": "alice",
"credentials": "secret"
}
}

refresh parameters

ParameterTypeRequiredDescription
refreshTokenstringYesRefresh token that will be validated and exchanged for a new token pair

resolve_challenge parameters

ParameterTypeRequiredDescription
challengeTokenstringYesChallenge-state token returned by a previous login or resolve_challenge call
typestringYesChallenge type currently being resolved, such as totp or another provider-specific challenge identifier
responseanyYesChallenge response payload consumed by the matching security.ChallengeProvider

get_user_info parameters

This action does not define a typed params struct. Any params object is forwarded to security.UserInfoLoader.LoadUserInfo(...).

ParameterTypeRequiredDescription
Framework-defined parametersNoneNoThe framework does not reserve fixed keys here
Application-defined parametersobjectNoOptional extension data interpreted by your own security.UserInfoLoader implementation

Notes:

  • if no security.UserInfoLoader is registered, this action returns not implemented
  • response shape is defined by security.UserInfo

sys/storage

Storage resource provided by the storage module. The single-PUT upload action was retired in v0.21; every upload now goes through the multipart session lifecycle below. See File Storage for the surrounding lifecycle (claim, pending-delete, ACL).

Operations

ActionAccessRate limitPurposeParams
init_uploadBearer auth requiredAPI engine defaultOpen a new multipart session. Server returns the negotiated part plan and an opaque claimId.InitUploadParams
upload_partBearer auth requiredAPI engine defaultUpload one part of an open session (multipart form).UploadPartParams
list_partsBearer auth requiredAPI engine defaultList parts already uploaded for a session.ListPartsParams
complete_uploadBearer auth requiredAPI engine defaultSeal a session; the server assembles the part manifest from recorded parts.CompleteUploadParams
abort_uploadBearer auth requiredAPI engine defaultAbort and release a session.AbortUploadParams

Related HTTP route:

  • /storage/files/<key> is an app-level download proxy route, not an RPC action.
  • It does not automatically inherit RPC Bearer authentication; pub/* is served anonymously and all other keys are governed by storage.FileACL.

init_upload parameters

ParameterTypeRequiredDescription
filenamestringYesOriginal filename (≤ 255 chars). Used to derive the safe extension and stored on the upload claim.
sizeintYesTotal object size in bytes (≥ 1). The server validates against vef.storage.max_upload_size.
contentTypestringNoClient-supplied MIME (≤ 127 chars). Sanitized server-side — unsafe values are overridden by extension-based detection or fall back to application/octet-stream.
publicboolNoPlace the key under pub/ instead of priv/. Requires vef.storage.allow_public_uploads = true.

Requests with public = true are rejected unless vef.storage.allow_public_uploads is enabled.

Only claimId is client-facing; the backend session handle is internal and is never returned.

Response:

FieldTypeDescription
keystringPlanned final object key under priv/ or pub/.
claimIdstringOpaque client-facing session handle for the remaining upload actions.
originalFilenamestringClient-supplied filename stored on the upload claim.
partSizeintBackend-authoritative part size in bytes.
partCountintNumber of parts the client must upload. Small files still use partCount = 1.
expiresAttimestampClaim expiration time.

upload_part parameters

This action expects multipart/form-data, not JSON. The form carries the normal RPC fields (resource, action, version), a params field containing JSON such as {"claimId":"...","partNumber":1}, and a file part named file.

ParameterTypeRequiredDescription
filefileYesRaw part bytes.
claimIdstringYesThe claimId returned by init_upload.
partNumberintYes1-indexed part position. Must be ≤ partCount and the size must equal the server's partSize (the final part may be smaller).

The backend ETag is intentionally not returned to the client — the server records it server-side and reuses it during complete_upload.

Response:

FieldTypeDescription
partNumberintAccepted part number.
sizeintRecorded byte size for that part.

list_parts parameters

ParameterTypeRequiredDescription
claimIdstringYesActive pending session to inspect.

Response:

FieldTypeDescription
partsobject[]Uploaded parts ordered by partNumber; each entry contains partNumber and size. Part ETags are not exposed.

complete_upload parameters

ParameterTypeRequiredDescription
claimIdstringYesSession to seal. The server reassembles the manifest from its own part-store records — no client-supplied ETags are accepted.

On success the server marks the existing claim as uploaded, clears its recorded parts, and returns object metadata plus originalFilename. The uploaded claim is still pending business adoption. Subsequent calls against the same uploaded claim are idempotent fast-paths. If the assembled object size does not match the claim, the action returns ErrCodeUploadSizeMismatch.

Response:

FieldTypeDescription
bucketstringBackend bucket name when the provider reports one.
keystringFinal object key.
eTagstringFinal object ETag. This is not a part ETag and is not supplied to complete_upload.
sizeintFinal object size in bytes.
contentTypestringSanitized content type stored for the object.
lastModifiedtimestampBackend last-modified time.
metadataobjectOptional backend metadata map. The HTTP upload API does not accept user-supplied metadata.
originalFilenamestringFilename captured during init_upload.

abort_upload parameters

ParameterTypeRequiredDescription
claimIdstringYesSession to abort.

Response has no data payload. The action is retry-safe: a missing claim returns success, and a claim already marked non-pending for the same owner is a no-op. An existing claim owned by a different principal is still rejected.

Minimal request example:

{
"resource": "sys/storage",
"action": "init_upload",
"version": "v1",
"params": {
"filename": "report.pdf",
"size": 25600000,
"contentType": "application/pdf",
"public": false
}
}

sys/schema

Schema inspection resource provided by the schema module.

Operations

ActionAccessRate limitPurposeParams
list_tablesBearer auth requiredCustom operation max 60Returns all tables in the current database or schemaNone
get_table_schemaBearer auth requiredCustom operation max 60Returns detailed schema information for one tableGetTableSchemaParams
list_viewsBearer auth requiredCustom operation max 60Returns all views in the current database or schemaNone

get_table_schema parameters

ParameterTypeRequiredDescription
namestringYesTable name to inspect

sys/monitor

Monitoring resource provided by the monitor module.

Operations

ActionAccessRate limitPurposeParams
get_overviewBearer auth requiredCustom operation max 60Returns a combined system overview snapshotNone
get_cpuBearer auth requiredCustom operation max 60Returns CPU information and usage dataNone
get_memoryBearer auth requiredCustom operation max 60Returns memory usage informationNone
get_diskBearer auth requiredCustom operation max 60Returns disk and partition informationNone
get_networkBearer auth requiredCustom operation max 60Returns network interface and I/O statisticsNone
get_hostBearer auth requiredCustom operation max 60Returns static host informationNone
get_processBearer auth requiredCustom operation max 60Returns information about the current application processNone
get_loadBearer auth requiredCustom operation max 60Returns system load averagesNone
get_build_infoBearer auth requiredCustom operation max 60Returns application build metadataNone
get_event_streamsBearer auth requiredCustom operation max 60Reports every redis_stream stream and consumer group (consumers / pending / lag / last-delivered) via the optional event.StreamInspector, so operators can spot orphaned groupsNone

Notes:

  • these actions do not accept framework-defined input parameters
  • some actions may return a monitor-not-ready error when the underlying data source is unavailable
  • get_event_streams returns an empty, disabled report when no event.StreamInspector is available (for example when the redis_stream transport is off)

Minimal request example:

{
"resource": "sys/monitor",
"action": "get_overview",
"version": "v1"
}

Approval resources

If you explicitly include the approval module, the framework also registers additional approval/* resources.

The registered resources are approval/category, approval/delegation, approval/flow, approval/instance, approval/my, and approval/admin.

They are expanded in Approval Module, including each action name, required permission, params type, tenancy rule, audit setting, and rate limit. This page keeps them as an index because they are domain-level workflow resources rather than the framework's core general-purpose built-ins.

See also