VectorFlow
Reference

API Reference

VectorFlow exposes its API via tRPC -- a type-safe RPC framework built on HTTP. All API calls go through a single endpoint at /api/trpc, rather than traditional REST paths. This page documents every router, its procedures, and how to call them programmatically.

Calling convention

tRPC uses a URL-based calling convention where the procedure name is encoded in the path:

# Query (read operation) — HTTP GET
GET /api/trpc/<router>.<procedure>?input=<url-encoded-json>

# Mutation (write operation) — HTTP POST
POST /api/trpc/<router>.<procedure>
Content-Type: application/json

{"json": <input-object>}

Responses are JSON-wrapped:

{
  "result": {
    "data": {
      "json": { ... }
    }
  }
}

VectorFlow uses SuperJSON as its serialization transformer, which means Date objects and BigInts are automatically serialized and deserialized. When calling the API with raw HTTP, you receive SuperJSON-encoded output -- dates appear as ISO strings with type annotations.

Example: list pipelines

# Query — GET with URL-encoded JSON input
curl -s 'https://vectorflow.example.com/api/trpc/pipeline.list?input=%7B%22json%22%3A%7B%22environmentId%22%3A%22clxyz123%22%7D%7D' \
  -H 'Cookie: authjs.session-token=<session-token>'
const input = encodeURIComponent(
  JSON.stringify({ json: { environmentId: "clxyz123" } })
);

const res = await fetch(
  `https://vectorflow.example.com/api/trpc/pipeline.list?input=${input}`,
  {
    headers: { Cookie: `authjs.session-token=${sessionToken}` },
  }
);

const { result } = await res.json();
const pipelines = result.data.json;

Example: create a pipeline

# Mutation — POST with JSON body
curl -s -X POST 'https://vectorflow.example.com/api/trpc/pipeline.create' \
  -H 'Content-Type: application/json' \
  -H 'Cookie: authjs.session-token=<session-token>' \
  -d '{"json": {"name": "syslog-to-s3", "environmentId": "clxyz123"}}'
const res = await fetch(
  "https://vectorflow.example.com/api/trpc/pipeline.create",
  {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      Cookie: `authjs.session-token=${sessionToken}`,
    },
    body: JSON.stringify({
      json: { name: "syslog-to-s3", environmentId: "clxyz123" },
    }),
  }
);

const { result } = await res.json();
const pipeline = result.data.json;

Authentication

All API procedures (except the agent enrollment endpoint) require an authenticated session.

VectorFlow supports two authentication methods:

  1. Session cookies -- Used by the web UI. When you sign in, an authjs.session-token cookie is set. Include this cookie in tRPC API requests.
  2. Service account API keys -- Used for programmatic access via the REST API (/api/v1/*). Pass the key as a Bearer token in the Authorization header.

For CI/CD and automation, create a Service Account to get a dedicated API key with scoped permissions.

Roles

Every procedure enforces a minimum role. VectorFlow has three roles, in ascending order of privilege:

RoleLevelDescription
VIEWER0Read-only access to pipelines, fleet, metrics, and logs
EDITOR1Create, update, deploy, and delete pipelines, secrets, and alerts
ADMIN2Manage environments, teams, members, enrollment tokens, and agent revocation

Some procedures require Super Admin access -- this is a server-wide flag on the user account, separate from team roles.


Router index

RouterPrefixDescription
pipelinepipeline.*Pipeline CRUD, graph saving, versioning, deployment status, metrics, logs, event sampling
deploydeploy.*Deploy preview, deploy to agents, undeploy
fleetfleet.*Fleet node management, node logs, node metrics, agent updates
environmentenvironment.*Environment CRUD, enrollment tokens
alertalert.*Alert rules, webhooks, alert events
templatetemplate.*Pipeline template management
secretsecret.*Encrypted secret management
certificatecertificate.*TLS certificate management
dashboarddashboard.*Dashboard statistics and chart data
teamteam.*Team management, member roles
useruser.*User profile, password changes, TOTP setup
auditaudit.*Audit log queries
vrlvrl.*VRL expression testing
vrlSnippetvrlSnippet.*VRL snippet library
adminadmin.*User management, super admin operations
settingssettings.*System settings — OIDC, fleet, backup, SCIM (Super Admin)
metricsmetrics.*Pipeline and component metrics, live rates
validatorvalidator.*Pipeline config validation
serviceAccountserviceAccount.*Service account API key management
userPreferenceuserPreference.*Per-user UI preferences
sharedComponentsharedComponent.*Reusable pipeline components shared across pipelines
aiai.*AI assistant conversations and suggestions
pipelineGrouppipelineGroup.*Pipeline folder organization
pipelineDependencypipelineDependency.*Inter-pipeline dependency graph
promotionpromotion.*Cross-environment pipeline promotion with approval workflow
stagedRolloutstagedRollout.*Canary and staged pipeline deployments
nodeGroupnodeGroup.*Node grouping with label-based criteria and health stats
webhookEndpointwebhookEndpoint.*Outbound webhook endpoint management and delivery history
gitSyncgitSync.*GitOps sync status, jobs, and error tracking
migrationmigration.*Config migration from Fluentd to Vector
analyticsanalytics.*Cost analytics, per-pipeline breakdown, CSV export
costRecommendationcostRecommendation.*Cost optimization recommendations and analysis
anomalyanomaly.*Anomaly detection events, acknowledgement, dismissal
filterPresetfilterPreset.*Saved filter presets for pipeline and fleet views

Pipeline router

Manage pipeline definitions, graphs, versions, and runtime data.

ProcedureTypeMin RoleInputDescription
pipeline.listqueryVIEWER{ environmentId: string }List all pipelines in an environment
pipeline.getqueryVIEWER{ id: string }Get a pipeline with its nodes, edges, and config change status
pipeline.createmutationEDITOR{ name: string, description?: string, environmentId: string }Create a new draft pipeline
pipeline.updatemutationEDITOR{ id: string, name?: string, description?: string | null }Update pipeline name or description
pipeline.deletemutationEDITOR{ id: string }Delete a pipeline (undeploys first if deployed)
pipeline.clonemutationEDITOR{ pipelineId: string }Clone a pipeline within the same environment
pipeline.promotemutationEDITOR{ pipelineId: string, targetEnvironmentId: string, name?: string }Copy a pipeline to a different environment (strips secrets)
pipeline.saveGraphmutationEDITOR{ pipelineId: string, nodes: Node[], edges: Edge[], globalConfig?: object }Save the visual pipeline graph
pipeline.versionsqueryVIEWER{ pipelineId: string }List all deployed versions of a pipeline
pipeline.getVersionqueryVIEWER{ versionId: string }Get a specific version with its config YAML
pipeline.createVersionmutationEDITOR{ pipelineId: string, configYaml: string, changelog?: string }Create a new pipeline version
pipeline.rollbackmutationEDITOR{ pipelineId: string, targetVersionId: string }Roll back to a previous version
pipeline.deploymentStatusqueryVIEWER{ pipelineId: string }Get per-node deployment status for a pipeline
pipeline.metricsqueryVIEWER{ pipelineId: string, hours?: number }Get pipeline metrics (events, bytes, errors) over time
pipeline.logsqueryVIEWER{ pipelineId: string, cursor?: string, limit?: number, levels?: LogLevel[], nodeId?: string, since?: Date }Paginated pipeline logs
pipeline.requestSamplesmutationEDITOR{ pipelineId: string, componentKeys: string[], limit?: number }Request live event samples from running components
pipeline.sampleResultqueryVIEWER{ requestId: string }Poll for event sample results
pipeline.eventSchemasqueryVIEWER{ pipelineId: string }Get discovered event schemas per component
Pipeline name validation

Pipeline names must match the pattern ^[a-zA-Z0-9][a-zA-Z0-9 _-]*$ and be between 1 and 100 characters long. The name must start with a letter or number and may contain letters, numbers, spaces, hyphens, and underscores.

Node schema

Each node in the saveGraph input:

FieldTypeDescription
idstring?Optional ID (auto-generated if omitted)
componentKeystringAuto-generated unique identifier within the pipeline (e.g., syslog_k7xMp2nQ). Must match ^[a-zA-Z_][a-zA-Z0-9_]*$
displayNamestring?Optional human-readable name for the component (e.g., "Syslog Source")
componentTypestringVector component type (e.g., syslog, remap, aws_s3)
kind"SOURCE" | "TRANSFORM" | "SINK"Component category
configobjectComponent configuration fields
positionXnumberX coordinate in the visual editor
positionYnumberY coordinate in the visual editor
disabledbooleanWhether the node is excluded from the generated config

Deploy router

Preview and execute pipeline deployments.

ProcedureTypeMin RoleInputDescription
deploy.previewqueryVIEWER{ pipelineId: string }Generate and validate the YAML config, return diff against deployed version
deploy.agentmutationEDITOR{ pipelineId: string, changelog: string }Deploy a pipeline -- validates config, creates a version, marks as deployed
deploy.undeploymutationEDITOR{ pipelineId: string }Undeploy a pipeline (agents stop it on next poll)
deploy.environmentInfoqueryVIEWER{ pipelineId: string }Get the environment and node list for a pipeline

Fleet router

Manage agent nodes and view their status, logs, and metrics.

ProcedureTypeMin RoleInputDescription
fleet.listqueryVIEWER{ environmentId: string }List all nodes in an environment
fleet.getqueryVIEWER{ id: string }Get a node with its pipeline statuses
fleet.createmutationEDITOR{ name: string, host: string, apiPort?: number, environmentId: string }Register a node manually
fleet.updatemutationEDITOR{ id: string, name?: string }Update node name
fleet.deletemutationEDITOR{ id: string }Delete a node
fleet.revokeNodemutationADMIN{ id: string }Revoke a node's token (prevents further communication)
fleet.nodeLogsqueryVIEWER{ nodeId: string, cursor?: string, limit?: number, levels?: LogLevel[], pipelineId?: string }Paginated logs for a node
fleet.nodeMetricsqueryVIEWER{ nodeId: string, hours?: number }System metrics for a node (CPU, memory, disk, network)
fleet.triggerAgentUpdatemutationADMIN{ nodeId: string, targetVersion: string, downloadUrl: string, checksum: string }Trigger a self-update on a standalone agent
fleet.listWithPipelineStatusqueryVIEWER{ environmentId: string }List nodes with per-pipeline deployment status

Environment router

Manage environments and enrollment tokens.

ProcedureTypeMin RoleInputDescription
environment.listqueryVIEWER{ teamId: string }List environments for a team
environment.getqueryVIEWER{ id: string }Get environment details including node count
environment.createmutationEDITOR{ name: string, teamId: string }Create a new environment
environment.updatemutationEDITOR{ id: string, name?: string, secretBackend?: string, secretBackendConfig?: any }Update environment name or secret backend
environment.deletemutationADMIN{ id: string }Delete an environment and all its pipelines and nodes
environment.generateEnrollmentTokenmutationADMIN{ environmentId: string }Generate a new enrollment token for agent enrollment
environment.revokeEnrollmentTokenmutationADMIN{ environmentId: string }Revoke the enrollment token
Secret backend options

The secretBackend field accepts one of:

ValueDescription
BUILTINSecrets encrypted in the VectorFlow database (default)
VAULTHashiCorp Vault
AWS_SMAWS Secrets Manager
EXECExternal command execution

Alert router

Manage alert rules, webhook destinations, and view alert events.

Alert rules

ProcedureTypeMin RoleInputDescription
alert.listRulesqueryVIEWER{ environmentId: string }List alert rules for an environment
alert.createRulemutationEDITOR{ name: string, environmentId: string, pipelineId?: string, metric: AlertMetric, condition: AlertCondition, threshold: number, durationSeconds?: number, teamId: string }Create an alert rule
alert.updateRulemutationEDITOR{ id: string, name?: string, enabled?: boolean, threshold?: number, durationSeconds?: number }Update an alert rule
alert.deleteRulemutationEDITOR{ id: string }Delete an alert rule
AlertMetric values
ValueDescription
node_unreachableNode has not sent a heartbeat
cpu_usageHost CPU utilization percentage
memory_usageHost memory utilization percentage
disk_usageHost disk utilization percentage
error_ratePipeline error events per second
discarded_ratePipeline discarded events per second
pipeline_crashedPipeline process has crashed
AlertCondition values
ValueDescription
gtGreater than threshold
ltLess than threshold
eqEqual to threshold

Alert webhooks

ProcedureTypeMin RoleInputDescription
alert.listWebhooksqueryVIEWER{ environmentId: string }List webhook destinations
alert.createWebhookmutationEDITOR{ environmentId: string, url: string, headers?: Record<string, string>, hmacSecret?: string }Create a webhook
alert.updateWebhookmutationEDITOR{ id: string, url?: string, headers?: Record<string, string> | null, hmacSecret?: string | null, enabled?: boolean }Update a webhook
alert.deleteWebhookmutationEDITOR{ id: string }Delete a webhook
alert.testWebhookmutationEDITOR{ id: string }Send a test alert payload to a webhook

Alert events

ProcedureTypeMin RoleInputDescription
alert.listEventsqueryVIEWER{ environmentId: string, limit?: number, cursor?: string }Paginated list of alert events

Template router

Manage reusable pipeline templates.

ProcedureTypeMin RoleInputDescription
template.listqueryVIEWER{ teamId: string }List all templates for a team
template.getqueryVIEWER{ id: string }Get a template with its nodes and edges
template.createmutationEDITOR{ name: string, description: string, category: string, teamId: string, nodes: Node[], edges: Edge[] }Create a template
template.deletemutationEDITOR{ id: string }Delete a template

Secret router

Manage encrypted secrets for pipeline configurations.

ProcedureTypeMin RoleInputDescription
secret.listqueryVIEWER{ environmentId: string }List secrets (names only, no values)
secret.createmutationEDITOR{ environmentId: string, name: string, value: string }Create a secret
secret.updatemutationEDITOR{ id: string, environmentId: string, value: string }Update a secret value
secret.deletemutationEDITOR{ id: string, environmentId: string }Delete a secret

Secret values are never returned by the API. The list endpoint returns only names and timestamps. Values are encrypted at rest and only decrypted during pipeline deployment.


Certificate router

Manage TLS certificates for pipeline components.

ProcedureTypeMin RoleInputDescription
certificate.listqueryVIEWER{ environmentId: string }List certificates (metadata only)
certificate.uploadmutationEDITOR{ environmentId: string, name: string, filename: string, fileType: "ca" | "cert" | "key", dataBase64: string }Upload a PEM-encoded certificate
certificate.deletemutationEDITOR{ id: string, environmentId: string }Delete a certificate

Dashboard router

Fetch dashboard statistics and chart data.

ProcedureTypeMin RoleInputDescription
dashboard.statsqueryVIEWER{ environmentId: string }Pipeline count, node count, fleet health, data reduction
dashboard.recentPipelinesqueryVIEWER(none)Last 5 recently updated pipelines
dashboard.recentAuditqueryVIEWER(none)Last 10 audit log entries
dashboard.nodeCardsqueryVIEWER(none)Node overview cards with metrics and sparklines
dashboard.pipelineCardsqueryVIEWER{ environmentId: string }Pipeline cards with metrics, rates, and deployment status
dashboard.operationalOverviewqueryVIEWER(none)Unhealthy nodes, deployed pipelines, recent aggregate metrics
dashboard.chartMetricsqueryVIEWER{ environmentId: string, nodeIds?: string[], pipelineIds?: string[], range?: "1h" | "6h" | "1d" | "7d", groupBy?: "pipeline" | "node" | "aggregate" }Time-series chart data for dashboards

Team router

Manage teams and team membership.

ProcedureTypeMin RoleInputDescription
team.listqueryVIEWER(none)List teams the current user belongs to
team.getqueryVIEWER{ id: string }Get team details with members
team.myRolequeryVIEWER(none)Get the current user's highest role
team.teamRolequeryVIEWER{ teamId: string }Get the current user's role in a specific team
team.createmutationSuper Admin{ name: string }Create a new team
team.deletemutationSuper Admin{ teamId: string }Delete a team (must have no environments)
team.renamemutationADMIN{ teamId: string, name: string }Rename a team
team.addMembermutationADMIN{ teamId: string, email: string, role: "VIEWER" | "EDITOR" | "ADMIN" }Add a user to a team
team.removeMembermutationADMIN{ teamId: string, userId: string }Remove a member from a team
team.updateMemberRolemutationADMIN{ teamId: string, userId: string, role: "VIEWER" | "EDITOR" | "ADMIN" }Change a member's role
team.lockMembermutationADMIN{ teamId: string, userId: string }Lock a user account
team.unlockMembermutationADMIN{ teamId: string, userId: string }Unlock a user account
team.resetMemberPasswordmutationADMIN{ teamId: string, userId: string }Reset a member's password (returns temporary password)
team.updateRequireTwoFactormutationADMIN{ teamId: string, requireTwoFactor: boolean }Require 2FA for all team members

User router

Manage the current user's profile and two-factor authentication.

ProcedureTypeMin RoleInputDescription
user.mequeryVIEWER(none)Get current user info (name, email, auth method, 2FA status)
user.changePasswordmutationVIEWER{ currentPassword: string, newPassword: string }Change password (min 8 characters)
user.updateProfilemutationVIEWER{ name: string }Update display name
user.setupTotpmutationVIEWER(none)Begin TOTP 2FA setup (returns QR URI and backup codes)
user.verifyAndEnableTotpmutationVIEWER{ code: string }Verify a TOTP code and enable 2FA
user.disableTotpmutationVIEWER{ code: string }Disable 2FA (requires valid TOTP or backup code)

Audit router

Query the audit log.

ProcedureTypeMin RoleInputDescription
audit.listqueryVIEWER{ action?: string, userId?: string, entityType?: string, search?: string, teamId?: string, environmentId?: string, startDate?: string, endDate?: string, cursor?: string }Paginated, filterable audit log
audit.actionsqueryVIEWER(none)List distinct action values
audit.entityTypesqueryVIEWER(none)List distinct entity type values
audit.usersqueryVIEWER(none)List users who appear in the audit log

VRL router

Test VRL (Vector Remap Language) expressions.

ProcedureTypeMin RoleInputDescription
vrl.testmutationVIEWER{ source: string, input: string }Execute a VRL program against a test event and return the result

VRL Snippet router

Manage the VRL snippet library.

ProcedureTypeMin RoleInputDescription
vrlSnippet.listqueryVIEWER{ teamId: string }List built-in and custom VRL snippets
vrlSnippet.createmutationEDITOR{ teamId: string, name: string, description?: string, category: string, code: string }Create a custom snippet
vrlSnippet.updatemutationEDITOR{ id: string, name?: string, description?: string, category?: string, code?: string }Update a custom snippet
vrlSnippet.deletemutationEDITOR{ id: string }Delete a custom snippet

Admin router

Manage platform users, super admin privileges, and team assignments. All procedures require Super Admin access.

ProcedureTypeMin RoleInputDescription
admin.listUsersquerySuper Admin(none)List all users with team memberships and auth status
admin.createUsermutationSuper Admin{ email: string, name: string, teamId?: string, role?: Role }Create a local user account (returns generated password)
admin.deleteUsermutationSuper Admin{ userId: string }Delete a user and all their data
admin.toggleSuperAdminmutationSuper Admin{ userId: string, isSuperAdmin: boolean }Grant or revoke super admin privileges
admin.assignToTeammutationSuper Admin{ userId: string, teamId: string, role: "VIEWER" | "EDITOR" | "ADMIN" }Assign a user to a team with a role
admin.removeFromTeammutationSuper Admin{ userId: string, teamId: string }Remove a user from a team
admin.lockUsermutationSuper Admin{ userId: string }Lock a user account (prevents sign-in)
admin.unlockUsermutationSuper Admin{ userId: string }Unlock a locked user account
admin.resetPasswordmutationSuper Admin{ userId: string }Generate a temporary password for a user
admin.listTeamsquerySuper Admin(none)List all teams

Settings router

Configure system-wide settings. All procedures require Super Admin access except checkVersion.

General

ProcedureTypeMin RoleInputDescription
settings.getquerySuper Admin(none)Get all system settings (secrets are masked)
settings.checkVersionqueryVIEWER{ force?: boolean }Check server, agent, and dev agent versions

OIDC

ProcedureTypeMin RoleInputDescription
settings.testOidcmutationSuper Admin{ issuer: string }Test OIDC provider discovery
settings.updateOidcmutationSuper Admin{ issuer: string, clientId: string, clientSecret: string, displayName?: string, tokenEndpointAuthMethod?: string }Update OIDC provider configuration
settings.updateOidcRoleMappingmutationSuper Admin{ defaultRole: Role, groupsClaim?: string, adminGroups?: string, editorGroups?: string }Map OIDC groups to VectorFlow roles
settings.updateOidcTeamMappingsmutationSuper Admin{ mappings: TeamMapping[], defaultTeamId?: string, defaultRole: Role, groupSyncEnabled: boolean, groupsScope?: string, groupsClaim?: string }Map OIDC groups to teams with roles
TeamMapping schema

Each entry in the mappings array:

FieldTypeDescription
groupstringOIDC group name to match
teamIdstringVectorFlow team to map to
role"VIEWER" | "EDITOR" | "ADMIN"Role to assign in that team

Fleet

ProcedureTypeMin RoleInputDescription
settings.updateFleetmutationSuper Admin{ pollIntervalMs: number, unhealthyThreshold: number, metricsRetentionDays?: number, logsRetentionDays?: number }Update fleet polling interval and data retention

Anomaly detection

ProcedureTypeMin RoleInputDescription
settings.updateAnomalyConfigmutationSuper Admin{ baselineWindowDays: number, sigmaThreshold: number, minStddevFloorPercent: number, dedupWindowHours: number, enabledMetrics: string }Configure anomaly detection parameters (enabledMetrics is comma-delimited)

Backup & restore

ProcedureTypeMin RoleInputDescription
settings.createBackupmutationSuper Admin(none)Create a database backup
settings.listBackupsquerySuper Admin(none)List available backups
settings.previewBackupquerySuper Admin{ filename: string }Preview backup contents
settings.deleteBackupmutationSuper Admin{ filename: string }Delete a backup file
settings.restoreBackupmutationSuper Admin{ filename: string }Restore the database from a backup
settings.updateBackupSchedulemutationSuper Admin{ enabled: boolean, cron: string, retentionCount: number }Configure automatic backup schedule

Storage backend

ProcedureTypeMin RoleInputDescription
settings.testS3ConnectionmutationSuper Admin{ bucket: string, region: string, prefix?: string, accessKeyId: string, secretAccessKey: string, endpoint?: string }Test S3 bucket connectivity
settings.updateStorageBackendmutationSuper Admin{ backend: "local" | "s3", bucket?: string, region?: string, prefix?: string, accessKeyId?: string, secretAccessKey?: string, endpoint?: string }Switch backup storage between local filesystem and S3

SCIM

ProcedureTypeMin RoleInputDescription
settings.updateScimmutationSuper Admin{ enabled: boolean }Enable or disable SCIM provisioning
settings.generateScimTokenmutationSuper Admin(none)Generate a new SCIM bearer token

Metrics router

Query pipeline and component metrics from both the database (historical) and in-memory store (live).

ProcedureTypeMin RoleInputDescription
metrics.getPipelineMetricsqueryVIEWER{ pipelineId: string, minutes?: number }Aggregated pipeline metrics from database (default 60 min, max 10080)
metrics.getComponentMetricsqueryVIEWER{ pipelineId: string, minutes?: number }Live per-component metrics from in-memory store (default 5 min, max 60)
metrics.getComponentLatencyHistoryqueryVIEWER{ pipelineId: string, minutes?: number }Per-component latency time series from database (default 60 min, max 1440)
metrics.getNodePipelineRatesqueryVIEWER{ nodeId: string }Per-pipeline event and byte rates for a specific node
metrics.getLiveRatesqueryVIEWER{ environmentId: string }Per-pipeline live event and byte rates for the pipelines table

Analytics router

Cost analytics and data volume tracking for pipelines, teams, and environments.

ProcedureTypeMin RoleInputDescription
analytics.costSummaryqueryVIEWER{ environmentId: string, range: Range }Aggregated cost summary for KPI cards
analytics.costByPipelinequeryVIEWER{ environmentId: string, range: Range }Per-pipeline cost breakdown table
analytics.topPipelinesqueryVIEWER{ environmentId: string, range: Range }Top 5 pipelines by bytes processed
analytics.costByTeamqueryVIEWER{ environmentId: string, range: Range }Team-level cost rollup for chargeback (super admins see all teams)
analytics.costByEnvironmentqueryVIEWER{ environmentId: string, range: Range }Environment comparison view
analytics.costTimeSeriesqueryVIEWER{ environmentId: string, range: Range, groupBy?: "pipeline" | "team" }Volume trend time series, grouped by pipeline or team
analytics.costCsvqueryVIEWER{ environmentId: string, range: Range }Export cost data as CSV
Range values

All analytics queries accept the same range parameter:

ValueDescription
1hLast hour
6hLast 6 hours
1dLast 24 hours
7dLast 7 days
30dLast 30 days

Anomaly router

View and manage anomaly detection events. Anomalies are automatically detected based on the anomaly configuration in system settings.

ProcedureTypeMin RoleInputDescription
anomaly.listqueryVIEWER{ environmentId: string, pipelineId?: string, status?: "open" | "acknowledged" | "dismissed", limit?: number, cursor?: string }Paginated list of anomalies with optional filters
anomaly.countByPipelinequeryVIEWER{ environmentId: string }Count of open anomalies per pipeline
anomaly.maxSeverityByPipelinequeryVIEWER{ environmentId: string }Maximum severity level per pipeline
anomaly.acknowledgemutationEDITOR{ environmentId: string, anomalyId: string }Acknowledge an anomaly
anomaly.dismissmutationEDITOR{ environmentId: string, anomalyId: string }Dismiss an anomaly

Cost Recommendation router

View and act on cost optimization recommendations generated by automated analysis.

ProcedureTypeMin RoleInputDescription
costRecommendation.listqueryVIEWER{ environmentId: string, status?: "PENDING" | "DISMISSED" | "APPLIED", limit?: number }List cost recommendations with optional status filter
costRecommendation.getByIdqueryVIEWER{ environmentId: string, id: string }Get a recommendation with affected pipeline nodes
costRecommendation.summaryqueryVIEWER{ environmentId: string }Summary stats — pending count and estimated savings
costRecommendation.dismissmutationEDITOR{ environmentId: string, id: string }Dismiss a recommendation
costRecommendation.markAppliedmutationEDITOR{ environmentId: string, id: string }Mark a recommendation as applied
costRecommendation.triggerAnalysismutationADMIN{ environmentId: string }Manually trigger cost analysis

Validator router

Validate pipeline configuration YAML.

ProcedureTypeMin RoleInputDescription
validator.validatemutationVIEWER{ yaml: string }Validate a YAML configuration string and return any errors

Pipeline Group router

Organize pipelines into nested folder groups (max 3 levels deep).

ProcedureTypeMin RoleInputDescription
pipelineGroup.listqueryVIEWER{ environmentId: string }List all pipeline groups in an environment
pipelineGroup.createmutationEDITOR{ environmentId: string, name: string, color?: string, parentId?: string }Create a pipeline group (unique name per parent, max 3-level nesting)
pipelineGroup.updatemutationEDITOR{ id: string, name?: string, color?: string, parentId?: string }Update group name, color, or parent
pipelineGroup.deletemutationADMIN{ id: string }Delete a group (child groups are orphaned to root)

Pipeline Dependency router

Define and query dependencies between pipelines. Used to warn before deploying or undeploying pipelines with active dependencies.

ProcedureTypeMin RoleInputDescription
pipelineDependency.listqueryVIEWER{ pipelineId: string }List upstream dependencies for a pipeline
pipelineDependency.listCandidatesqueryVIEWER{ pipelineId: string, environmentId: string }List pipelines available to link as dependencies
pipelineDependency.addmutationEDITOR{ upstreamId: string, downstreamId: string, description?: string }Add a dependency between two pipelines
pipelineDependency.removemutationEDITOR{ id: string }Remove a dependency
pipelineDependency.deployWarningsqueryVIEWER{ pipelineId: string }List undeployed upstream dependencies (deploy warnings)
pipelineDependency.undeployWarningsqueryVIEWER{ pipelineId: string }List deployed downstream dependents (undeploy warnings)
pipelineDependency.graphqueryVIEWER{ environmentId: string }Full dependency graph for an environment

Promotion router

Promote pipelines across environments with an optional approval workflow.

ProcedureTypeMin RoleInputDescription
promotion.preflightqueryVIEWER{ pipelineId: string, targetEnvironmentId: string, name?: string }Check promotion readiness — missing secrets, name collisions
promotion.diffPreviewqueryVIEWER{ pipelineId: string }Generate a YAML diff between source and target
promotion.initiatemutationEDITOR{ pipelineId: string, targetEnvironmentId: string, name?: string }Initiate a promotion request
promotion.approvemutationEDITOR{ requestId: string }Approve a pending promotion (self-approval blocked)
promotion.rejectmutationEDITOR{ requestId: string, note?: string }Reject a pending promotion
promotion.cancelmutationEDITOR{ requestId: string }Cancel a promotion (only the original promoter)
promotion.historyqueryVIEWER{ pipelineId: string }List promotion history (last 20 requests)
Promotion statuses
StatusDescription
PENDINGAwaiting approval from another team member
DEPLOYEDAuto-approved and deployed to the target environment
AWAITING_PR_MERGEGitOps mode — waiting for the generated PR to be merged
REJECTEDRejected by a reviewer
CANCELLEDCancelled by the original promoter

Staged Rollout router

Perform canary deployments by rolling out pipeline changes to a subset of nodes before broadening to the full fleet.

ProcedureTypeMin RoleInputDescription
stagedRollout.createmutationEDITOR{ pipelineId: string, canarySelector: object, healthCheckWindowMinutes: number, changelog: string }Create a staged rollout (deploys to canary nodes first)
stagedRollout.broadenmutationEDITOR{ rolloutId: string }Broaden the rollout to additional nodes
stagedRollout.rollbackmutationEDITOR{ rolloutId: string }Roll back the staged rollout
stagedRollout.getActivequeryVIEWER{ pipelineId: string }Get the active rollout for a pipeline (if any)
stagedRollout.listqueryVIEWER{ pipelineId: string }List recent rollouts (last 10)
Rollout statuses
StatusDescription
CANARY_DEPLOYEDDeployed to canary nodes, awaiting health check or broadening
HEALTH_CHECKHealth check window in progress
BROADENEDRolled out to all nodes
ROLLED_BACKRolled back to previous version

Node Group router

Organize fleet nodes into groups based on label criteria. Groups provide aggregated health statistics and compliance tracking.

ProcedureTypeMin RoleInputDescription
nodeGroup.listqueryVIEWER{ environmentId: string }List node groups in an environment
nodeGroup.createmutationADMIN{ environmentId: string, name: string, criteria: Record<string, string>, labelTemplate?: Record<string, string>, requiredLabels?: string[] }Create a node group with label-based membership criteria
nodeGroup.updatemutationADMIN{ id: string, name?: string, criteria?: Record<string, string>, labelTemplate?: Record<string, string>, requiredLabels?: string[] }Update group properties
nodeGroup.deletemutationADMIN{ id: string }Delete a node group
nodeGroup.groupHealthStatsqueryVIEWER{ environmentId: string }Aggregated health stats per group (includes __ungrouped__ synthetic entry)
nodeGroup.nodesInGroupqueryVIEWER{ groupId: string, environmentId: string }List nodes in a group with status, labels, and compliance info

Service Account router

Manage service accounts for programmatic API access via the REST API.

ProcedureTypeMin RoleInputDescription
serviceAccount.listqueryADMIN{ environmentId: string }List service accounts for an environment
serviceAccount.createmutationADMIN{ environmentId: string, name: string, description?: string, permissions: Permission[], expiresInDays?: number }Create a service account (returns the raw API key once)
serviceAccount.revokemutationADMIN{ id: string }Disable a service account
serviceAccount.deletemutationADMIN{ id: string }Permanently delete a service account
Permission values
PermissionDescription
pipelines.readRead pipeline definitions, versions, and metrics
pipelines.deployDeploy, undeploy, and rollback pipelines
nodes.readRead node status, logs, and metrics
nodes.manageManage nodes (maintenance mode, updates)
secrets.readList secret names
secrets.manageCreate, update, and delete secrets
alerts.readRead alert rules and events
alerts.manageCreate, update, and delete alert rules
audit.readRead audit log

The raw API key is only returned once during creation. Store it securely — it cannot be retrieved later. Keys are prefixed with vf_ and hashed (SHA-256) before storage.


Webhook Endpoint router

Manage outbound webhook endpoints for alert notifications. See also Outbound Webhooks.

ProcedureTypeMin RoleInputDescription
webhookEndpoint.listqueryVIEWER{ teamId: string }List webhook endpoints (secrets excluded)
webhookEndpoint.createmutationADMIN{ teamId: string, name: string, url: string, eventTypes: AlertMetric[], secret?: string }Create a webhook endpoint (secret is encrypted at rest)
webhookEndpoint.updatemutationADMIN{ id: string, teamId: string, name?: string, url?: string, eventTypes?: AlertMetric[], secret?: string }Update a webhook endpoint
webhookEndpoint.deletemutationADMIN{ id: string, teamId: string }Delete a webhook endpoint and its delivery history
webhookEndpoint.toggleEnabledmutationADMIN{ id: string, teamId: string }Toggle the endpoint enabled/disabled
webhookEndpoint.testDeliverymutationADMIN{ id: string, teamId: string }Send a test delivery to the endpoint
webhookEndpoint.listDeliveriesqueryVIEWER{ webhookEndpointId: string, teamId: string, take?: number, skip?: number }Paginated delivery history (default 20, max 100)

Git Sync router

Monitor and manage GitOps synchronization. See also GitOps.

ProcedureTypeMin RoleInputDescription
gitSync.statusqueryVIEWER{ environmentId: string }Get sync status summary (repo URL, branch, mode, pending/failed counts, last sync)
gitSync.jobsqueryVIEWER{ environmentId: string, status?: "pending" | "completed" | "failed", limit?: number }List recent sync jobs (default 25, max 100)
gitSync.retryJobmutationEDITOR{ jobId: string }Retry a single failed sync job
gitSync.retryAllFailedmutationEDITOR{ environmentId: string }Retry all failed sync jobs
gitSync.importErrorsqueryVIEWER{ environmentId: string, limit?: number }Get recent import errors from the audit log (default 10, max 50)

Migration router

Migrate pipeline configurations from other platforms to VectorFlow. Currently supports Fluentd.

ProcedureTypeMin RoleInputDescription
migration.listqueryVIEWER{ teamId: string }List migration projects for a team
migration.getqueryVIEWER{ id: string, teamId: string }Get a migration project with its blocks and status
migration.createmutationEDITOR{ teamId: string, name: string, platform: "FLUENTD", originalConfig: string }Create a migration project (config max 500 KB)
migration.deletemutationEDITOR{ id: string, teamId: string }Delete a migration project
migration.parsemutationEDITOR{ id: string, teamId: string }Parse the original config into translatable blocks
migration.translatemutationEDITOR{ id: string, teamId: string }Translate all blocks to Vector config via AI
migration.retranslateBlockmutationEDITOR{ id: string, teamId: string, blockId: string }Re-translate a single block
migration.updateBlockConfigmutationEDITOR{ id: string, teamId: string, blockId: string, config: Record<string, unknown> }Manually edit a translated block's config
migration.validatemutationEDITOR{ id: string, teamId: string }Validate the translated configuration
migration.generatemutationEDITOR{ id: string, teamId: string, environmentId: string, pipelineName: string }Generate a VectorFlow pipeline from the translated config

The translate procedure requires an AI provider to be configured for the team. The migration workflow is: createparsetranslate → (optional: edit blocks) → validategenerate.


AI router

Manage AI assistant conversations for pipeline building, debugging, and VRL authoring.

ProcedureTypeMin RoleInputDescription
ai.getConversationqueryVIEWER{ pipelineId: string }Get the AI conversation for a pipeline
ai.startNewConversationmutationEDITOR{ pipelineId: string }Start a new AI conversation (replaces existing)
ai.markSuggestionsAppliedmutationEDITOR{ pipelineId: string, conversationId: string, messageId: string, suggestionIds: string[] }Mark AI suggestions as applied to the pipeline
ai.getDebugConversationqueryVIEWER{ pipelineId: string }Get the debug-mode AI conversation
ai.getVrlConversationqueryVIEWER{ pipelineId: string, componentKey: string }Get the VRL assistant conversation for a component
ai.markVrlSuggestionsAppliedmutationEDITOR{ pipelineId: string, conversationId: string, messageId: string, suggestionIds: string[] }Mark VRL suggestions as applied

User Preference router

Store and retrieve per-user UI preferences (e.g., theme, default views, collapsed sidebar sections).

ProcedureTypeMin RoleInputDescription
userPreference.getqueryVIEWER(none)Get all preferences for the current user
userPreference.setmutationVIEWER{ key: string, value: string }Set a preference (key max 100 chars, value max 500 chars)
userPreference.deletemutationVIEWER{ key: string }Delete a preference

Shared Component router

Manage reusable pipeline components that can be linked across multiple pipelines. When a shared component is updated, linked pipelines show a staleness indicator until the update is accepted.

ProcedureTypeMin RoleInputDescription
sharedComponent.listqueryVIEWER{ environmentId: string }List shared components with linked pipeline count
sharedComponent.getByIdqueryVIEWER{ id: string, environmentId: string }Get a component with linked pipeline details and staleness info
sharedComponent.createmutationEDITOR{ environmentId: string, name: string, description?: string, componentType: string, kind: "SOURCE" | "TRANSFORM" | "SINK", config: object }Create a shared component
sharedComponent.createFromNodemutationEDITOR{ nodeId: string, pipelineId: string, name: string, description?: string, environmentId: string }Create a shared component from an existing pipeline node
sharedComponent.updatemutationEDITOR{ id: string, environmentId: string, name?: string, description?: string, config?: object }Update a shared component (config changes bump the version)
sharedComponent.deletemutationEDITOR{ id: string, environmentId: string }Delete a shared component
sharedComponent.acceptUpdatemutationEDITOR{ nodeId: string, pipelineId: string }Accept the latest shared component config for a single node
sharedComponent.acceptUpdateBulkmutationEDITOR{ pipelineId: string }Accept updates for all stale nodes in a pipeline
sharedComponent.unlinkmutationEDITOR{ nodeId: string, pipelineId: string }Unlink a node from its shared component (keeps current config)
sharedComponent.linkExistingmutationEDITOR{ nodeId: string, pipelineId: string, sharedComponentId: string }Link a node to an existing shared component

Filter Preset router

Save and manage filter presets for the pipeline list and fleet matrix views.

ProcedureTypeMin RoleInputDescription
filterPreset.listqueryVIEWER{ environmentId: string, scope: "pipeline_list" | "fleet_matrix" }List filter presets for a scope
filterPreset.createmutationEDITOR{ environmentId: string, name: string, scope: "pipeline_list" | "fleet_matrix", filters: Record<string, unknown>, isDefault?: boolean }Create a filter preset (max 20 per scope)
filterPreset.updatemutationEDITOR{ environmentId: string, id: string, name?: string, filters?: Record<string, unknown> }Update a preset
filterPreset.deletemutationEDITOR{ environmentId: string, id: string }Delete a preset
filterPreset.setDefaultmutationEDITOR{ environmentId: string, id: string, scope: "pipeline_list" | "fleet_matrix" }Set a preset as the default for its scope
filterPreset.clearDefaultmutationEDITOR{ environmentId: string, scope: "pipeline_list" | "fleet_matrix" }Clear the default preset for a scope

Error handling

tRPC errors are returned with a standard error shape:

{
  "error": {
    "json": {
      "message": "Pipeline not found",
      "code": -32004,
      "data": {
        "code": "NOT_FOUND",
        "httpStatus": 404
      }
    }
  }
}

Common error codes:

tRPC CodeHTTP StatusMeaning
UNAUTHORIZED401Not signed in
FORBIDDEN403Insufficient role or not a team member
NOT_FOUND404Resource does not exist
BAD_REQUEST400Invalid input
CONFLICT409Resource already exists (duplicate name)
PRECONDITION_FAILED412Operation requires a precondition (e.g., pipeline must be deployed)

OpenAPI Specification

VectorFlow provides a machine-readable OpenAPI 3.1 specification covering all REST v1 endpoints and key tRPC procedures.

Fetching the spec

curl -s https://vectorflow.example.com/api/v1/openapi.json | jq .info

The spec is served at /api/v1/openapi.json with CORS enabled — you can fetch it from any origin without credentials.

Importing into tools

Postman: File > Import > paste URL https://vectorflow.example.com/api/v1/openapi.json

Swagger UI / Stoplight: Point to the spec URL or paste the JSON content.

Client generation

Generate a typed API client in any language using openapi-generator:

npx @openapitools/openapi-generator-cli generate \
  -i https://vectorflow.example.com/api/v1/openapi.json \
  -g python \
  -o ./vectorflow-client

What's included

The spec documents two API surfaces:

SurfaceAuthEndpoints
REST v1 (/api/v1/*)Service account Bearer tokenPipeline CRUD, deploy, rollback, nodes, secrets, alerts, audit
tRPC (/api/trpc/*)Session cookiePipeline management, fleet, environments, secrets, deploy, alerts, service accounts

tRPC encoding note: tRPC endpoints use SuperJSON encoding. For queries, input is URL-encoded JSON in ?input= (wrap as {"json": <input>}). For mutations, the body is {"json": <input>}. Using a tRPC client is recommended for full type safety; the OpenAPI spec is provided for discoverability and non-TypeScript integrations.


REST API (v1)

The REST API provides a standard HTTP interface for automation and CI/CD. All endpoints require a Service Account API key.

Authentication

Include your API key in the Authorization header:

curl -H "Authorization: Bearer vf_live_abc123..." \
  https://vectorflow.example.com/api/v1/pipelines

Responses use standard HTTP status codes and return JSON:

{ "error": "Unauthorized" }     // 401
{ "error": "Forbidden" }        // 403
{ "error": "Pipeline not found" } // 404

Service Account Management

Service accounts are managed via the tRPC API (Settings UI) or programmatically:

ProcedureTypeMin RoleDescription
serviceAccount.listqueryADMINList service accounts for an environment
serviceAccount.createmutationADMINCreate a service account (returns raw key once)
serviceAccount.revokemutationADMINDisable a service account
serviceAccount.deletemutationADMINPermanently delete a service account

Pipelines

List pipelines

GET /api/v1/pipelines

Permission: pipelines.read

Returns all pipelines in the service account's environment.

curl -s https://vectorflow.example.com/api/v1/pipelines \
  -H "Authorization: Bearer vf_live_..."

Response:

{
  "pipelines": [
    {
      "id": "clxyz123",
      "name": "syslog-to-s3",
      "description": "Ship syslog to S3",
      "isDraft": false,
      "deployedAt": "2026-03-01T12:00:00.000Z",
      "createdAt": "2026-02-15T10:00:00.000Z",
      "updatedAt": "2026-03-01T12:00:00.000Z"
    }
  ]
}

Get pipeline details

GET /api/v1/pipelines/:id

Permission: pipelines.read

curl -s https://vectorflow.example.com/api/v1/pipelines/clxyz123 \
  -H "Authorization: Bearer vf_live_..."

Deploy pipeline

POST /api/v1/pipelines/:id/deploy

Permission: pipelines.deploy

Validates the pipeline config, creates a new version, and marks it as deployed. Agents pick up the change on their next poll.

curl -s -X POST https://vectorflow.example.com/api/v1/pipelines/clxyz123/deploy \
  -H "Authorization: Bearer vf_live_..." \
  -H "Content-Type: application/json" \
  -d '{"changelog": "Deployed from CI"}'

Response:

{
  "success": true,
  "versionId": "clversion456",
  "versionNumber": 5
}

Undeploy pipeline

POST /api/v1/pipelines/:id/undeploy

Permission: pipelines.deploy

Marks the pipeline as a draft. Agents stop running it on their next poll.

curl -s -X POST https://vectorflow.example.com/api/v1/pipelines/clxyz123/undeploy \
  -H "Authorization: Bearer vf_live_..."

List pipeline versions

GET /api/v1/pipelines/:id/versions

Permission: pipelines.read

curl -s https://vectorflow.example.com/api/v1/pipelines/clxyz123/versions \
  -H "Authorization: Bearer vf_live_..."

Response:

{
  "versions": [
    {
      "id": "clversion456",
      "version": 5,
      "changelog": "Added error handling transform",
      "createdById": "user123",
      "createdAt": "2026-03-01T12:00:00.000Z"
    }
  ]
}

Rollback pipeline

POST /api/v1/pipelines/:id/rollback

Permission: pipelines.deploy

Rolls back to a previous version by creating a new version with the target version's config.

curl -s -X POST https://vectorflow.example.com/api/v1/pipelines/clxyz123/rollback \
  -H "Authorization: Bearer vf_live_..." \
  -H "Content-Type: application/json" \
  -d '{"targetVersionId": "clversion123"}'

Nodes

List nodes

GET /api/v1/nodes
GET /api/v1/nodes?label=role:production

Permission: nodes.read

Supports optional label filtering via ?label=key:value.

curl -s https://vectorflow.example.com/api/v1/nodes \
  -H "Authorization: Bearer vf_live_..."

Get node details

GET /api/v1/nodes/:id

Permission: nodes.read

curl -s https://vectorflow.example.com/api/v1/nodes/clnode789 \
  -H "Authorization: Bearer vf_live_..."

Toggle maintenance mode

POST /api/v1/nodes/:id/maintenance

Permission: nodes.manage

curl -s -X POST https://vectorflow.example.com/api/v1/nodes/clnode789/maintenance \
  -H "Authorization: Bearer vf_live_..." \
  -H "Content-Type: application/json" \
  -d '{"enabled": true}'

Secrets

List secrets

GET /api/v1/secrets

Permission: secrets.read

Returns secret names and timestamps (never values).

curl -s https://vectorflow.example.com/api/v1/secrets \
  -H "Authorization: Bearer vf_live_..."

Create secret

POST /api/v1/secrets

Permission: secrets.manage

curl -s -X POST https://vectorflow.example.com/api/v1/secrets \
  -H "Authorization: Bearer vf_live_..." \
  -H "Content-Type: application/json" \
  -d '{"name": "AWS_ACCESS_KEY", "value": "AKIA..."}'

Update secret

PUT /api/v1/secrets

Permission: secrets.manage

Identify the secret by id or name:

curl -s -X PUT https://vectorflow.example.com/api/v1/secrets \
  -H "Authorization: Bearer vf_live_..." \
  -H "Content-Type: application/json" \
  -d '{"name": "AWS_ACCESS_KEY", "value": "AKIA_NEW..."}'

Delete secret

DELETE /api/v1/secrets?name=AWS_ACCESS_KEY
DELETE /api/v1/secrets?id=clsecret123

Permission: secrets.manage

curl -s -X DELETE "https://vectorflow.example.com/api/v1/secrets?name=AWS_ACCESS_KEY" \
  -H "Authorization: Bearer vf_live_..."

Alert Rules

List alert rules

GET /api/v1/alerts/rules

Permission: alerts.read

curl -s https://vectorflow.example.com/api/v1/alerts/rules \
  -H "Authorization: Bearer vf_live_..."

Create alert rule

POST /api/v1/alerts/rules

Permission: alerts.manage

curl -s -X POST https://vectorflow.example.com/api/v1/alerts/rules \
  -H "Authorization: Bearer vf_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "High CPU Alert",
    "metric": "cpu_usage",
    "condition": "gt",
    "threshold": 80,
    "durationSeconds": 120,
    "teamId": "clteam123"
  }'

Audit Log

Poll audit events

GET /api/v1/audit
GET /api/v1/audit?after=cursor123&limit=100&action=deploy.agent

Permission: audit.read

Supports cursor-based pagination for polling:

ParameterTypeDefaultDescription
afterstring--Cursor from previous response (for pagination)
limitnumber50Max events to return (1-200)
actionstring--Filter by action type (e.g., deploy.agent)
curl -s "https://vectorflow.example.com/api/v1/audit?limit=100" \
  -H "Authorization: Bearer vf_live_..."

Response:

{
  "events": [ ... ],
  "cursor": "claudit789",
  "hasMore": true
}

To poll for new events, pass the cursor from the previous response:

curl -s "https://vectorflow.example.com/api/v1/audit?after=claudit789&limit=100" \
  -H "Authorization: Bearer vf_live_..."

On this page