mirror of
https://github.com/simstudioai/sim.git
synced 2026-10-29 18:47:25 +08:00
feat(api): make the platform operable headless over v2 (#6912)
* feat(v2): download run output files by API key
Adds GET /api/v2/workflows/{id}/runs/{runId}/files/{fileId}, closing the
async-run loop for headless callers. A run's output carries UserFile URLs
pointing at /api/files/serve/..., which rejects x-api-key outright, so an
async run that produces a file previously had no byte path out for an API
key at all.
The file is addressed by the id the run reported and resolved against the
run's own recorded execution data, from which the storage key is read. The
request never supplies a storage key, so the endpoint cannot be aimed at
bytes the run did not produce. Resolution deliberately reads the
materialized-but-undisplayed recording, because the display projection
strips exactly the `key`/`context` fields a byte read needs.
Also hardens normalizeStartFile to derive a file's storage key only from a
validated internal serve URL, discarding any caller-supplied `key`/`context`.
A workspace API key has no human subject, so the executor resolves its actor
to the workspace billing owner (preprocessing.ts -> resolveSystemBillingAttribution);
verifyFileAccess then authorizes a workspace-context key as that owner, whose
reach is not bounded by the key's workspace. Accepting an attacker-authorable
key made that substitution exploitable as a confused deputy. Normalization is
all-or-nothing, so a forged file now drops the whole files input.
* feat(workflows): one graph-write door, principal-derived audit source, and v2 authoring endpoints
Extract replaceWorkflowNormalizedState as the single persistence primitive for a
workflow graph replace and route both the internal editor save and the Copilot
edit tool through it, so neither can skip state preparation, the row lock, the
lastSynced stamp, or custom-tool extraction by choosing a different entry point.
Derive the audit source from the acting principal instead of hardcoding
'copilot', then widen workflows.variables.apply_operations and
workflows.bulk.move to every principal kind.
Add GET/PUT /api/v2/workflows/{id}/state, POST /operations, /duplicate,
/restore, PATCH /variables, and POST /api/v2/workflows/move over surface-neutral
application use cases; move the edit engine to lib/workflows/editing.
* test(workflows): cover the graph-write primitive, audit source, and the v2 authoring surface
Pin the two-doors fix (preparation runs, the row is locked, custom-tool
extraction is post-commit and best-effort) and the false-audit fix (a session
principal writes source: 'session', a delegated one writes its service). Both
were verified to fail with the fix reverted.
Add the application matrix for replaceWorkflowState, applyWorkflowOperations,
readWorkflowGraph, and restoreWorkflow — role floor, principal-kind rejection
before canonical load, asserted-scope concealment, lock, validation, atomic
conflict, plan gate, and audit-then-notify ordering — plus route tests for
every new endpoint.
* test(workflows): pin the internal graph-write door and the v2 list scope
Characterize saveWorkflowNormalizedState's statuses, messages, and notification
after the persistence extraction, and cover the new scope filter on
GET /api/v2/workflows including a cursor replayed under a different scope.
* feat(api): add v2 block, tool, connector-type, and enrichment catalogs
Adds six read endpoints under /api/v2 that publish Sim's code-defined
catalogs: GET /blocks, GET /blocks/{blockId}, GET /tools,
GET /tools/{toolId}, GET /connector-types, and GET /enrichments.
These read like static reference data and are not. What a caller may
place is decided per workspace by its permission-group integration
allowlist, per organization by which unreleased blocks have been
revealed, per deployment by ALLOWED_INTEGRATIONS, and per workspace
again by the workflows it has deployed as blocks. So all six are plain
defineWorkspaceOperation reads at minimumRole 'read' with
workspaceApiKey 'allow' — the exact policy of credentials.providers.list
— and every response keeps Cache-Control: private, no-store, because an
unrevealed preview block's existence must not leak across organizations
through a shared cache.
Trigger blocks ride as ?capability=trigger rather than a second
endpoint, and workspace custom blocks ride inside /blocks discriminated
by `source`, so "what may I place?" stays a one-call question.
The block projection is extracted out of the Copilot get_blocks_metadata
tool and rewritten onto @/tools/metadata and @/tools/metadata-outputs.
That cuts the tool's own @/tools/registry edge as a side effect: its
module graph drops from 6,756 to 1,318, and the new routes land at
1,673-1,734, next to the shipped /v2/credentials/providers baseline of
1,668.
Supporting changes:
- scripts/sync-tool-metadata.ts derives hostedApiKey ('always' |
'conditional' | 'none') from each tool's `hosting`. The config itself
stays excluded because it holds closures, but "does Sim host the key"
is a first-order authoring question, so the answer is emitted.
- getCopilotToolDescription takes hostedApiKey as an option instead of
reading `hosting` off the tool, so both an executable ToolConfig and
the generated metadata can answer it through one shared derivation.
- principalUserId / allowedIntegrationTypes move out of
lib/credentials/application/provider-catalog.ts into
lib/integrations/principal-scope.server.ts. Two copies of the
workspace integration gate would diverge first on the workspace-key
path, which has no user for permission groups to key on.
- scripts/check-tool-registry-boundary.ts walked page.tsx/layout.tsx
under app/workspace only, so a route importing the executable registry
passed green. It now walks a list of entry sources, seeded with the
four catalog route subtrees and the shared projection barrel. Routes
are covered per subtree rather than wholesale because 122 of ~1,130
route files legitimately execute tools.
Registry sweeps parse every block, tool, connector type, and enrichment
through its published response schema and compare against the wire
round-trip. They caught a real drift while being written: an operation's
inputs were typed as a union of the tool-param and block-input shapes,
and the union resolved to whichever member matched first, silently
dropping a block input's `schema`.
* docs(api): stop publishing a 413 GET /workflows/{id}/state cannot emit
* feat(v2): read upload-session state
Adds GET /api/v2/files/uploads/{uploadId}. Only DELETE was exported, so a
caller that lost track of a transfer could abort it but could not ask
whether the session was still alive, already finalized, or failed — the
resume story was missing.
Runs on a new files.upload.read operation at minimumRole 'read' rather than
reusing uploadCancel, which is a 'write': asking about a session must not
require permission to destroy it. The GET is a control leg like every other,
so it carries the signed upload token and re-authorizes the caller's present
workspace permission through reauthorizeWorkspaceUploadPurpose instead of
resolving the session on its id alone.
* fix(api): reconcile v2 catalog and workflow-authoring integration
Merging the catalog and workflow-authoring branches surfaced four issues
that neither produced in isolation.
- Route and OpenAPI counters were bumped to the same value on both
branches, so git merged them as one change while the merged tree holds
the sum. Corrects the route ratchet to 1142 and the workflows document
to 29 operations (152 total), then regenerates the OpenAPI documents
and the CLI surface from the reconciled contracts.
- The seven new workflow operations were published in the spec but absent
from the workflow API reference groups, which `check:openapi` rejects.
- `route-policies.ts` reached `WorkflowOperationsNotAppliedError` through
`apply-workflow-operations`, dragging the edit engine — and its diff and
comparison dependencies, which reach a client OAuth hook — into every
route that uses the shared workflow error policies. The class moves to
its own leaf module, mirroring `WorkflowImportError`, and each importer
now takes it from there.
- The operations route test shadowed that class inside its module mock, so
`instanceof` matched a fake and the assertion pinned a message the
production class never emits. It now uses the real class and asserts the
real message.
* feat(v2): extract ZIP archives over the public API
Adds POST /api/v2/files/{fileId}/extract and widens files.extract_archive
from principalKinds ['session'] / workspaceApiKey 'deny' to admit personal
and workspace API keys at the unchanged 'write' role.
The widening is an authorization change, so the justification lives in the
operation's TSDoc: extraction grants no capability an API key lacks, since
every file it writes could be created one at a time through files.create and
files.upload.create, both already 'allow' at the same role. It only collapses
many calls into one. The previous ['session'] restriction read as an artifact
of the UI having been the only caller. Delegated services stay out — no
copilot or executor caller exists and admitting one is a separate decision.
The response is counts plus the destination folderPath, never the extracted
files: a large archive would otherwise materialize thousands of objects into
one body. Callers page GET /api/v2/files?folderPath=... instead. The use case
returns the internal display path and the adapter projects it to a v2 path,
keeping the use case surface-neutral.
* feat(v2): extract file text over the public API
Adds GET /api/v2/files/{fileId}/text. Text extraction previously sat behind
checkInternalAuth on /api/files/parse, a route that also mixes in external-URL
fetching, execution-file upload, and multi-file aggregation, so it could not be
reused. The parse call is lifted into a thin application use case instead.
Runs on the existing files.read_content operation unchanged — it is already
workspaceApiKey 'allow' at the read role, and turning bytes it already
authorizes into text grants no further reach.
`degraded` is a required, non-optional boolean on the response. The legacy doc
and ppt parsers deliberately return best-effort or placeholder content rather
than throwing, so an omittable flag would let a client that never checks it
treat guessed text as extracted text. It is reported honestly rather than
converted into an error, because the parsers' behaviour is deliberate and
characterization-tested.
The read is bounded on its input at 25 MiB before extraction rather than on its
output after, given the parsers' documented DoS history; a caller may lower the
ceiling but never raise it.
* feat(v2): restore archived folders and list the archived set
DELETE /api/v2/files/folders archives recursively, so a recursive delete was
unrecoverable over the API: the archived files stayed visible through
GET /api/v2/files?scope=archived, but nothing could rebuild the folder
structure.
Adds POST /api/v2/files/folders/restore, path-addressed like the rest of the
v2 folder family, and a `scope` selector on the folder list so a caller can
find the archived path to hand it.
`scope` extends the files folder-list query rather than the shared
v2ListFoldersQuerySchema: only workspace files have an archived folder set, so
adding it to the shared schema would give tables, workflows, and knowledge a
parameter they ignore. GET /api/v2/files/folders is a FULL_SET_LIST, not paged,
so no cursor binding changes — list-pagination.test.ts passes unchanged.
Restore resolves the archived folder from its path by scanning the archived
set rather than walking the live tree, which by definition does not contain
the folder being restored. The folder-restored analytics hook now reports the
folder actually restored rather than the requested selector, which carries no
id on a path-addressed surface.
* feat(v2): bulk-download a file selection as a zip
Adds GET /api/v2/files/bulk-download, an adapter over the existing
downloadWorkspaceFileItems use case and its internal binary route.
Path collision: a static segment beside [fileId] permanently shadows a file
whose id equals it, and workspaceFileIdSchema does accept [A-Za-z0-9_-]+.
Rather than invent a new shape, this follows the existing bulk-delete sibling:
the hyphenated form cannot be produced by either minted id shape (UUID v4 or
wf_<shortId>), so the shadowed id is unreachable in practice. Documented on
the contract so the reasoning is not lost.
Folders are addressed by path, matching the rest of the v2 file surface. The
paths resolve against the folder set the selection already loads, so it costs
no extra query, and a path matching no folder is rejected rather than silently
dropped — a misspelled folder must not yield a zip of whatever else was
selected. The empty-selection and folder-count guards now account for
folderPaths, which a path-only selection would otherwise have tripped.
Selections are comma-separated only: v2 rejects a query parameter sent more
than once, so a repeated-parameter form would never reach the schema. Pinned by
a test so the contract cannot advertise a form the boundary rejects.
* feat(v2): expose run output files and optional inline bytes on the runs read
GET /api/v2/workflows/{id}/runs/{runId} now reports the files a run produced,
each with the downloadPath that fetches its bytes, and can inline them as
base64 on request.
Gated by includeOutput, matching `output`'s nullability: a caller that did not
ask for output does not receive a file list it did not request. The async
execute request's rejection of includeFileBase64 is deliberately left alone —
at submit time the run has not happened, so there is nothing to inline; reading
a finished run is the first moment the question means anything.
Inlining is capped per file at the executor's 16 MiB inline ceiling, which a
caller may lower but never raise. A file above it answers 413 naming that
file's downloadPath, so the caller is told exactly how to get the bytes rather
than being left stuck.
The descriptor deliberately omits the storage key — files are addressed by id
and the key is re-derived from the run's recording — and omits an expiry, which
the recording does not carry and which would be fabricated if published.
The route becomes headSafe: false, since inlining reads object storage. The
builder enforces that this requires the use case to expose authorize(), so HEAD
still answers from a real authorization rather than from authentication alone.
* feat(v2): permanently delete an archived file
DELETE /api/v2/files/{fileId} only archives — the OpenAPI says its stored bytes
are never removed — so there was no way to actually destroy a file over the API.
Adds the repository primitive, application use case, operation, and
DELETE /api/v2/files/{fileId}/permanent.
A distinct path rather than a flag on the ordinary delete: a query parameter
that turns a recoverable archive into an irreversible destruction is set by
accident, and the two acts carry different minimum roles, which one route
declaration cannot express. The file must already be archived; a live file
answers 409 naming the archive step, so no single request can turn a live file
into lost bytes.
minimumRole 'admin', which forces workspaceApiKey 'deny' since the workspace-key
ceiling is 'write' — the desired policy anyway: unattended credentials should
not destroy bytes.
Row first, then object. The two legs commit independently, so one can survive a
crash between them: deleting the row first leaves at most an orphaned object for
the storage sweep, while the reverse would leave a live row pointing at bytes
that no longer exist — a file that lists and opens but can never be read. A
failed object delete is therefore reported as objectDeleted: false rather than
thrown, because the request has genuinely succeeded once the row is gone. Both
directions are pinned by failure-injection tests, verified to fail when the
order is reversed.
Audited as a distinct FILE_PERMANENTLY_DELETED action, not a reuse of
FILE_DELETED, which records the recoverable archive step.
* feat(api): v2 log analytics, itemized cost, filters, and sortable query
Adds the aggregate and rich-read halves of the public logs surface, and
fixes three defects the existing reads carry.
Aggregate analytics. `GET /api/v2/logs/stats` returns time-bucketed run
counts, success rate, error count, mean latency, and the window bounds,
per workflow and for the workspace. The first-party route was a raw
handler with inline SQL and inline aggregation, so it is split into a
repository (`lib/logs/stats-queries.ts`), a pure aggregator
(`lib/logs/stats.ts`), and an application use case. That route keeps its
legacy authorization — it answers a caller without workspace access with
a zeroed 200, where v2 conceals the workspace as a 404 — and consumes
only the two surface-neutral halves.
`segmentCount` had no `.int()`, `.min()`, or `.max()`, so `0` divided by
zero and `1e9` allocated two billion-element arrays: both caller-reachable
500s. Bounded on both contracts. `workflows` is capped, with the workspace
totals still computed from every workflow and the cut reported as
`workflowsTruncated`.
Detail reads gain the itemized `cost.items` ledger (`null` and `[]` are
distinct answers and both reachable) and `workflowInput`, restoring a
v1→v2 regression.
The list gains `workflowName` and `status` filters, and `includeJobRuns`,
which unions Chat and Sim-agent job runs into the sequence behind a new
`kind` discriminator — without it a job run is indistinguishable from a
run whose workflow was deleted. A filter no job row can answer drops the
branch outright rather than meaning two things across the union.
`POST /api/v2/logs/query` carries the additional sort columns. `GET /logs`
is untouched: its single `order` param rests on there being exactly one
sortable column, and both escapes from that are ruled out, so the rich
read gets its own endpoint — the split the table surface already ships.
It uses the shared keyset scheme with the two nullable sort columns read
through a sentinel, since a keyset cannot compare against null.
`folderPaths` now covers a folder's whole subtree on the public path, as
it already did everywhere else; it previously omitted every nested run
with no error. The path strings did not change, so a folder-scope version
is stamped into the cursor and in-flight tokens restart rather than
silently skipping rows.
Also fixes `folderName`, which ILIKEd `workflow.name` — a copy of the
clause above it — and so searched workflow names instead of folders.
`buildLogSortCursorCondition`'s `IS NULL` disjunct is documented and
pinned: under `NULLS LAST` the null block is only reachable through it,
so removing it as a duplicate-row fix makes those runs unpageable.
Ratchets: route count 1142 -> 1144; logs OpenAPI operations 2 -> 4; total
operations 152 -> 154.
* feat(api): v2 tables run state, dispatch polling, batch update, bulk, archive
Closes the headless gaps on the v2 tables surface.
- Per-cell run state is now readable through an opt-in `includeRunState` on
`GET /rows`, `POST /query`, and `GET /rows/{rowId}`. The default projection
is byte-identical; a page whose sidecar outgrows its byte budget is a 413
rather than a silent truncation.
- Run dispatches are addressable: `GET /tables/dispatches/{dispatchId}`
publishes the column's full four-state domain so polling a finished run is
not a 500, and `GET /tables/{tableId}/dispatches` lists what is in flight.
- `POST /rows/batch-update` takes one distinct patch per row. Its transaction
moved out of the Copilot-only module into a surface-neutral use case both
surfaces now call.
- `GET .../enrichment/{groupId}` publishes the provider cascade, cost, and
timing behind one enrichment cell.
- `POST /tables/bulk-move` and `/bulk-delete` reach the existing bulk use
cases, which now accept folders by canonical path and resolve them inside
the application layer.
- `DELETE` is recoverable: `scope=archived` on the table list plus
`POST /tables/{tableId}/restore`.
* feat(api): expose knowledge chunks, tag writes, archive/restore on v2
Closes the knowledge cluster's remaining public-surface gaps.
Chunks: list/read/create/update/delete/bulk under
`/api/v2/knowledge/{id}/documents/{documentId}/chunks`. `queryChunks` gains
an `id` tiebreaker on every sort so the list pages on a keyset rather than an
offset — `tokenCount` and `enabled` are both non-unique, so a page boundary
inside a run of equal values used to repeat or drop the tied rows. The
internal offset caller is unchanged; the two positioning schemes share one
read.
Tag definitions: create, update, delete, next-slot, usage, and the
document-scoped save and cleanup. Without them a caller could write a tag
value into a slot with no definition and then had no way to name it, so
tag-filtered retrieval was unbuildable end-to-end. `v2KnowledgeTagSchema`
gains `id`, without which PATCH and DELETE are unaddressable. The
document-scoped DELETE is pinned to `action: 'cleanup'`: the domain's `'all'`
deletes the whole knowledge base's tag vocabulary from a document path.
Archive/restore: `GET /api/v2/knowledge/archived` as a sibling route rather
than a `scope` param — the two reads bind different operations and a v2 route
declares one — plus `POST /api/v2/knowledge/{id}/restore`. `knowledge.restore`
is a new workspace operation carrying `delete`'s policy, since an operation's
inverse must not be harder to reach; the internal session route now delegates
its workspace branch to the shared use case and keeps only the legacy personal
one.
Also: `POST .../documents/from-workspace-files` surfaces `addWorkspaceFiles`,
so a file already in workspace storage no longer has to be re-uploaded
byte-for-byte to be indexed; the `chunkingConfig` write widens to the
first-party five-key schema with its refines and separator bounds, while the
response stays `.catchall` so a legacy JSONB row cannot 500; and
`CONNECTOR_MANAGED_RESOURCE_READ_ONLY` joins `FORBIDDEN_DETAIL_CODES` now that
the bare 403 on connector-managed chunk writes is wire-reachable.
Document upsert is deliberately not included.
* feat(api): add v2 credential rotation and a gate-exempt capabilities endpoint
PATCH /api/v2/credentials/{credentialId} rotates service-account secret
material or renames a credential in place, preserving the credential id so
existing workflow, deployment, paused-run, connector, and webhook references
keep working. Re-posting to POST /api/v2/credentials answers 409, and
delete-and-recreate mints a new id, so rotation previously had no door.
The route is adapter-only: updateWorkspaceCredentialUseCase already owned the
rotation, its audit projection, and credentials.update. It gains one additive
assertedWorkspaceId field for the v2 workspace assertion, and the per-principal
credential-type table that deleteCredentialUseCase already applied is lifted
into requireManageableCredentialType so both operations share it. Without it a
personal API key could rename an env_workspace row and toV2Credential's throw
would surface as a caller-reachable 500.
CredentialProviderOperationError now maps to 503 with Retry-After when the
provider is unreachable, instead of the 400 its OrchestrationError('validation')
base projected. A transient outage rendered as a permanent input error invites a
caller to revoke a working credential.
GET /api/v2/meta reports the calling key's rollout cohort, type, and expiry.
It is the one route declaring the new typed gate: 'exempt' option, because the
rollout gate and the unknown-path catch-all answer byte-identical 404s and a
gated /api/v2/meta could never resolve that ambiguity. Authentication still runs
first, so the only fact disclosed is one about the caller's own credential.
* feat(api): publish deployment lifecycle and workflow-MCP v2 surfaces
Adds the four deployment-lifecycle operations v2 was missing, and the
workflow-as-MCP publishing surface, both as adapters over application use
cases that already existed.
Deployment lifecycle:
- PATCH /api/v2/workflows/{id}/versions/{version} relabels a version.
Deliberately not the internal route's body-shape dispatch between
"rename" and "promote to live".
- POST .../versions/{version}/activate promotes a version. Same use case
as rollback under a different transition, on its own path because the
two mean opposite things to a caller.
- POST .../versions/{version}/revert overwrites the draft. Accepts the
literal `active` alongside a version number.
- PATCH /api/v2/workflows/{id}/deployment toggles unauthenticated public
execution.
`workflows.public_api.update` widens from session-only to session plus
personal API key: it is an admin-role change the same accountable human
may make from a script. Workspace keys stay denied. Its EE refusal now
carries PUBLIC_SHARING_NOT_ALLOWED instead of a bare forbidden.
Workflow MCP servers:
- /api/v2/workflow-mcp-servers list, create, update, delete, plus
publish and unpublish of a workflow as a tool. Named apart from
/api/v2/mcp-servers, which registers the external servers Sim calls.
- The six mcp_servers.workflow_deployments operations widen from
['delegated'] to admit sessions and personal API keys; roles and the
workspace-key denial are unchanged.
- The server list gains keyset pagination, matching its external
sibling, since nothing caps how many a workspace publishes.
- Server, tool, and workflow reads move out of the use case into
lib/mcp/queries.
Route ratchet 1150 -> 1160; OpenAPI operations 161 -> 171.
* feat(api): extract chat deployments and publish the v2 surface
Chat deployment was a shipped module with no public API and two
authorization systems: `lib/workflows/application/chat-deployments.ts`
had deploy/undeploy extracted, but only Copilot used them — the REST
routes reimplemented workflow authorization inline, and `PATCH
/api/chat/manage/[id]` additionally owned password encryption, the
auth-type field-clearing matrix, identifier uniqueness, the
redeploy-gating protocol with two 409s, a raw db.update, and a manual
recordAudit.
New `lib/chat-deployments` domain:
- `chat_deployments.list/read/update/delete`, keyed on the deployment
whose workspace is derived by joining its workflow. Creation stays
`workflows.chat.deploy`, which is keyed on the workflow.
- The PATCH extraction, including the field-clearing matrix and the
asynchronous-cutover invariant the route had hand-mirrored from
`performChatDeploy`.
- One `buildChatDeploymentUrl`, replacing three constructions that had
already drifted onto two different host helpers. There is no chat
subdomain, so nothing publishes a host.
- Repository reads moved out of the use cases into
`lib/chat-deployments/queries`.
Internal routes are now adapters over those use cases. `GET /api/chat`
is deliberately not migrated: it scopes by `chat.userId` while every
other chat operation authorizes by workspace admin, and reconciling the
two is a product decision. `PATCH` keeps its 400 for an identifier
collision through a typed `ChatIdentifierInUseError`; v2 reports the
409 the condition actually is.
v2 surface at `/api/v2/chat-deployments`: list, create, read, update,
delete. Workspace-scoped, keyset-paged, and a stored password is never
readable — reads carry `hasPassword` only, and the session-only reveal
endpoint deliberately has no v2 counterpart.
Also: an email- or SSO-gated chat with an empty allow-list is now
refused in the use case rather than only at the internal boundary, since
it is unenterable; and the doc comment on `processHostedKeyCost`
claiming a `usageLog` write is corrected — no such write exists.
Route ratchet 1160 -> 1165; OpenAPI operations 171 -> 176.
* fix(api): close three review findings, two of them caller-reachable
- Run output files are filtered to keys under the run's own execution
prefix. The recording they came from is not a trustworthy key source:
the start block copies every caller-supplied input field verbatim into
its output and `collectUserFilesById` accepts anything carrying the
`UserFile` shape, so a caller could name any storage key and have the
download and base64 paths — neither of which authorizes per file — serve
it back.
- `getBlock` reads own keys only. `BLOCK_REGISTRY` is an object literal,
so `constructor`, `toString` and friends returned inherited functions
that every consumer then treated as a block, turning a path segment into
a 500. `getToolMetadata` already guarded this way.
- A folder-scoped log page no longer unions in every job run in the
workspace. The guard read `filters.folderIds`, which the public surface
never sets — it carries the folder filter in `folderScope` — so the page
contradicted the contract's promise that job runs are dropped whenever a
filter they cannot answer is set.
Also: the log cursor stamps `includeJobRuns` only when it is on, so its
`.default(false)` no longer puts a constant in every fingerprint and
rejects cursors minted before it existed; and the `folderName` subquery is
scoped to the workspace and to workflow folders instead of scanning the
whole `folder` table.
* fix(api): close two more review findings, one an authorization bypass
- `workflows.operations.apply` no longer admits a workspace API key. The
use case authorizes against three per-user policies — the EE permission
config, block visibility, and credential reachability — and all three
take a human subject. An actorless key has none, and both substitutes
fail open: attributing to the workspace billing owner evaluates the
batch as the least-restricted account in the workspace, and passing no
user makes `getUserPermissionConfig` return `null`, which every caller
reads as unrestricted. Either way a workspace constrained by an
allowlist was edited as though it were not. Personal keys keep the
capability, so headless editing is unaffected for a credential that
names a human.
- `GET /workflows/{id}/state` reads its variables through
`parseWorkflowVariables`, and the stored variable response schema drops
the two assertions the column cannot honour. The column has carried a
JSON string and a legacy array as well as the current record, the
realtime `variable.add` op types `type` as `z.any()`, and the parser
writes `name` through verbatim — so the input bounds on the read turned
a stored workflow into a 500 on the endpoint that opens it. The write
schema keeps them, which is where they can still be honoured.
- `GET /workflows?scope=archived` projects folder paths tolerantly.
Archiving a folder cascades onto the workflows inside it but leaves
their `folderId` dangling — which is why restore has to null it — so the
strict projector threw a bare `Error` and took the whole page down with
no cursor able to step past the row.
* fix(files): bind Start-block file keys to the executing workspace
The Start block derived a file's storage key by parsing the caller's own
`url`, which `isInternalFileUrl` matches on any host and
`extractStorageKey` returns verbatim — so a request body could name any
tenant's bytes. The key is now accepted only when its own layout names
the workspace the execution runs in, and every file is dropped when the
execution carries no workspace.
Also bounds `includeFileBase64` with an aggregate response ceiling and a
worker pool instead of an unbounded `Promise.all`, scopes the bulk
download's authorization resource to the workspace when folder paths are
requested, makes the folder-restore selector mutually exclusive at the
type level, and names the bound in the `maxBytes` validation message.
* fix(api): close v2 log review findings
Cursor scope: `scope` on the workflow and table lists carries
`.default('active')`, so it entered every fingerprint as a constant and
refused every cursor minted before the param existed — with the
"cursor does not match the requested filters" 400, which is actively
misleading for a caller that changed nothing. Both now stamp the
default as absent, so only a caller who asked for `archived` gets a new
sequence.
Dashboard stats: `maxWorkflows` capped the response, not the
allocation. Segment series are now densified after the cut instead of
before, so returning 200 series no longer materializes one
`segmentCount`-length array per workflow in the window. The aggregate
still sums every workflow, now from the sparse per-workflow maps.
Cost keyset: `cost_total` is an unconstrained `numeric`, so its anchor
travelled through `Number()` and was compared back at full precision —
rows differing beyond float64 collapsed onto one anchor. Adds
`decimalKey`, which carries the digit string and binds it `::numeric`.
Run detail: `cost_total` is a backfilled projection, so a run predating
the backfill reported `cost: null` even with a real ledger, making
`items` unreachable for exactly the runs the ledger explains. Falls
back to the ledger total.
Also caps the log folder-path index reads at MAX_FOLDERS_PER_WORKSPACE
like every other reader, publishing the folder-tree 413 on the four log
operations; reverts a dead `status` widening in `v2CommaListSchema`;
drops an unread `executionData` select; corrects the segment-count and
searchLogs prose; and replaces the sort-cursor SQL-text assertions with
a two-page walk over a fixture with a null block.
* fix(api): close knowledge v2 review findings
- widen knowledge.list_archived to the delete/restore policy so a workspace
API key can discover what it may restore
- escape LIKE wildcards on the now-public chunk search
- derive tag slot capacity from TAG_SLOT_CONFIG per field type
- type updateKnowledgeBase's chunkingConfig as ChunkingConfig and project
every declared field explicitly
- attribute a restore to the calling surface instead of a literal 'api'
- gate 'knowledge chunks batch-update' behind --yes, since it can delete
- present the tag-cleanup action from the parsed request rather than
faulting on the domain result after the delete committed
- unbind asserted-scope workspaceId from the nested knowledge cursors,
matching the table-row lists
- add executed-SQL coverage for the chunk keyset
* fix(catalog): close the catalog and registry-boundary review findings
The module-graph ratchet treated an entry with no baseline row as
informational, so the six catalog routes and the projection barrel were
unratcheted while the summary still read "within their module-count
baseline". An unbaselined entry now fails --check, the summary counts only
what was actually compared, and the baseline is re-recorded.
The Copilot block-metadata tool — the reason the shared projection exists,
6,756 modules down to 1,321 — was in no guarded subtree. It is now an entry
source and a catalog boundary root.
Catalog behaviour:
- hostedApiKey is gated on the deployment, so a self-hosted install reports
none instead of promising 127 tools' keys it will never supply
- block detail resolves an unversioned base type to its newest version and
projects through the viewer's visibility, so it can no longer 404 a block
the list contains or name it differently
- offset-cursor ordering compares code units rather than the process locale
- projections copy every array they publish instead of handing out the
registries' own
- an options function returning a thenable throws rather than silently
widening the providers-store substitution across the event loop
- a throwing block projection costs the Copilot tool one block, not all of them
- the trigger-kind log returns to debug: chat/manual/api are entry-point
kinds, not authoring defects
Also sweeps the custom-block detail branch against its response schema,
guards each projection module rather than the dead barrel over them, and
drops a provably dead branch in processHostedKeyCost.
* fix(workflows): close v2 workflow-authoring review findings
- Read a blockless draft back as an empty graph. `PUT /state` of
`{ blocks: {}, edges: [] }` — the contract's own published example —
deletes every block row, and the loader answers `null` for a blockless
workflow, so the following `GET /state` answered 404 while the list
endpoint still showed the workflow. Existence is the workflow row's to
decide; the null is now projected as an empty graph.
- Rewrite the `readWorkflowGraph` authorization test so it can fail. It
called `authorize?.()` and asserted only a negative, so deleting
`authorize` or replacing it with a no-op both passed — the invariant the
head-safe `HEAD` path depends on.
- Route `setWorkflowBlockEnabled` through `replaceWorkflowNormalizedState`,
the same door the other two graph writes use, instead of writing the
normalized tables itself without state preparation or custom-tool
extraction.
- Count applied operations directly. Enablement refusals landed in the same
skipped-item array and were subtracted from the operation count, which
`Math.max(applied, 0)` then masked when it went negative.
- Give a `disabled_ancestor` refusal its own member of the published skip
enum instead of reporting it as `block_locked`.
- Refuse an `atomic` batch whose credential or hosted API key would be
stripped, and carry the dropped inputs in the 409 details.
- Publish the whole lint report — `sources`, `sinks`, `orphanBlocks`,
`emptyOutgoingPorts`, `invalidBranchPorts`, `invalidConnectionTargets`,
`fieldIssues`, and the `kind` discriminator on unresolved references —
rather than only free-text reference prose.
- Stop reporting unresolved lint references as `inputValidationErrors`.
`collectUnresolvedReferences` is read-only, so those values stay
persisted; they were double-reported, and falsely as dropped inputs.
- Replace two unfalsifiable negative-principal tests, which used a
principal kind `Exclude`d from `PrincipalKind`, with a reachable one.
- Nits: drop a stranded TSDoc block; assert the membership predicate in the
selector-validator admin test; make the HEAD test assert a representation;
assert the sanitized graph is what `replaceWorkflowState` writes; add a
route test rejecting `baseGraph` in a v2 body; carry
`principalAuditSource` on restore/duplicate/moveBulk audit; unify the two
`base64MaxBytes` ceilings on `MAX_INLINE_MATERIALIZATION_BYTES`.
* fix(api): close seven v2 review findings, one an authorization bypass
Raise mcp_servers.workflow_deployments.update_server to admin: its body
carries isPublic, and a public server executes with no Sim credential, so a
write member could remove authentication from every workflow it publishes.
create_server already grants the same visibility at admin.
Pin the widened operations in registry tests — the six workflow-MCP ones,
the four workflow widenings, and files.extract_archive.
Reject secret fields on a credential that has no rotatable secret instead of
dropping them behind a 200, classify a non-transient provider 4xx as caller
error rather than a retryable outage, and reconcile a provider outage to 503
with Retry-After on all three surfaces.
Give /v2/meta a declarative principal policy through a new defineOperation
factory, carry the key expiry on the auth context instead of reading the
api_key table from the application layer, and make the impossible principal
branch an invariant error rather than a codeless 403.
Enforce the rollout-gate exemption at definition time, against the one
contract path it is reserved for, and remove the gate parameter from the
exported admission helper so the builder is its only door.
* fix(tables): bound the run-state sidecar, and close six v2 review findings
Enforces the 2 MiB run-state ceiling INSIDE the sidecar drain rather than
over its materialized result, refuses the unbounded query form paired with
it, and normalizes the two stored blobs the v2 surface publishes from bare
`as` casts.
- The run-state budget now travels into `loadExecutionsByRow`, which drains
row ids in bounded chunks and refuses before fetching the next one. The
post-hoc `requireBoundedRunState` walk is gone: it measured a spike that
had already happened, and re-serialized every entry to do it.
- Both row reads that accept `includeRunState` cap the page at
`V2_MAX_RUN_STATE_ROW_LIMIT`, and `POST /tables/{id}/query` additionally
refuses the flag paired with `limit: 0`.
- `runState.status` and the enrichment cascade blob are projected onto the
published shape before presentation; both were caller-reachable 500s on a
well-formed read.
- `sim tables bulk-delete` now gates behind `--yes`, and the CLI sweep that
should have caught it covers destructive non-DELETE forms.
- `POST /tables/{id}/restore` is idempotent (200, no audit) like its
knowledge sibling, and bulk folder selection deduplicates after resolution.
- The batch-update backstop keeps the looser Copilot ceiling and says so in
TSDoc: it is a backstop no surface reaches, because the contracts stop a
v2 caller at 1000 and the Copilot tool stops itself at 5000. Each caller
sees the bound that actually applies to it; neither surface's cap moved.
* fix(chat-deployments): close v2 chat review findings
Fixes the chat-deployments slice of the v2 review, several of which are
regressions the application-operation extraction introduced.
- Stop a `500` on schemaless JSONB: the response now declares a stored
shape without bounds and `toV2ChatDeployment` projects
`customizations`, `outputConfigs`, and `allowedEmails` onto it. The
request schemas keep `.strict()` and their bounds.
- Restore the specific validation message on `POST /api/chat` and
`PATCH /api/chat/manage/[id]`, and the deleted test that pinned it.
- Restore `chat_deployments.read` to workspace `admin`; the detail read
serves the visitor gate.
- Narrow the list projection so `chat_deployments.list` can stay a
`read` operation reachable by a workspace API key: `allowedEmails`,
`hasPassword`, and `customizations` are gone from the list entry and
available only from the admin-gated detail read. Serialized field by
field so a field added to the detail shape cannot reach the list by
default.
- Classify create-path failures: `performChatDeploy` carries an
`errorCode`, so an in-flight deployment is a `409` and an invariant
failure a `500` instead of every refusal being a `400`.
- Delete the callerless `GET /api/chat`, which served the encrypted
password column with no response contract.
- Propagate undeploy infrastructure failures instead of concealing them
as `404`, and return `ChatDeploymentView` from both delete paths.
- Name `CHAT_AUTH_MODE_NOT_PERMITTED` on the create path.
- Guard `getBaseUrl` inside `buildChatDeploymentUrl`, which otherwise
throws on a self-host with no `NEXT_PUBLIC_APP_URL`.
- Correct the published allow-list claim: a replacement `allowedEmails`
is applied after the auth-type clear, so it does survive.
- Assert `workspaceId` on the v2 detail routes and reconcile the
concealment TSDoc with what the error policy actually renders.
- Move `resolveActiveWorkspaceApplicationContext` to the workspaces
domain so chat-deployments no longer imports workflow application code.
* test(credentials): pin the reconciled provider-outage status
The internal route alone answered 502 where the v2 surface, the shared
status helper and `PROVIDER_OUTAGE_CODES`' own TSDoc all say 503. The
test pinned the divergence; it now pins the reconciliation, including the
`Retry-After` a 503 carries. Corrects a stale comment that still named
502 as the value callers see.
* fix(executor): restore cloud-storage Start files, dropped by the key rule
The ownership check accepted a key only when it could be parsed out of an
internal `/api/files/serve/...` URL. But the server-side uploader for run
inputs returns a *presigned cloud* URL whenever object storage is
configured, whose path is the bucket key — so every chat-deployment
attachment, API `files[]` payload and generic-webhook file field resolved
no key, and because normalization is all-or-nothing the entire `files`
input was dropped with no error. It passed locally and under vitest only
because the uploader falls back to an internal URL when no object storage
is configured, which is exactly why no test caught it.
The test is ownership, not provenance: a key is accepted when its own
layout names the executing workspace, whether it arrives directly or is
parsed out of the URL. Neither field has to be trusted, since both are
caller-authored and both are held to the same check. A payload whose key
and URL disagree is refused rather than resolved in the caller's favour —
a genuine uploader writes the two consistently, so only a forged pairing
is turned away.
`context` is now derived from the accepted key rather than read from the
payload or the URL's `?context=`, so an owned key can no longer be
labelled with a bucket its bytes do not live in — the hardening the
previous comment claimed but did not perform.
* fix(api): close four defects the fix pass introduced
- `resolveLatest` built a `RegExp` from the caller's block id and read the
registry with a bare lookup, so the catalog detail route — moved onto it
by the version-alias fix — routed around the `ownBlock` guard added for
exactly this. `GET /api/v2/blocks/%5B` was a `SyntaxError` 500 and
`.../constructor` an inherited function. Matched by string comparison
now, the way `tools/tool-ids.ts` resolves the same convention, and read
through `ownBlock`.
- The run-state byte budget was applied inside `queryRows` rather than at
the callers that publish it, so the first-party table grid — which reads
run state at five times the row limit and publishes no ceiling — turned
a large page into a hard failure, with an error naming a parameter it
does not expose. The budget is now an explicit option the public reads
pass and internal callers omit.
- Three graph-write CLI commands shipped ungated because the sweep meant
to catch them matched only the names already enumerated, so it could
never fail. It now forces every non-`GET` operation into a destructive
or non-destructive list, and the three carry confirmations.
- Unbinding `workspaceId` from the knowledge-documents cursor was right on
the merits and wrong in effect: the value is constant per sequence, so
removing it changed the fingerprint and refused every cursor already in
flight. Restored there; the chunks list is new in the same change and
keeps the cleaner reading.
* fix(api): resolve a detail read to a version the viewer can see
`getLatestBlockForViewer` took the newest version and then hid it, which
inverted the contradiction it was written to close: `slack_v2` and
`table_v2` are preview-gated while their v1 deliberately stays in the
toolbar, so an unrevealed viewer got a `404` on a detail read for a type
`GET /api/v2/blocks` was listing in the same breath. It now walks versions
newest-first and answers with the first one visible to that viewer.
Also:
- The chat password guard ran after `performFullDeploy`, so a request that
could never succeed burned a real workflow deployment version and then
answered 400. Its two sibling gate guards already refuse ahead of the
deploy; this one now does too.
- The Copilot sub-block serializer published the registry's own `options`
and `dependsOn` arrays by reference. Pre-existing, but the catalog
projection this parallels copies every array it publishes precisely
because they are process-global and shared by every request.
* fix(api): restore the locked read-modify-write and the password validator
Two findings verified as real regressions against staging, out of ten
checked — the rest were pre-existing, latent, or false.
`setWorkflowBlockEnabled` read the graph outside the row lock and wrote it
back inside a later transaction. The editor's own save takes that same
lock, so an autosave committing in the window was silently discarded: this
operation writes a whole graph, not a delta. The persistence primitive now
accepts a reader that runs after the lock is taken, and the toggle
re-reads and re-decides there. Its lock predicate is also scoped to the
workspace and to a live row again, so a workflow archived mid-flight is
refused rather than written.
The v2 chat-deployment contracts inlined their own password rule twice
instead of using `chatDeploymentPasswordSchema`, losing the refusal of a
whitespace-only password — which the internal contract rejects precisely
because it strands the deployment behind a password the visitor form will
not submit. Both sites use the canonical validator now.
* fix(api): one folder projection, one dynamic-provider list, honest 413s
- `toV2Folder` existed twice, and the second copy had been written without
the name/path invariant — so a row the list read refuses loudly would
have been served with a mismatched pair by the restore read. One
definition, guard included.
- The catalog projection restated `DYNAMIC_MODEL_PROVIDERS` and had
drifted by one member. Derived from the canonical list instead.
- The tables reads documented a `413` for run state that they cannot emit
— the budget became opt-in, and the row limit is the bound now — so the
claim is removed rather than declared. The workflow run read has the
opposite problem: it genuinely emits one, on a single file *or* the
run's inlined total, and declared neither. Now declared, and the
sentence covers both.
- Reclassifies the operations staging added into the destructive sweep, so
the triage stays exhaustive.
* fix(v2): classify storage and uniqueness failures, drop permanent file delete
- remove the permanent file-delete endpoint; the platform offers no such
action in the UI, and its manager wrote outside a transaction with no
storage accounting
- extract a generated document's text from its compiled artifact rather than
its generation source, matching the download path; a `.pdf` source was a
500 and a `.docx` source returned generator JavaScript as clean content
- report a run file whose object retention has already swept as 404 rather
than 500, on both the inline base64 read and the download stream
- report a knowledge tag that loses at a unique index as 409, naming whether
the slot or the display name is taken
- gate `workflows versions revert` behind a CLI confirm; it overwrites the
draft graph and was classified non-destructive
* feat(v2): report lint from both graph writes and add dry-run previews
- `PUT /workflows/{id}/state` now returns the same `lint` report as
`POST /operations`; an agent authoring a graph from scratch needs the
findings at least as much as one editing incrementally
- extract the report into one shared builder so the two writes cannot drift,
and one shared presenter so the wire shape is identical
- skip the credential/tool reference pass when the caller has no human
subject, rather than resolving it against the workspace billing owner:
that would misreport what the workflow can reach and disclose another
person's grants. `lint.notes` says when it was skipped
- add `?dryRun=true` to both graph writes: validates and lints, persists
nothing, records no audit, notifies nobody. A query param, not a body
field, since the body of a PUT is the resource itself
- CLI: a dry run no longer demands `--yes`; requiring confirmation to preview
a change teaches callers to pass `--yes` reflexively
- CLI: name the graph commands for their verbs — `workflows state get`,
`workflows state replace`, `workflows operations apply` — instead of the
derived `state list` / `state update` / `operations create`
- document when to use `rollback` vs `versions/{version}/activate` on both
* chore(docs): sync generated docs manifest for the new CLI pages
* feat(v2): add the missing workflow-MCP reads and align bulk naming
- add `GET /workflow-mcp-servers/{serverId}` and
`GET /workflow-mcp-servers/{serverId}/tools`. The resource could be
PATCHed and DELETEd but never read, and its tools could be published and
unpublished but never listed — the server list reports tool names only, so
nothing published the `workflowId` that addresses a tool for deletion.
Both mirror `mcp-servers` beside them, and carry that family's
workspace-API-key denial rather than the wider `mcp_servers.read` policy
- rename `POST /tables/bulk-move` to `POST /tables/move`, so tables matches
the shipped `files` resource exactly (`move` + `bulk-delete`)
- name the CLI commands for their operations instead of the derived
`... create`: `tables move`, `workflows move`, `tables bulk-delete`, and
`tables rows update-each` for the per-row batch, which sits beside the
existing filter-based `tables rows batch-update`
`POST /tables/{id}/rows/batch-update` keeps its name: a distinct payload per
resource is precisely AIP-234 BatchUpdate, and `bulk-` would have collided
one word away from the filter form.
* fix(v2): correct documented statuses and a caller-reachable 500
- duplicating a workflow into a locked destination folder answered 500:
`FolderLockedError` is a plain Error carrying `status = 423`, which the v2
error policy does not classify. Converted to OrchestrationError('locked')
at the application boundary, matching the bulk-move path
- restore workflow promised a 413 for an oversized folder tree that its
response list never published; the cap is real, so the status now is too
- move workflows and apply variables documented 409/423 they cannot emit:
every per-item lock and conflict is reported in `failed`, not thrown
- bulk download and delete knowledge tag can both 409 and did not say so;
cleanup tag definitions cannot and did say so
- apply workflow operations denies workspace API keys but never documented it
- the dry-run responses are not byte-identical to a committed write:
`needsRedeployment` describes the pre-write state and persistence warnings
cannot appear. Reworded rather than overclaimed
- read file text and get file upload are head-safe, so the "HEAD skips the
effect" sentence did not apply to them
* fix(v2): guard tag field-type changes and publish the 415 every body route can return
- `PATCH /knowledge/{id}/tags/{tagId}` accepted a `fieldType` incompatible
with the slot the tag already occupies. Slots are enumerated per field
type, so a text tag could be relabelled `number` and every later read
would interpret its values as the wrong type. Create checked this; update
now runs the same two checks
- derive `415` from the contract the way `413` already is: the JSON builder
answers UNSUPPORTED_MEDIA_TYPE for any body under a content type it cannot
read, so all 100 body routes could return a status none of them published
- give version activation its own result component instead of publishing it
as `RollbackResult`; the shipped rollback keeps that name
- correct descriptions that promised behaviour the code does not have: a
`processingStatus` field never returned, a `gmail_send` resolution example
that short-circuits, bucket widths that overflow the window, a bulk tag
save that relocates rather than overwrites, and per-server tool names
actually gathered under a page-wide budget
- drop 409 from three knowledge and upload reads that cannot emit it
* docs(v2): correct the upload transfer contract and 16 other published claims
The upload transfer step was documented as Sim's own data plane on every
deployment: "success is 204" and "a failure is the v2 error envelope". That
holds only when Sim stores objects itself. With object storage configured the
URL is the provider's presigned URL, so S3 and GCS answer 200 and Azure 201,
and a failure is the provider's XML — a client written to the old text reads a
successful cloud upload as a failure. Also states that part ETags do not need
retaining: completion takes no body because Sim lists the parts from the
provider itself.
Other corrections, all to shipped descriptions rather than behaviour:
- DELETE table and bulk-delete files archive rather than erase, and neither
said so; bulk delete also cannot emit the 409 it declared
- complete knowledge upload published a 402 only the create leg can raise
- billing status conceals a foreign workspace id as 404, not the 403 its
TSDoc and description both claimed
- audit entries null a folder's resourceId and strip folder ids from metadata
at every level; neither redaction was documented
- details=full adds the workflow summary to workflow runs only, never to job
runs; GET /logs folderPaths covers a subtree like its two siblings; getLog
now carries the retention sentence
- list secrets returns description too, and the logs and resources documents
described only part of what they serve
* improvement(api): consolidate the v2 surface and close seven defects
Endpoint consolidation:
- Fold POST /logs/query into GET /logs; add sortBy/sortOrder, cap the
comma lists, and move the list onto the shared keyset codec
- Fold GET /knowledge/archived into GET /knowledge?scope=archived,
matching files, tables, and workflows
- Re-home chat deployments as a singleton under the workflow they
belong to; keep the workspace-scoped discovery list
- Move the tag-definition writes off the document path onto
/knowledge/{id}/tags, where they already acted
- Nest the table export and dispatch reads under their parent table
Defects:
- Publish isPublicApi on the deployment read; it was write-only, so a
workflow could be opened to unauthenticated execution unauditably
- Stop publishing raw storage keys and an unusable URL in log files
- Classify a chat-identifier unique violation as 409 rather than 500
- Fall back to the root path instead of throwing when a knowledge
base's folder is archived
- Cap bulk-download at the ceiling it actually enforces
- Normalize variables through one helper on both graph write paths
- Fix a folder-name log filter that matched workflow names
Naming and gaps:
- Rename /files/{id}/extract to /unarchive, /rows/find to /rows/search,
/rows/batch-update to /rows/bulk-update, /columns/run to /dispatches
- Type the last six generic [id] path segments
- Add table folder restore and id-addressed dispatch cancel
* chore(audits): record the v2 catalog routes in the boundary baseline
* fix(api): accept a null chat password and correct three published claims
- performChatDeploy validated `password: null` as a password, so the
replace-shaped chat PUT answered 400 for every mode that owns no
password — public (the default), email, and sso. The declared payload
type has always allowed null, and the stored value is cleared by
authType regardless, so null needs no validation of its own. The route
test could not catch it: it mocks the orchestration module and pinned
the exact null the real guard refused.
- Redirect the two docs slugs this branch retired that were genuinely
published: findTableRows and runTableColumns.
- The table folder restore described an idempotent no-op for an already
active folder; it answers 404. Say so, and say where the path comes
from, since the tables folder list cannot yet report archived folders.
- Name the customizations exception to the chat PUT's replace semantics.
- A cursor-binding case used status=error, which is a level and not a
status, so it failed contract validation and never reached the cursor
check. Use an accepted value and pin the reason, not just the status.
* chore(cli): classify the new v2 chat operation as non-destructive
* feat(cli): expose canonical resource URLs
* fix(api): close three caller-reachable failures found by the final probe
- GET /files/{fileId}/text called parseBuffer unguarded, and parseBuffer
signals every failure as a bare Error that no v2 policy classifies. A
zero-byte upload or a mislabelled archive was an unhandled 500. Empty
bytes now answer empty text — a zero-length file has no text — and
unparseable bytes answer 409, matching the rendered-artifact resolver.
- GET /workflows/{workflowId}/state asserted write-side bounds over
stored data. workflow_blocks.name and .type are bare text() and the
realtime rename op accepts z.string(), so a block renamed past 255
characters made the workflow unreadable, and unrepairable, over v2.
The read shape now takes the same input/stored split the variable
schema already had. Stored subflow conditions are coerced in the
loader beside the existing numeric guards.
- GET /knowledge stamped scope into the cursor fingerprint
unconditionally. scope defaults to active and is new on that list, so
every cursor the deployed build handed out would have been refused
with a message saying the caller changed a filter they never sent.
Its siblings already carry the guard and the comment.
Also: POST /workflow-mcp-servers answers 201 like every other v2 create;
GET /logs/stats reuses the log list's entry ceilings; the execute and
resume routes install the media-type-aware 415 they publish; and a
rationale citing an endpoint that never reached the wire is corrected.
* fix(tables): carry the dispatch terminal timestamps through the stale sweep
Staging's abandoned-dispatch recovery builds its own `DispatchRow`, and
this branch had added `completedAt`/`cancelledAt` to that shape for the
id-addressed dispatch read and cancel. The merge was textually clean and
left the new mapping short two fields.
* fix(workflows): deny workspace API keys on the graph replace
`PUT /workflows/{workflowId}/state` stores blocks and their tool wiring
wholesale, but the policies deciding which of those a member may add —
the EE permission config and block visibility — take a human subject.
A workspace API key has none, and both substitutes fail open: the
billing owner is a different, typically less-constrained person, and
passing no user makes the permission lookup return null, which every
caller reads as unrestricted.
That made the replace a second graph-write door storing what its sibling
`POST /workflows/{workflowId}/operations` refuses, which denies workspace
keys for exactly this reason. Both doors now agree. Personal keys keep
the capability, so headless authoring is unaffected for a credential
that names a human.
* chore(api): drop the enrichment catalog endpoint
GET /api/v2/enrichments listed the code-defined table enrichments. The
per-row enrichment run detail stays; only the catalog read goes.
Removes the route, contract, response and query schemas, the semantic
operation, the use case, the projection module, its registry-boundary
entry, and the CLI command. The "not found" and "blank search" cases it
covered are repointed at the connector-type sibling so the shared
behaviour stays tested rather than deleted with it.
* improvement(api): make the workflow operations endpoint self-describing
Two things stood between this endpoint and a caller who has only the
published spec.
The accepted `params` keys existed only in the edit engine's source. The
spec said "the accepted keys depend on the target block type", so a
caller reading it could create a nameless empty block and nothing more —
while the Copilot tool catalog, over the same engine, has always spelled
out the envelope. That guidance now lives in the contract, shared by the
add, edit, and insert_into_subflow parameter schemas so the two surfaces
cannot describe one engine differently: `inputs` keyed by sub-block id,
`retry`/`triggerMode`/`advancedMode` beside it rather than inside it,
`connections` keyed by source handle, and `removeEdges` for dropping one
edge without restating the rest.
A `block_id` that is not already a UUID is replaced with a minted one,
and the mapping was computed and then dropped. A caller could not
reference the block it had just created except by re-reading the graph
and matching on name. The engine now returns it and the response
publishes it as `mintedBlockIds`, with the in-batch versus cross-request
rule stated in the operation description.
* fix(api): close the pre-merge scan's blocking findings
Docs and public wire, all of it permanent surface once released.
- Two published tag groups, Catalog and Meta, had no sidebar entry in any
locale, so six operations shipped unbrowsable. Added to all six, and a
test now fails when a published tag has no entry.
- deleteWorkflowChatDeployment pointed callers at DELETE on /deployment;
the undeploy verb is on /deploy.
- PUT /state still promised workspace API keys a degraded lint pass after
the operation began rejecting them outright. It also lived in a
single-quoted string, so the shared clause would not have interpolated.
- POST /tables/move took targetFolderPath as nullable-but-required, which
rendered the CLI flag as a required `<json|@file>`: `--to /Archive`
failed to parse and omitting it failed outright, while the docs said
"omit for root". Now optional and a plain string, matching
POST /files/move; the route supplies the null the use case wants.
- Table dispatch status and row run state published `cancelled` beside
imports, exports, and job state publishing `canceled`, and the note
explaining the split was wrong about its own sibling. Both new schemas
now publish `canceled`; the stored column is unchanged and mapped at
the presenter. The shipped `cancelled` count field is left alone.
- applyWorkflowVariables can answer 423 and both workflow-MCP deletes can
answer 409; none declared it. Hand-assembled error lists replaced with
the shared sets.
- /files/{fileId}/unarchive became /unzip. `extract` reads as "extract
text" and `unarchive` reads as the inverse of restore on a resource
where archived means soft-deleted; unzip collides with neither and is
what the implementation calls itself.
* improvement(cli,docs): finish the naming and clear the enrichment leftovers
- Four single-record GETs derived to `list` while returning one thing:
meta, a workflow's chat deployment, log stats, and file text. Renamed to
`meta status`, `workflows chat status`, `logs stats`, `files read`,
matching the `workflows deployment status` correction already in this
branch. None of the old spellings shipped.
- Dropped five `renamedFrom` aliases pointing at spellings that never
existed, each of which built a hidden command and a permanent
deprecation warning for argv nobody could have typed. `tables rows find`
keeps its alias — that one really shipped.
- Removed the enrichment catalog from three prose sites left behind when
the endpoint went: the resources spec description, its Catalog tag, and
the contract and pagination-test comments.
- Documented the six new command groups in the CLI index table. That page
is a guide page, so the docs staleness check cannot flag it.
- Published the `customizations` exception to the chat replace semantics.
It was in the route TSDoc and invisible to every caller reading the
spec, which is where the claim "Replace, not merge" is made.
* improvement(cli): use batch- for the tables bulk delete, matching its siblings
The CLI renames a bulk form only when it would collide with its singular
sibling, and uses AWS's `batch-` prefix when it does — `files
batch-delete`, `tables rows batch-delete`, `knowledge chunks
batch-update`. `tables delete` exists, so `tables bulk-delete` was that
same rename reaching for the other word, and the only `bulk-` command on
the surface. No `bulk-` CLI command has ever shipped, so this costs
nothing now and would be permanent later.
`files bulk-download` keeps its name: there is no `files download` to
collide with, and it is one archive rather than N operations. Its config
block now says why it exists at all, since the command is never built —
the builder skips non-JSON response modes, but the contract sweeps still
read the entry and require the folder-path field to be marked.
* fix(workflows): allow operations on blockless drafts
* feat(workflows): add manual and run-from-block execution
* fix(cli): update workflow run description test
* fix(tests): align fixtures with current contracts
* fix(api): derive chat activity from workflow deployment
---------
Co-authored-by: Theodore Li <theo@sim.ai>
This commit is contained in:
@@ -22,6 +22,8 @@
|
||||
"(generated)/credentials",
|
||||
"(generated)/secrets",
|
||||
"(generated)/billing",
|
||||
"(generated)/catalog",
|
||||
"(generated)/meta",
|
||||
"(generated)/audit-logs"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
{
|
||||
"pages": ["listWorkflowRunsV2", "getWorkflowRunV2", "resumeWorkflowRunV2", "cancelRunV2"]
|
||||
"pages": [
|
||||
"listWorkflowRunsV2",
|
||||
"getWorkflowRunV2",
|
||||
"downloadWorkflowRunFileV2",
|
||||
"resumeWorkflowRunV2",
|
||||
"cancelRunV2"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -5,14 +5,29 @@
|
||||
"getWorkflow",
|
||||
"updateWorkflowV2",
|
||||
"deleteWorkflowV2",
|
||||
"restoreWorkflow",
|
||||
"duplicateWorkflow",
|
||||
"moveWorkflows",
|
||||
"getWorkflowState",
|
||||
"replaceWorkflowState",
|
||||
"applyWorkflowOperations",
|
||||
"applyWorkflowVariables",
|
||||
"listWorkflowVersionsV2",
|
||||
"getWorkflowVersionV2",
|
||||
"updateWorkflowVersionV2",
|
||||
"activateWorkflowVersion",
|
||||
"revertWorkflowVersion",
|
||||
"exportWorkflow",
|
||||
"importWorkflow",
|
||||
"getWorkflowDeployment",
|
||||
"updateWorkflowPublicApi",
|
||||
"deployWorkflow",
|
||||
"undeployWorkflow",
|
||||
"rollbackWorkflow",
|
||||
"listChatDeployments",
|
||||
"getWorkflowChatDeployment",
|
||||
"replaceWorkflowChatDeployment",
|
||||
"deleteWorkflowChatDeployment",
|
||||
"executeWorkflowV2",
|
||||
"listWorkflowsFolders",
|
||||
"createWorkflowsFolder",
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
"(generated)/credentials",
|
||||
"(generated)/secrets",
|
||||
"(generated)/billing",
|
||||
"(generated)/catalog",
|
||||
"(generated)/meta",
|
||||
"(generated)/audit-logs"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ Every command below also accepts the [global options](/cli/commands#global-optio
|
||||
## Get audit log
|
||||
|
||||
```bash
|
||||
sim audit-logs get <id> [options]
|
||||
sim audit-logs get <auditLogId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -21,7 +21,7 @@ sim audit-logs get <id> [options]
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Audit-log entry identifier. |
|
||||
| `auditLogId` | Yes | Audit-log entry identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
title: Blocks
|
||||
description: Manage blocks — every subcommand, argument, and flag
|
||||
---
|
||||
|
||||
import { CommandTable } from '@/components/ui/command-table'
|
||||
|
||||
Every command below also accepts the [global options](/cli/commands#global-options).
|
||||
|
||||
## Get block
|
||||
|
||||
```bash
|
||||
sim blocks get <blockId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `blockId` | Yes | Block type identifier. An unversioned base type resolves to the newest version, and the response echoes the resolved id. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## List blocks
|
||||
|
||||
```bash
|
||||
sim blocks list [options]
|
||||
```
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--search <value>` | No | Case-insensitive substring match against the block id, name, and description. |
|
||||
| `--category <value>` | No | Restrict to one toolbar category. Accepted values: `blocks`, `tools`, `triggers`. |
|
||||
| `--capability <value>` | No | Restrict to blocks that can start a workflow — the `triggers` category, blocks declaring `triggerAllowed`, and blocks with trigger-mode fields. Accepted values: `trigger`. |
|
||||
| `--source <value>` | No | Restrict to shipped blocks or to this workspace’s deployed custom blocks. Accepted values: `builtin`, `custom`. |
|
||||
| `--sort-by <value>` | No | Field used to sort the result. Sorting by `name` is case-sensitive and follows the storage collation, so do not rely on a case-insensitive order. Accepted values: `id`, `name`, `category`. |
|
||||
| `--sort-order <value>` | No | Sort direction. Accepted values: `asc`, `desc`. |
|
||||
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `100`. |
|
||||
|
||||
</CommandTable>
|
||||
@@ -0,0 +1,29 @@
|
||||
---
|
||||
title: Chat Deployments
|
||||
description: Manage chat deployments — every subcommand, argument, and flag
|
||||
---
|
||||
|
||||
import { CommandTable } from '@/components/ui/command-table'
|
||||
|
||||
Every command below also accepts the [global options](/cli/commands#global-options).
|
||||
|
||||
## List chat deployments
|
||||
|
||||
```bash
|
||||
sim chat-deployments list [options]
|
||||
```
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--workflow-id <value>` | No | Restrict to deployments of one workflow. |
|
||||
| `--is-active` | No | Restrict to active or inactive deployments. |
|
||||
| `--no-is-active` | No | Send --is-active as false. |
|
||||
| `--sort-by <value>` | No | Field used to sort the result. Accepted values: `identifier`, `createdAt`, `updatedAt`. |
|
||||
| `--sort-order <value>` | No | Sort direction. Accepted values: `asc`, `desc`. |
|
||||
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `100`. |
|
||||
|
||||
</CommandTable>
|
||||
@@ -33,15 +33,21 @@ These apply to every command, and may be written before or after it.
|
||||
| [`sim profiles`](/cli/profiles) | List profiles or add a workspace profile that shares a stored login |
|
||||
| [`sim audit-logs`](/cli/audit-logs) | Manage audit logs |
|
||||
| [`sim billing`](/cli/billing) | Manage billing |
|
||||
| [`sim blocks`](/cli/blocks) | Manage blocks |
|
||||
| [`sim chat-deployments`](/cli/chat-deployments) | Manage chat deployments |
|
||||
| [`sim connector-types`](/cli/connector-types) | Manage connector types |
|
||||
| [`sim credentials`](/cli/credentials) | Manage credentials |
|
||||
| [`sim custom-tools`](/cli/custom-tools) | Manage custom tools |
|
||||
| [`sim files`](/cli/files) | Manage files |
|
||||
| [`sim knowledge`](/cli/knowledge) | Manage knowledge |
|
||||
| [`sim logs`](/cli/logs) | Manage logs |
|
||||
| [`sim mcp-servers`](/cli/mcp-servers) | Manage mcp servers |
|
||||
| [`sim meta`](/cli/meta) | Manage meta |
|
||||
| [`sim secrets`](/cli/secrets) | Manage secrets |
|
||||
| [`sim skills`](/cli/skills) | Manage skills |
|
||||
| [`sim tables`](/cli/tables) | Manage tables |
|
||||
| [`sim tools`](/cli/tools) | Manage tools |
|
||||
| [`sim workflow-mcp-servers`](/cli/workflow-mcp-servers) | Manage workflow mcp servers |
|
||||
| [`sim workflows`](/cli/workflows) | Manage workflows |
|
||||
| [`sim workspaces`](/cli/workspaces) | Manage workspaces |
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
title: Connector Types
|
||||
description: Manage connector types — every subcommand, argument, and flag
|
||||
---
|
||||
|
||||
import { CommandTable } from '@/components/ui/command-table'
|
||||
|
||||
Every command below also accepts the [global options](/cli/commands#global-options).
|
||||
|
||||
## List connector types
|
||||
|
||||
```bash
|
||||
sim connector-types list [options]
|
||||
```
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--search <value>` | No | Case-insensitive substring match against the connector name. |
|
||||
|
||||
</CommandTable>
|
||||
@@ -21,7 +21,7 @@ sim credentials delete <credentialId> [options]
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `credentialId` | Yes | Credential to disconnect. |
|
||||
| `credentialId` | Yes | Credential to update or disconnect. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
@@ -72,6 +72,46 @@ sim credentials list [options]
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Update credential
|
||||
|
||||
```bash
|
||||
sim credentials update <credentialId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `credentialId` | Yes | Credential to update or disconnect. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--display-name <value>` | No | New name shown for the credential in Sim. |
|
||||
| `--description <value>` | No | New credential description. Send null to clear the stored one. |
|
||||
| `--service-account-json <value>` | No | Write-only Google service-account JSON key. |
|
||||
| `--api-token <value>` | No | Write-only provider API token. |
|
||||
| `--domain <value>` | No | Provider account domain. |
|
||||
| `--signing-secret <value>` | No | Write-only webhook signing secret. |
|
||||
| `--bot-token <value>` | No | Write-only bot token. |
|
||||
| `--client-id <value>` | No | OAuth client identifier. |
|
||||
| `--client-secret <value>` | No | Write-only OAuth client secret. |
|
||||
| `--certificate-id <value>` | No | Provider certificate mapping identifier. |
|
||||
| `--org-id <value>` | No | Provider organization ID. |
|
||||
| `--data-center <value>` | No | Provider data center. |
|
||||
| `--auth-method <value>` | No | Provider authentication method. |
|
||||
| `--private-key <value>` | No | Write-only PEM private key. |
|
||||
| `--username <value>` | No | Provider run-as username. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Create a service-account credential using its discovered provider schema
|
||||
|
||||
```bash
|
||||
|
||||
@@ -30,7 +30,7 @@ sim custom-tools create [options]
|
||||
## Delete custom tool
|
||||
|
||||
```bash
|
||||
sim custom-tools delete <id> [options]
|
||||
sim custom-tools delete <customToolId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -39,7 +39,7 @@ sim custom-tools delete <id> [options]
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique custom tool identifier. |
|
||||
| `customToolId` | Yes | Unique custom tool identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
@@ -56,7 +56,7 @@ sim custom-tools delete <id> [options]
|
||||
## Get custom tool
|
||||
|
||||
```bash
|
||||
sim custom-tools get <id>
|
||||
sim custom-tools get <customToolId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -65,7 +65,7 @@ sim custom-tools get <id>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique custom tool identifier. |
|
||||
| `customToolId` | Yes | Unique custom tool identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
@@ -91,7 +91,7 @@ sim custom-tools list [options]
|
||||
## Update custom tool
|
||||
|
||||
```bash
|
||||
sim custom-tools update <id> [options]
|
||||
sim custom-tools update <customToolId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -100,7 +100,7 @@ sim custom-tools update <id> [options]
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique custom tool identifier. |
|
||||
| `customToolId` | Yes | Unique custom tool identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
|
||||
@@ -107,6 +107,7 @@ Also available as `sim files folders ls`.
|
||||
| `--search <value>` | No | Case-insensitive substring match against the folder name. |
|
||||
| `--sort-by <value>` | No | Field used to sort the result. Sorting by `name` is case-sensitive and follows the storage collation, so do not rely on a case-insensitive order. Accepted values: `name`, `createdAt`, `updatedAt`. |
|
||||
| `--sort-order <value>` | No | Sort direction. Accepted values: `asc`, `desc`. |
|
||||
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) returns live folders only; `archived` returns folders a recursive `DELETE` soft-deleted, which is how a caller finds a path to hand to `POST /api/v2/files/folders/restore`. Authorization is identical for both. Accepted values: `active`, `archived`. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
@@ -129,6 +130,22 @@ Also available as `sim files folders mv`.
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Restore an archived file folder
|
||||
|
||||
```bash
|
||||
sim files folders restore <path>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `path` | Yes | Folder path as shown in the app; the leading / is optional |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Delete file
|
||||
|
||||
```bash
|
||||
@@ -226,6 +243,22 @@ sim files share set <fileId> [options]
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Get file upload
|
||||
|
||||
```bash
|
||||
sim files uploads get <uploadId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `uploadId` | Yes | Upload session identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## List files
|
||||
|
||||
```bash
|
||||
@@ -267,6 +300,32 @@ Also available as `sim files mv`.
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Read a file’s text content
|
||||
|
||||
```bash
|
||||
sim files read <fileId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `fileId` | Yes | File identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--max-bytes <value>` | No | Optional ceiling on the source bytes fed to the parser, lowering but never raising the server limit. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Rename a file
|
||||
|
||||
```bash
|
||||
@@ -309,6 +368,32 @@ sim files restore <fileId>
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Unzip an archive into a new folder beside it
|
||||
|
||||
```bash
|
||||
sim files unzip <fileId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `fileId` | Yes | File identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `-y, --yes` | Yes | Confirm this destructive operation. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Replace a file’s contents
|
||||
|
||||
```bash
|
||||
|
||||
@@ -139,6 +139,12 @@ sim tables rows query --help
|
||||
| [`billing`](/cli/billing) | Check plan status and credit usage |
|
||||
| [`audit-logs`](/cli/audit-logs) | Read organization audit logs |
|
||||
| [`workspaces`](/cli/workspaces) | Inspect the active workspace and its members |
|
||||
| [`blocks`](/cli/blocks) | Browse the block catalog and read one block's configuration fields |
|
||||
| [`tools`](/cli/tools) | Browse the tool catalog |
|
||||
| [`connector-types`](/cli/connector-types) | Browse knowledge-base connector types and their config fields |
|
||||
| [`chat-deployments`](/cli/chat-deployments) | List the hosted chats a workspace serves |
|
||||
| [`workflow-mcp-servers`](/cli/workflow-mcp-servers) | Publish workflows as MCP tools for outside agents |
|
||||
| [`meta`](/cli/meta) | Check what this API supports and which limits apply |
|
||||
|
||||
The [command reference](/cli/commands) documents every subcommand, argument, and
|
||||
flag, and is generated from the CLI itself.
|
||||
|
||||
@@ -9,6 +9,392 @@ import { CommandTable } from '@/components/ui/command-table'
|
||||
|
||||
Every command below also accepts the [global options](/cli/commands#global-options).
|
||||
|
||||
## Index files the workspace already stores
|
||||
|
||||
```bash
|
||||
sim knowledge from-workspace-files create <knowledgeBaseId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `knowledgeBaseId` | Yes | Unique knowledge base identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--file <value...>` | Yes | Workspace file ID or key (repeatable) (space-separated, or @path / @- with one value per line). |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Declare the tag definitions a knowledge base needs
|
||||
|
||||
```bash
|
||||
sim knowledge tags save <knowledgeBaseId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `knowledgeBaseId` | Yes | Unique knowledge base identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--definitions <json\|@file>` | Yes | Tag definitions: [{"tagSlot":"tag1","displayName":"category","fieldType":"text"}] (JSON, or @path / @- to read a file or stdin). |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Create tag
|
||||
|
||||
```bash
|
||||
sim knowledge tags create <knowledgeBaseId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `knowledgeBaseId` | Yes | Unique knowledge base identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--display-name <value>` | Yes | Name tag filters and document reads use for this tag. |
|
||||
| `--field-type <value>` | No | Value type stored in the slot; it decides which slots are usable and which filter operators apply. Slot capacity per type: text 7, number 5, date 2, boolean 3. Accepted values: `text`, `number`, `date`, `boolean`. |
|
||||
| `--tag-slot <value>` | No | Slot to store the tag in. Omit to take the next free slot for the field type; a slot that does not belong to the field type, or one already in use, is rejected. Accepted values: `tag1`, `tag2`, `tag3`, `tag4`, `tag5`, `tag6`, `tag7`, `number1`, `number2`, `number3`, `number4`, `number5`, `date1`, `date2`, `boolean1`, `boolean2`, `boolean3`. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Delete tag
|
||||
|
||||
```bash
|
||||
sim knowledge tags delete <knowledgeBaseId> <tagId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `knowledgeBaseId` | Yes | Unique knowledge base identifier. |
|
||||
| `tagId` | Yes | Unique tag definition identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `-y, --yes` | Yes | Confirm this destructive operation. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Remove tag definitions no document still uses
|
||||
|
||||
```bash
|
||||
sim knowledge tags cleanup <knowledgeBaseId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `knowledgeBaseId` | Yes | Unique knowledge base identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--unused` | No | Whether to remove only the tag definitions no document in the knowledge base still carries a value for. Defaults to true. Pass `unused=false` to delete every definition on the knowledge base, which also clears its slot on every document and chunk and is not recoverable. |
|
||||
| `--no-unused` | No | Send --unused as false. |
|
||||
| `-y, --yes` | Yes | Confirm this destructive operation. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Show which tag slot a create would take for a field type
|
||||
|
||||
```bash
|
||||
sim knowledge tags next-slot <knowledgeBaseId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `knowledgeBaseId` | Yes | Unique knowledge base identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--field-type <value>` | Yes | Value type stored in the slot; it decides which slots are usable and which filter operators apply. Slot capacity per type: text 7, number 5, date 2, boolean 3. Accepted values: `text`, `number`, `date`, `boolean`. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## List tags
|
||||
|
||||
```bash
|
||||
sim knowledge tags list <knowledgeBaseId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `knowledgeBaseId` | Yes | Unique knowledge base identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Show how many documents and chunks carry each tag
|
||||
|
||||
```bash
|
||||
sim knowledge tags usage <knowledgeBaseId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `knowledgeBaseId` | Yes | Unique knowledge base identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Update tag
|
||||
|
||||
```bash
|
||||
sim knowledge tags update <knowledgeBaseId> <tagId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `knowledgeBaseId` | Yes | Unique knowledge base identifier. |
|
||||
| `tagId` | Yes | Unique tag definition identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--display-name <value>` | No | New tag display name. |
|
||||
| `--field-type <value>` | No | New value type for the tag. Accepted values: `text`, `number`, `date`, `boolean`. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Enable, disable, or delete many chunks at once
|
||||
|
||||
```bash
|
||||
sim knowledge chunks batch-update <knowledgeBaseId> <documentId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `knowledgeBaseId` | Yes | Unique knowledge base identifier. |
|
||||
| `documentId` | Yes | Unique knowledge document identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--operation <value>` | Yes | What to do with the selected chunks. Accepted values: `enable`, `disable`, `delete`. |
|
||||
| `--chunk <value...>` | Yes | Chunks to operate on, by identifier. Ids outside the document are ignored. (space-separated, or @path / @- with one value per line). |
|
||||
| `-y, --yes` | Yes | Confirm this destructive operation. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Create chunk
|
||||
|
||||
```bash
|
||||
sim knowledge chunks create <knowledgeBaseId> <documentId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `knowledgeBaseId` | Yes | Unique knowledge base identifier. |
|
||||
| `documentId` | Yes | Unique knowledge document identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--content <value>` | Yes | Text to embed. It is embedded on write, so the chunk is searchable immediately. |
|
||||
| `--enabled` | No | Whether the new chunk participates in search. |
|
||||
| `--no-enabled` | No | Send --enabled as false. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Delete chunk
|
||||
|
||||
```bash
|
||||
sim knowledge chunks delete <knowledgeBaseId> <documentId> <chunkId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `knowledgeBaseId` | Yes | Unique knowledge base identifier. |
|
||||
| `documentId` | Yes | Unique knowledge document identifier. |
|
||||
| `chunkId` | Yes | Unique chunk identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `-y, --yes` | Yes | Confirm this destructive operation. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Get chunk
|
||||
|
||||
```bash
|
||||
sim knowledge chunks get <knowledgeBaseId> <documentId> <chunkId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `knowledgeBaseId` | Yes | Unique knowledge base identifier. |
|
||||
| `documentId` | Yes | Unique knowledge document identifier. |
|
||||
| `chunkId` | Yes | Unique chunk identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## List chunks
|
||||
|
||||
```bash
|
||||
sim knowledge chunks list <knowledgeBaseId> <documentId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `knowledgeBaseId` | Yes | Unique knowledge base identifier. |
|
||||
| `documentId` | Yes | Unique knowledge document identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--search <value>` | No | Case-insensitive substring match against chunk content. |
|
||||
| `--enabled <value>` | No | Restrict to enabled or disabled chunks. `all` returns both. Accepted values: `true`, `false`, `all`. |
|
||||
| `--sort-by <value>` | No | Field used to sort the result. Accepted values: `chunkIndex`, `tokenCount`, `enabled`. |
|
||||
| `--sort-order <value>` | No | Sort direction. Accepted values: `asc`, `desc`. |
|
||||
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `100`. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Update chunk
|
||||
|
||||
```bash
|
||||
sim knowledge chunks update <knowledgeBaseId> <documentId> <chunkId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `knowledgeBaseId` | Yes | Unique knowledge base identifier. |
|
||||
| `documentId` | Yes | Unique knowledge document identifier. |
|
||||
| `chunkId` | Yes | Unique chunk identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--content <value>` | No | Replacement text. Changing it re-embeds the chunk and re-derives its token and character counts. |
|
||||
| `--enabled` | No | Whether the chunk participates in search. Disabling keeps it indexed. |
|
||||
| `--no-enabled` | No | Send --enabled as false. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Enable or disable every matching document
|
||||
|
||||
```bash
|
||||
@@ -517,7 +903,7 @@ Also available as `sim knowledge folders mv`.
|
||||
## Delete knowledge base
|
||||
|
||||
```bash
|
||||
sim knowledge delete <id> [options]
|
||||
sim knowledge delete <knowledgeBaseId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -526,7 +912,7 @@ sim knowledge delete <id> [options]
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique knowledge base identifier. |
|
||||
| `knowledgeBaseId` | Yes | Unique knowledge base identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
@@ -543,7 +929,7 @@ sim knowledge delete <id> [options]
|
||||
## Get knowledge base
|
||||
|
||||
```bash
|
||||
sim knowledge get <id>
|
||||
sim knowledge get <knowledgeBaseId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -552,7 +938,7 @@ sim knowledge get <id>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique knowledge base identifier. |
|
||||
| `knowledgeBaseId` | Yes | Unique knowledge base identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
@@ -568,6 +954,7 @@ sim knowledge list [options]
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) for live knowledge bases, `archived` for knowledge bases a `DELETE` archived and `POST /knowledge/{knowledgeBaseId}/restore` can bring back. `folderPath` resolves against active folders only, so pairing it with `scope=archived` returns an empty page when the containing folder was archived too. Accepted values: `active`, `archived`. |
|
||||
| `--folder <value>` | No | Folder path as shown in the app; the leading / is optional. |
|
||||
| `--search <value>` | No | Case-insensitive substring match against the resource name. |
|
||||
| `--sort-by <value>` | No | Field used to sort the result. Sorting by `name` is case-sensitive and follows the storage collation, so do not rely on a case-insensitive order. Accepted values: `name`, `createdAt`, `updatedAt`. |
|
||||
@@ -576,10 +963,10 @@ sim knowledge list [options]
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## List tags
|
||||
## Restore an archived knowledge base
|
||||
|
||||
```bash
|
||||
sim knowledge tags list <knowledgeBaseId>
|
||||
sim knowledge restore <knowledgeBaseId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -619,7 +1006,7 @@ sim knowledge search [options]
|
||||
## Update knowledge base
|
||||
|
||||
```bash
|
||||
sim knowledge update <id> [options]
|
||||
sim knowledge update <knowledgeBaseId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -628,7 +1015,7 @@ sim knowledge update <id> [options]
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique knowledge base identifier. |
|
||||
| `knowledgeBaseId` | Yes | Unique knowledge base identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
@@ -648,7 +1035,7 @@ sim knowledge update <id> [options]
|
||||
## Move a knowledge base to a folder
|
||||
|
||||
```bash
|
||||
sim knowledge mv <id> <folder>
|
||||
sim knowledge mv <knowledgeBaseId> <folder>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -657,7 +1044,7 @@ sim knowledge mv <id> <folder>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique knowledge base identifier. |
|
||||
| `knowledgeBaseId` | Yes | Unique knowledge base identifier. |
|
||||
| `folder` | Yes | Folder path as shown in the app; the leading / is optional |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
@@ -35,6 +35,28 @@ sim logs get <runId> [options]
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Summarize run counts, failures, and cost over a window
|
||||
|
||||
```bash
|
||||
sim logs stats [options]
|
||||
```
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--workflow <value...>` | No | Comma-separated workflow identifiers to include. At most 200 entries. An empty entry is rejected. (space-separated, or @path / @- with one value per line). |
|
||||
| `--folder <value...>` | No | Folder path as shown in the app; the leading / is optional (space-separated, or @path / @- with one value per line). |
|
||||
| `--trigger <value...>` | No | Comma-separated trigger types to include. An empty entry is rejected. The vocabulary is open, so an unrecognized member selects no runs; the literal `all` disables this filter. (space-separated, or @path / @- with one value per line). |
|
||||
| `--level <value>` | No | Severity level to include. Accepted values: `info`, `error`. |
|
||||
| `--start-date <value>` | No | Only include runs started at or after this UTC ISO 8601 timestamp, e.g. `2026-08-06T00:00:00Z`. A date without a time, or a timestamp carrying a UTC offset instead of `Z`, is rejected, as is year `0000`, which names no storable instant. |
|
||||
| `--end-date <value>` | No | Only include runs started at or before this UTC ISO 8601 timestamp, e.g. `2026-08-06T00:00:00Z`. A date without a time, or a timestamp carrying a UTC offset instead of `Z`, is rejected, as is year `0000`, which names no storable instant. |
|
||||
| `--segment-count <value>` | No | Number of equal time buckets to divide the window into, from 1 to 500. Exactly this many buckets are always returned. Buckets are never narrower than one minute, so on a short window the series extends past the end of the window rather than being compressed, and the trailing buckets are empty. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## List logs
|
||||
|
||||
```bash
|
||||
@@ -47,8 +69,8 @@ sim logs list [options]
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--workflow <value...>` | No | Comma-separated workflow identifiers to include. An empty entry is rejected. (space-separated, or @path / @- with one value per line). |
|
||||
| `--trigger <value...>` | No | Comma-separated trigger types to include. An empty entry is rejected. Values are matched exactly and are case-sensitive — every recorded trigger is lowercase, so `API` matches nothing while `api` matches. The vocabulary is open: it covers the core trigger types (`manual`, `api`, `schedule`, `chat`, `webhook`, `mcp`, `copilot`, `workflow`, `custom_block`) and the provider id of any webhook trigger (`slack`, `gmail`, `github`, …), so an unrecognized member is not rejected — it selects no runs. The literal value `all` is a sentinel that disables this filter entirely, so a list containing it returns runs of every trigger type; no real trigger type is named `all`. (space-separated, or @path / @- with one value per line). |
|
||||
| `--workflow <value...>` | No | Comma-separated workflow identifiers to include. An empty entry is rejected. At most 200 entries. (space-separated, or @path / @- with one value per line). |
|
||||
| `--trigger <value...>` | No | Comma-separated trigger types to include. An empty entry is rejected. Values are matched exactly and are case-sensitive — every recorded trigger is lowercase, so `API` matches nothing while `api` matches. The vocabulary is open: it covers the core trigger types (`manual`, `api`, `schedule`, `chat`, `webhook`, `mcp`, `copilot`, `workflow`, `custom_block`) and the provider id of any webhook trigger (`slack`, `gmail`, `github`, …), so an unrecognized member is not rejected — it selects no runs. The literal value `all` is a sentinel that disables this filter entirely, so a list containing it returns runs of every trigger type; no real trigger type is named `all`. At most 100 entries. (space-separated, or @path / @- with one value per line). |
|
||||
| `--level <value>` | No | Severity level to include. Accepted values: `info`, `error`. |
|
||||
| `--start-date <value>` | No | Only include runs started at or after this UTC ISO 8601 timestamp, e.g. `2026-08-06T00:00:00Z`. A date without a time, or a timestamp carrying a UTC offset instead of `Z`, is rejected, as is year `0000`, which names no storable instant. |
|
||||
| `--end-date <value>` | No | Only include runs started at or before this UTC ISO 8601 timestamp, e.g. `2026-08-06T00:00:00Z`. A date without a time, or a timestamp carrying a UTC offset instead of `Z`, is rejected, as is year `0000`, which names no storable instant. |
|
||||
@@ -61,8 +83,13 @@ sim logs list [options]
|
||||
| `--include-trace-spans` | No | Include trace spans in JSON or YAML output (implies full detail). |
|
||||
| `--include-final-output` | No | Include final output in JSON or YAML output (implies full detail). |
|
||||
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `100`. |
|
||||
| `--order <value>` | No | Sort direction by execution start time. This list is sortable only by execution start time, so it takes `order` in place of `sortBy`/`sortOrder`, which it rejects. Accepted values: `asc`, `desc`. |
|
||||
| `--status <value>` | No | Comma-separated execution statuses to include, from `pending` \| `running` \| `paused` \| `redacting` \| `completed` \| `failed` \| `cancelled`. An empty entry is rejected. ANDed with `level`, which reports severity rather than lifecycle. |
|
||||
| `--workflow-name <value>` | No | Case-insensitive substring match against the run's workflow name. Runs whose workflow has been deleted match nothing, because the name is no longer joinable. |
|
||||
| `--include-job-runs` | No | Whether Chat and Sim-agent job runs join the sequence alongside workflow runs. Job runs report `kind: "job"`, carry no `workflow` summary, and never carry a cost ledger. They are dropped entirely — not partially matched — whenever a filter they cannot answer is set (`workflowIds`, `workflowName`, `folderPaths`, `model`, or `status`), so a filter never means two different things across the union. Accepted only under `sortBy=startedAt`: job runs record cost as a document and no comparable status, so they cannot participate in the other orderings. |
|
||||
| `--no-include-job-runs` | No | Send --include-job-runs as false. |
|
||||
| `--run-id <value>` | No | Exact run identifier to match. |
|
||||
| `--sort-by <value>` | No | Field used to sort the result. `durationMs` and `cost` are null until a run settles; those runs order as though the value were below every recorded one, so they trail an ascending page and lead a descending one. Only `startedAt` can order Chat and Sim-agent job runs, so any other value is rejected together with `includeJobRuns=true`. Accepted values: `startedAt`, `durationMs`, `cost`, `status`. |
|
||||
| `--sort-order <value>` | No | Sort direction. Accepted values: `asc`, `desc`. |
|
||||
| `--folder <value...>` | No | Folder path as shown in the app; the leading / is optional (space-separated, or @path / @- with one value per line). |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
@@ -39,7 +39,7 @@ sim mcp-servers create [options]
|
||||
## Delete MCP server
|
||||
|
||||
```bash
|
||||
sim mcp-servers delete <id> [options]
|
||||
sim mcp-servers delete <mcpServerId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -48,7 +48,7 @@ sim mcp-servers delete <id> [options]
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique MCP server identifier. |
|
||||
| `mcpServerId` | Yes | Unique MCP server identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
@@ -65,7 +65,7 @@ sim mcp-servers delete <id> [options]
|
||||
## Get MCP server
|
||||
|
||||
```bash
|
||||
sim mcp-servers get <id>
|
||||
sim mcp-servers get <mcpServerId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -74,7 +74,7 @@ sim mcp-servers get <id>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique MCP server identifier. |
|
||||
| `mcpServerId` | Yes | Unique MCP server identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
@@ -100,7 +100,7 @@ sim mcp-servers list [options]
|
||||
## List MCP server tools
|
||||
|
||||
```bash
|
||||
sim mcp-servers tools list <id> [options]
|
||||
sim mcp-servers tools list <mcpServerId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -109,7 +109,7 @@ sim mcp-servers tools list <id> [options]
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique MCP server identifier. |
|
||||
| `mcpServerId` | Yes | Unique MCP server identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
@@ -127,7 +127,7 @@ sim mcp-servers tools list <id> [options]
|
||||
## Update MCP server
|
||||
|
||||
```bash
|
||||
sim mcp-servers update <id> [options]
|
||||
sim mcp-servers update <mcpServerId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -136,7 +136,7 @@ sim mcp-servers update <id> [options]
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique MCP server identifier. |
|
||||
| `mcpServerId` | Yes | Unique MCP server identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
|
||||
@@ -14,15 +14,21 @@
|
||||
"profiles",
|
||||
"audit-logs",
|
||||
"billing",
|
||||
"blocks",
|
||||
"chat-deployments",
|
||||
"connector-types",
|
||||
"credentials",
|
||||
"custom-tools",
|
||||
"files",
|
||||
"knowledge",
|
||||
"logs",
|
||||
"mcp-servers",
|
||||
"meta",
|
||||
"secrets",
|
||||
"skills",
|
||||
"tables",
|
||||
"tools",
|
||||
"workflow-mcp-servers",
|
||||
"workflows",
|
||||
"workspaces",
|
||||
"reference"
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
title: Meta
|
||||
description: Manage meta — every subcommand, argument, and flag
|
||||
---
|
||||
|
||||
import { CommandTable } from '@/components/ui/command-table'
|
||||
|
||||
Every command below also accepts the [global options](/cli/commands#global-options).
|
||||
|
||||
## Show what this API supports and which limits apply
|
||||
|
||||
```bash
|
||||
sim meta status
|
||||
```
|
||||
File diff suppressed because it is too large
Load Diff
@@ -30,7 +30,7 @@ sim skills create [options]
|
||||
## Delete skill
|
||||
|
||||
```bash
|
||||
sim skills delete <id> [options]
|
||||
sim skills delete <skillId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -39,7 +39,7 @@ sim skills delete <id> [options]
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique skill identifier. A built-in skill is `builtin-` followed by its name, for example `builtin-research`. |
|
||||
| `skillId` | Yes | Unique skill identifier. A built-in skill is `builtin-` followed by its name, for example `builtin-research`. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
@@ -56,7 +56,7 @@ sim skills delete <id> [options]
|
||||
## Get skill
|
||||
|
||||
```bash
|
||||
sim skills get <id>
|
||||
sim skills get <skillId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -65,14 +65,14 @@ sim skills get <id>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique skill identifier. A built-in skill is `builtin-` followed by its name, for example `builtin-research`. |
|
||||
| `skillId` | Yes | Unique skill identifier. A built-in skill is `builtin-` followed by its name, for example `builtin-research`. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Grant skill editor
|
||||
|
||||
```bash
|
||||
sim skills editors create <id> [options]
|
||||
sim skills editors create <skillId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -81,7 +81,7 @@ sim skills editors create <id> [options]
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique skill identifier. A built-in skill is `builtin-` followed by its name, for example `builtin-research`. |
|
||||
| `skillId` | Yes | Unique skill identifier. A built-in skill is `builtin-` followed by its name, for example `builtin-research`. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
@@ -98,7 +98,7 @@ sim skills editors create <id> [options]
|
||||
## List skill editors
|
||||
|
||||
```bash
|
||||
sim skills editors list <id> [options]
|
||||
sim skills editors list <skillId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -107,7 +107,7 @@ sim skills editors list <id> [options]
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique skill identifier. A built-in skill is `builtin-` followed by its name, for example `builtin-research`. |
|
||||
| `skillId` | Yes | Unique skill identifier. A built-in skill is `builtin-` followed by its name, for example `builtin-research`. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
@@ -126,7 +126,7 @@ sim skills editors list <id> [options]
|
||||
## Revoke skill editor
|
||||
|
||||
```bash
|
||||
sim skills editors delete <id> [options]
|
||||
sim skills editors delete <skillId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -135,7 +135,7 @@ sim skills editors delete <id> [options]
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique skill identifier. A built-in skill is `builtin-` followed by its name, for example `builtin-research`. |
|
||||
| `skillId` | Yes | Unique skill identifier. A built-in skill is `builtin-` followed by its name, for example `builtin-research`. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
@@ -172,7 +172,7 @@ sim skills list [options]
|
||||
## Update skill
|
||||
|
||||
```bash
|
||||
sim skills update <id> [options]
|
||||
sim skills update <skillId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -181,7 +181,7 @@ sim skills update <id> [options]
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique skill identifier. A built-in skill is `builtin-` followed by its name, for example `builtin-research`. |
|
||||
| `skillId` | Yes | Unique skill identifier. A built-in skill is `builtin-` followed by its name, for example `builtin-research`. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
|
||||
@@ -62,37 +62,6 @@ sim tables columns delete <tableId> [options]
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Run a column’s workflow
|
||||
|
||||
```bash
|
||||
sim tables columns run <tableId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--group-ids <value...>` | Yes | Workflow or enrichment groups to run. (space-separated, or @path / @- with one value per line). |
|
||||
| `--run-mode <value>` | No | Whether to run all or only incomplete cells. Accepted values: `all`, `incomplete`. |
|
||||
| `--row-ids <value...>` | No | Explicit row subset to run. (space-separated, or @path / @- with one value per line). |
|
||||
| `--filter <json\|@file>` | No | Predicate: {"all":[{"field":"status","op":"eq","value":"active"}]}; groups use all/any. Operators: eq, ne, gt, gte, lt, lte, in, nin, contains, ncontains, startsWith, endsWith, like, ilike, nlike, nilike, isEmpty, isNotEmpty, isNull, isNotNull (JSON, or @path / @- to read a file or stdin). |
|
||||
| `--exclude-row-ids <value...>` | No | Rows excluded from a select-all run scope. (space-separated, or @path / @- with one value per line). |
|
||||
| `--limit <json\|@file>` | No | Optional cap on eligible rows to run. (JSON, or @path / @- to read a file or stdin). |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Update column
|
||||
|
||||
```bash
|
||||
@@ -229,10 +198,28 @@ sim tables groups update <tableId> [options]
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Cancel table export
|
||||
## Bulk delete tables and folders
|
||||
|
||||
```bash
|
||||
sim tables exports cancel <exportId>
|
||||
sim tables batch-delete [options]
|
||||
```
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--table-ids <json\|@file>` | No | Tables to archive, by identifier. (JSON, or @path / @- to read a file or stdin). |
|
||||
| `--folder <value...>` | No | Folder path as shown in the app; the leading / is optional (space-separated, or @path / @- with one value per line). |
|
||||
| `-y, --yes` | Yes | Confirm this destructive operation. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Apply a distinct patch to each listed row
|
||||
|
||||
```bash
|
||||
sim tables rows update-each <tableId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -241,6 +228,421 @@ sim tables exports cancel <exportId>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--updates <json\|@file>` | Yes | One merge patch per row. Each row identifier may appear at most once. (JSON, or @path / @- to read a file or stdin). |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Create rows
|
||||
|
||||
```bash
|
||||
sim tables rows create <tableId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--data <json\|@file>` | No | One row keyed by column name (JSON, or @path / @-; choose exactly one body flag). |
|
||||
| `--rows <json\|@file>` | No | Several rows keyed by column name (JSON, or @path / @-; choose exactly one body flag). |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Delete row
|
||||
|
||||
```bash
|
||||
sim tables rows delete <tableId> <rowId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
| `rowId` | Yes | Unique table row identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `-y, --yes` | Yes | Confirm this destructive operation. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Delete rows matching a filter, or an explicit list of ids
|
||||
|
||||
```bash
|
||||
sim tables rows batch-delete <tableId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--filter <json\|@file>` | No | Predicate: {"all":[{"field":"status","op":"eq","value":"active"}]}; groups use all/any. Operators: eq, ne, gt, gte, lt, lte, in, nin, contains, ncontains, startsWith, endsWith, like, ilike, nlike, nilike, isEmpty, isNotEmpty, isNull, isNotNull (JSON, or @path / @- to read a file or stdin). |
|
||||
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `100`. |
|
||||
| `--row <value...>` | No | Explicit row identifiers to delete. (space-separated, or @path / @- with one value per line). |
|
||||
| `-y, --yes` | Yes | Confirm this destructive operation. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Get row
|
||||
|
||||
```bash
|
||||
sim tables rows get <tableId> <rowId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
| `rowId` | Yes | Unique table row identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--include-run-state` | No | Include per-workflow-group run state on the returned row. Off by default. |
|
||||
| `--no-include-run-state` | No | Send --include-run-state as false. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## List rows
|
||||
|
||||
```bash
|
||||
sim tables rows list <tableId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `100`. |
|
||||
| `--include-run-state` | No | Include per-workflow-group run state on every returned row. Off by default: run state is a separate sidecar read and its `blockErrors` are unbounded, so a full page carries it only when asked. Caps `limit` at 200. |
|
||||
| `--no-include-run-state` | No | Send --include-run-state as false. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Query rows
|
||||
|
||||
```bash
|
||||
sim tables rows query <tableId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--filter <json\|@file>` | No | Condition: {"field":"status","op":"eq","value":"active"}. Groups: {"all":[{"field":"status","op":"eq","value":"active"}]} or {"any":[{"field":"status","op":"eq","value":"active"}]}; group entries may also be nested groups. Operators: eq, ne, gt, gte, lt, lte, in, nin, contains, ncontains, startsWith, endsWith, like, ilike, nlike, nilike, isEmpty, isNotEmpty, isNull, isNotNull (JSON, or @path / @- to read a file or stdin). |
|
||||
| `--sort <json\|@file>` | No | Ordered sort keys: [{"field":"createdAt","direction":"desc"}] (direction: asc or desc) (JSON, or @path / @- to read a file or stdin). |
|
||||
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `100`. |
|
||||
| `--include-run-state` | No | Include per-workflow-group run state on every returned row. Off by default: run state is a separate sidecar read and its `blockErrors` are unbounded, so a full page carries it only when asked. Incompatible with `limit: 0`, and caps `limit` at 200. |
|
||||
| `--no-include-run-state` | No | Send --include-run-state as false. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Count rows matching a filter
|
||||
|
||||
```bash
|
||||
sim tables rows count <tableId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--filter <json\|@file>` | No | Condition: {"field":"status","op":"eq","value":"active"}. Groups: {"all":[{"field":"status","op":"eq","value":"active"}]} or {"any":[{"field":"status","op":"eq","value":"active"}]}; group entries may also be nested groups. Operators: eq, ne, gt, gte, lt, lte, in, nin, contains, ncontains, startsWith, endsWith, like, ilike, nlike, nilike, isEmpty, isNotEmpty, isNull, isNotNull (JSON, or @path / @- to read a file or stdin). |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Run one row’s enrichment group
|
||||
|
||||
```bash
|
||||
sim tables rows enrich <tableId> <rowId> <groupId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
| `rowId` | Yes | Unique table row identifier. |
|
||||
| `groupId` | Yes | Workflow or enrichment group to run. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Search cells for a value and return their coordinates
|
||||
|
||||
```bash
|
||||
sim tables rows search <tableId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--query <value>` | Yes | Value to search for. |
|
||||
| `--filter <json\|@file>` | No | Predicate: {"all":[{"field":"status","op":"eq","value":"active"}]}; groups use all/any. Operators: eq, ne, gt, gte, lt, lte, in, nin, contains, ncontains, startsWith, endsWith, like, ilike, nlike, nilike, isEmpty, isNotEmpty, isNull, isNotNull (JSON, or @path / @- to read a file or stdin). |
|
||||
| `--sort <json\|@file>` | No | Ordered sort keys: [{"field":"createdAt","direction":"desc"}] (direction: asc or desc) (JSON, or @path / @- to read a file or stdin). |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Update every row matching a filter
|
||||
|
||||
```bash
|
||||
sim tables rows batch-update <tableId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--filter <json\|@file>` | Yes | Predicate: {"all":[{"field":"status","op":"eq","value":"active"}]}; groups use all/any. Operators: eq, ne, gt, gte, lt, lte, in, nin, contains, ncontains, startsWith, endsWith, like, ilike, nlike, nilike, isEmpty, isNotEmpty, isNull, isNotNull (JSON, or @path / @- to read a file or stdin). |
|
||||
| `--data <json\|@file>` | Yes | Row-data patch applied to every matching row. (JSON, or @path / @- to read a file or stdin). |
|
||||
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `100`. |
|
||||
| `-y, --yes` | Yes | Confirm this destructive operation. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Update row
|
||||
|
||||
```bash
|
||||
sim tables rows update <tableId> <rowId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
| `rowId` | Yes | Unique table row identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--data <json\|@file>` | Yes | Partial row-data patch keyed by column name. (JSON, or @path / @- to read a file or stdin). |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Cancel a running dispatch
|
||||
|
||||
```bash
|
||||
sim tables dispatches cancel <tableId> <dispatchId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
| `dispatchId` | Yes | Unique table run-dispatch identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `-y, --yes` | Yes | Confirm this destructive operation. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Start a column or enrichment run
|
||||
|
||||
```bash
|
||||
sim tables dispatches create <tableId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--group-ids <value...>` | Yes | Workflow or enrichment groups to run. (space-separated, or @path / @- with one value per line). |
|
||||
| `--run-mode <value>` | No | Whether to run all or only incomplete cells. Accepted values: `all`, `incomplete`. |
|
||||
| `--row-ids <value...>` | No | Explicit row subset to run. (space-separated, or @path / @- with one value per line). |
|
||||
| `--filter <json\|@file>` | No | Predicate: {"all":[{"field":"status","op":"eq","value":"active"}]}; groups use all/any. Operators: eq, ne, gt, gte, lt, lte, in, nin, contains, ncontains, startsWith, endsWith, like, ilike, nlike, nilike, isEmpty, isNotEmpty, isNull, isNotNull (JSON, or @path / @- to read a file or stdin). |
|
||||
| `--exclude-row-ids <value...>` | No | Rows excluded from a select-all run scope. (space-separated, or @path / @- with one value per line). |
|
||||
| `--limit <json\|@file>` | No | Optional cap on eligible rows to run. (JSON, or @path / @- to read a file or stdin). |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Get run dispatch
|
||||
|
||||
```bash
|
||||
sim tables dispatches get <tableId> <dispatchId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
| `dispatchId` | Yes | Unique table run-dispatch identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## List active run dispatches
|
||||
|
||||
```bash
|
||||
sim tables dispatches list <tableId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Cancel table export
|
||||
|
||||
```bash
|
||||
sim tables exports cancel <tableId> <exportId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
| `exportId` | Yes | Unique table-export identifier. |
|
||||
|
||||
</CommandTable>
|
||||
@@ -274,7 +676,7 @@ sim tables exports create <tableId> [options]
|
||||
## Get table export
|
||||
|
||||
```bash
|
||||
sim tables exports get <exportId>
|
||||
sim tables exports get <tableId> <exportId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -283,6 +685,7 @@ sim tables exports get <exportId>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
| `exportId` | Yes | Unique table-export identifier. |
|
||||
|
||||
</CommandTable>
|
||||
@@ -290,7 +693,7 @@ sim tables exports get <exportId>
|
||||
## Get the download URL for a finished export
|
||||
|
||||
```bash
|
||||
sim tables exports download <exportId>
|
||||
sim tables exports download <tableId> <exportId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -299,6 +702,7 @@ sim tables exports download <exportId>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
| `exportId` | Yes | Unique table-export identifier. |
|
||||
|
||||
</CommandTable>
|
||||
@@ -466,10 +870,10 @@ Also available as `sim tables folders mv`.
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Create rows
|
||||
## Restore an archived table folder
|
||||
|
||||
```bash
|
||||
sim tables rows create <tableId> [options]
|
||||
sim tables folders restore <path>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -478,273 +882,7 @@ sim tables rows create <tableId> [options]
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--data <json\|@file>` | No | One row keyed by column name (JSON, or @path / @-; choose exactly one body flag). |
|
||||
| `--rows <json\|@file>` | No | Several rows keyed by column name (JSON, or @path / @-; choose exactly one body flag). |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Delete row
|
||||
|
||||
```bash
|
||||
sim tables rows delete <tableId> <rowId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
| `rowId` | Yes | Unique table row identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `-y, --yes` | Yes | Confirm this destructive operation. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Delete rows matching a filter, or an explicit list of ids
|
||||
|
||||
```bash
|
||||
sim tables rows batch-delete <tableId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--filter <json\|@file>` | No | Predicate: {"all":[{"field":"status","op":"eq","value":"active"}]}; groups use all/any. Operators: eq, ne, gt, gte, lt, lte, in, nin, contains, ncontains, startsWith, endsWith, like, ilike, nlike, nilike, isEmpty, isNotEmpty, isNull, isNotNull (JSON, or @path / @- to read a file or stdin). |
|
||||
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `100`. |
|
||||
| `--row <value...>` | No | Explicit row identifiers to delete. (space-separated, or @path / @- with one value per line). |
|
||||
| `-y, --yes` | Yes | Confirm this destructive operation. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Find rows matching a predicate
|
||||
|
||||
```bash
|
||||
sim tables rows find <tableId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--query <value>` | Yes | Value to find. |
|
||||
| `--filter <json\|@file>` | No | Predicate: {"all":[{"field":"status","op":"eq","value":"active"}]}; groups use all/any. Operators: eq, ne, gt, gte, lt, lte, in, nin, contains, ncontains, startsWith, endsWith, like, ilike, nlike, nilike, isEmpty, isNotEmpty, isNull, isNotNull (JSON, or @path / @- to read a file or stdin). |
|
||||
| `--sort <json\|@file>` | No | Ordered sort keys: [{"field":"createdAt","direction":"desc"}] (direction: asc or desc) (JSON, or @path / @- to read a file or stdin). |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Get row
|
||||
|
||||
```bash
|
||||
sim tables rows get <tableId> <rowId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
| `rowId` | Yes | Unique table row identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## List rows
|
||||
|
||||
```bash
|
||||
sim tables rows list <tableId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `100`. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Query rows
|
||||
|
||||
```bash
|
||||
sim tables rows query <tableId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--filter <json\|@file>` | No | Condition: {"field":"status","op":"eq","value":"active"}. Groups: {"all":[{"field":"status","op":"eq","value":"active"}]} or {"any":[{"field":"status","op":"eq","value":"active"}]}; group entries may also be nested groups. Operators: eq, ne, gt, gte, lt, lte, in, nin, contains, ncontains, startsWith, endsWith, like, ilike, nlike, nilike, isEmpty, isNotEmpty, isNull, isNotNull (JSON, or @path / @- to read a file or stdin). |
|
||||
| `--sort <json\|@file>` | No | Ordered sort keys: [{"field":"createdAt","direction":"desc"}] (direction: asc or desc) (JSON, or @path / @- to read a file or stdin). |
|
||||
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `100`. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Count rows matching a filter
|
||||
|
||||
```bash
|
||||
sim tables rows count <tableId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--filter <json\|@file>` | No | Condition: {"field":"status","op":"eq","value":"active"}. Groups: {"all":[{"field":"status","op":"eq","value":"active"}]} or {"any":[{"field":"status","op":"eq","value":"active"}]}; group entries may also be nested groups. Operators: eq, ne, gt, gte, lt, lte, in, nin, contains, ncontains, startsWith, endsWith, like, ilike, nlike, nilike, isEmpty, isNotEmpty, isNull, isNotNull (JSON, or @path / @- to read a file or stdin). |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Run one row’s enrichment group
|
||||
|
||||
```bash
|
||||
sim tables rows enrich <tableId> <rowId> <groupId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
| `rowId` | Yes | Unique table row identifier. |
|
||||
| `groupId` | Yes | Workflow or enrichment group to run. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Update every row matching a filter
|
||||
|
||||
```bash
|
||||
sim tables rows batch-update <tableId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--filter <json\|@file>` | Yes | Predicate: {"all":[{"field":"status","op":"eq","value":"active"}]}; groups use all/any. Operators: eq, ne, gt, gte, lt, lte, in, nin, contains, ncontains, startsWith, endsWith, like, ilike, nlike, nilike, isEmpty, isNotEmpty, isNull, isNotNull (JSON, or @path / @- to read a file or stdin). |
|
||||
| `--data <json\|@file>` | Yes | Row-data patch applied to every matching row. (JSON, or @path / @- to read a file or stdin). |
|
||||
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `100`. |
|
||||
| `-y, --yes` | Yes | Confirm this destructive operation. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Update row
|
||||
|
||||
```bash
|
||||
sim tables rows update <tableId> <rowId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
| `rowId` | Yes | Unique table row identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--data <json\|@file>` | Yes | Partial row-data patch keyed by column name. (JSON, or @path / @- to read a file or stdin). |
|
||||
| `path` | Yes | Folder path as shown in the app; the leading / is optional |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
@@ -892,6 +1030,24 @@ sim tables delete <tableId> [options]
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Get enrichment run detail
|
||||
|
||||
```bash
|
||||
sim tables enrichment get <tableId> <rowId> <groupId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
| `rowId` | Yes | Unique table row identifier. |
|
||||
| `groupId` | Yes | Workflow or enrichment group to run. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Get table
|
||||
|
||||
```bash
|
||||
@@ -920,6 +1076,7 @@ sim tables list [options]
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) for live tables, `archived` for tables a `DELETE` archived and `POST /tables/{tableId}/restore` can bring back. `folderPath` resolves against active folders only, so pairing it with `scope=archived` returns an empty page when the containing folder was archived too. Accepted values: `active`, `archived`. |
|
||||
| `--folder <value>` | No | Folder path as shown in the app; the leading / is optional. |
|
||||
| `--search <value>` | No | Case-insensitive substring match against the resource name. |
|
||||
| `--sort-by <value>` | No | Field used to sort the result. Sorting by `name` is case-sensitive and follows the storage collation, so do not rely on a case-insensitive order. Accepted values: `name`, `createdAt`, `updatedAt`. |
|
||||
@@ -928,6 +1085,40 @@ sim tables list [options]
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Move tables and folders
|
||||
|
||||
```bash
|
||||
sim tables move [options]
|
||||
```
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--table-ids <json\|@file>` | No | Tables to move, by identifier. (JSON, or @path / @- to read a file or stdin). |
|
||||
| `--folder <value...>` | No | Folder path as shown in the app; the leading / is optional (space-separated, or @path / @- with one value per line). |
|
||||
| `--to <value>` | No | Destination folder path; omit for root. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Restore an archived table
|
||||
|
||||
```bash
|
||||
sim tables restore <tableId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `tableId` | Yes | Unique table identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Update table
|
||||
|
||||
```bash
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
title: Tools
|
||||
description: Manage tools — every subcommand, argument, and flag
|
||||
---
|
||||
|
||||
import { CommandTable } from '@/components/ui/command-table'
|
||||
|
||||
Every command below also accepts the [global options](/cli/commands#global-options).
|
||||
|
||||
## Get tool
|
||||
|
||||
```bash
|
||||
sim tools get <toolId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `toolId` | Yes | Tool identifier. An unversioned name resolves to the newest version, and the response echoes the resolved id. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## List tools
|
||||
|
||||
```bash
|
||||
sim tools list [options]
|
||||
```
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--search <value>` | No | Case-insensitive substring match against the tool id, name, and description. |
|
||||
| `--hosted-api-key <value>` | No | Restrict to tools by how their API key is supplied. Accepted values: `always`, `conditional`, `none`. |
|
||||
| `--oauth-provider <value>` | No | Restrict to tools that authenticate against this OAuth service. |
|
||||
| `--sort-by <value>` | No | Field used to sort the result. Sorting by `name` is case-sensitive and follows the storage collation, so do not rely on a case-insensitive order. Accepted values: `id`, `name`. |
|
||||
| `--sort-order <value>` | No | Sort direction. Accepted values: `asc`, `desc`. |
|
||||
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `100`. |
|
||||
|
||||
</CommandTable>
|
||||
@@ -0,0 +1,189 @@
|
||||
---
|
||||
title: Workflow Mcp Servers
|
||||
description: Manage workflow mcp servers — every subcommand, argument, and flag
|
||||
---
|
||||
|
||||
import { CommandTable } from '@/components/ui/command-table'
|
||||
|
||||
Every command below also accepts the [global options](/cli/commands#global-options).
|
||||
|
||||
## Create workflow MCP server
|
||||
|
||||
```bash
|
||||
sim workflow-mcp-servers create [options]
|
||||
```
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--name <value>` | Yes | Server display name, shown to connecting MCP clients. |
|
||||
| `--description <value>` | No | Optional server description. |
|
||||
| `--is-public` | No | Whether the server answers MCP clients without a Sim API key. Defaults to false — a public server executes the workflows it publishes for anyone holding its URL. |
|
||||
| `--no-is-public` | No | Send --is-public as false. |
|
||||
| `--workflow <value...>` | No | Deployed workflows to publish as tools on the new server. (space-separated, or @path / @- with one value per line). |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Delete workflow MCP server
|
||||
|
||||
```bash
|
||||
sim workflow-mcp-servers delete <serverId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `serverId` | Yes | Unique workflow-MCP server identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `-y, --yes` | Yes | Confirm this destructive operation. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Publish workflow as MCP tool
|
||||
|
||||
```bash
|
||||
sim workflow-mcp-servers tools create <serverId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `serverId` | Yes | Unique workflow-MCP server identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--workflow-id <value>` | Yes | Deployed workflow to publish. The workflow must already be deployed. |
|
||||
| `--tool-name <value>` | No | Name MCP clients call. Normalized to the MCP tool-name grammar, and derived from the workflow name when omitted. |
|
||||
| `--tool-description <value>` | No | Description shown to MCP clients. Derived from the workflow name when omitted. |
|
||||
| `--parameter-descriptions <json\|@file>` | No | Per-field description overrides applied to the schema generated from the deployed workflow inputs. A name matching no input field is ignored. (JSON, or @path / @- to read a file or stdin). |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## List workflow MCP tools
|
||||
|
||||
```bash
|
||||
sim workflow-mcp-servers tools list <serverId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `serverId` | Yes | Unique workflow-MCP server identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Unpublish workflow MCP tool
|
||||
|
||||
```bash
|
||||
sim workflow-mcp-servers tools delete <serverId> <workflowId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `serverId` | Yes | Unique workflow-MCP server identifier. |
|
||||
| `workflowId` | Yes | Workflow published as a tool on this server. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `-y, --yes` | Yes | Confirm this destructive operation. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Get workflow MCP server
|
||||
|
||||
```bash
|
||||
sim workflow-mcp-servers get <serverId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `serverId` | Yes | Unique workflow-MCP server identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## List workflow MCP servers
|
||||
|
||||
```bash
|
||||
sim workflow-mcp-servers list [options]
|
||||
```
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--sort-by <value>` | No | Field used to sort the result. Sorting by `name` is case-sensitive and follows the storage collation, so do not rely on a case-insensitive order. Accepted values: `name`, `createdAt`, `updatedAt`. |
|
||||
| `--sort-order <value>` | No | Sort direction. Accepted values: `asc`, `desc`. |
|
||||
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `100`. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Update workflow MCP server
|
||||
|
||||
```bash
|
||||
sim workflow-mcp-servers update <serverId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `serverId` | Yes | Unique workflow-MCP server identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--name <value>` | No | Server display name, shown to connecting MCP clients. |
|
||||
| `--description <value>` | No | New server description, or null to clear it. |
|
||||
| `--is-public` | No | Whether the server answers MCP clients without a Sim API key. |
|
||||
| `--no-is-public` | No | Send --is-public as false. |
|
||||
|
||||
</CommandTable>
|
||||
@@ -9,6 +9,83 @@ import { CommandTable } from '@/components/ui/command-table'
|
||||
|
||||
Every command below also accepts the [global options](/cli/commands#global-options).
|
||||
|
||||
## Activate workflow version
|
||||
|
||||
```bash
|
||||
sim workflows activate create <workflowId> <version>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `workflowId` | Yes | Unique workflow identifier. |
|
||||
| `version` | Yes | Numeric deployment version. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Apply workflow operations
|
||||
|
||||
```bash
|
||||
sim workflows operations apply <workflowId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `workflowId` | Yes | Unique workflow identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--dry-run` | No | Validate and lint without persisting. The response is identical to the committed write of the same body, so a caller can inspect `lint` and then re-send the request for real. Nothing is written, no audit entry is recorded, and collaborators are not notified. |
|
||||
| `--no-dry-run` | No | Send --dry-run as false. |
|
||||
| `--operations <json\|@file>` | Yes | Edits to apply, in a single batch. (JSON, or @path / @- to read a file or stdin). |
|
||||
| `--atomic` | No | Fail the whole batch when any operation is declined or any block input would be dropped. The default applies what it can and reports the rest in `skipped` and `inputValidationErrors`; `true` writes nothing and answers `409` instead. |
|
||||
| `--no-atomic` | No | Send --atomic as false. |
|
||||
| `--layout <value>` | No | Whether to reposition blocks the batch touched. `targeted` (default) nudges only the affected subgraph; `none` leaves every position exactly as supplied. Accepted values: `targeted`, `none`. |
|
||||
| `--set-block-enabled <json\|@file>` | No | Blocks to enable or disable, applied after `operations`. Disabling a loop or parallel cascades to its unlocked descendants; enabling a block whose container is disabled is declined. (JSON, or @path / @- to read a file or stdin). |
|
||||
| `-y, --yes` | Yes | Confirm this destructive operation. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Update workflow variables
|
||||
|
||||
```bash
|
||||
sim workflows variables update <workflowId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `workflowId` | Yes | Unique workflow identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--operations <json\|@file>` | Yes | Variable changes to apply, in order. (JSON, or @path / @- to read a file or stdin). |
|
||||
| `-y, --yes` | Yes | Confirm this destructive operation. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Cancel a running workflow run
|
||||
|
||||
```bash
|
||||
@@ -62,6 +139,9 @@ Show run status (requested outputs are included in JSON or YAML output)
|
||||
| `--workflow <workflowId>` | Yes | Workflow ID. |
|
||||
| `--include-output` | No | Include the final output in JSON or YAML output. |
|
||||
| `--select-output <value...>` | No | Include blockName.field values in JSON or YAML output (e.g. agent_1.content) (space-separated, or @path / @- with one value per line). |
|
||||
| `--include-file-base64` | No | Inline each produced file's bytes as base64. Requires `includeOutput`. A file above the inline ceiling answers `413` naming its download path; fetch large files from `downloadPath` instead. |
|
||||
| `--no-include-file-base64` | No | Send --include-file-base64 as false. |
|
||||
| `--base64-max-bytes <value>` | No | Per-file inline ceiling, lowering but never raising the server limit of 16 MiB. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
@@ -248,7 +328,7 @@ Also available as `sim workflows folders mv`.
|
||||
## Delete workflow
|
||||
|
||||
```bash
|
||||
sim workflows delete <id> [options]
|
||||
sim workflows delete <workflowId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -257,7 +337,7 @@ sim workflows delete <id> [options]
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique workflow identifier. |
|
||||
| `workflowId` | Yes | Unique workflow identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
@@ -271,10 +351,10 @@ sim workflows delete <id> [options]
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Deploy workflow
|
||||
## Take a workflow’s chat deployment offline
|
||||
|
||||
```bash
|
||||
sim workflows deploy <id> [options]
|
||||
sim workflows chat unpublish <workflowId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -283,7 +363,87 @@ sim workflows deploy <id> [options]
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique workflow identifier. |
|
||||
| `workflowId` | Yes | Unique workflow identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `-y, --yes` | Yes | Confirm this destructive operation. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Show a workflow’s chat deployment
|
||||
|
||||
```bash
|
||||
sim workflows chat status <workflowId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `workflowId` | Yes | Unique workflow identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Publish or replace a workflow’s chat deployment
|
||||
|
||||
```bash
|
||||
sim workflows chat publish <workflowId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `workflowId` | Yes | Unique workflow identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--identifier <value>` | Yes | URL slug the deployed chat answers on. Must be free across live deployments. |
|
||||
| `--title <value>` | Yes | Title shown to visitors. |
|
||||
| `--description <value>` | No | Description shown to visitors. Omitted clears it. |
|
||||
| `--customizations <json\|@file>` | No | Presentation overrides. Omitted fields take platform defaults. (JSON, or @path / @- to read a file or stdin). |
|
||||
| `--auth-type <value>` | No | How visitors are gated. `public` leaves the chat open to anyone holding the URL. Accepted values: `public`, `password`, `email`, `sso`. |
|
||||
| `--password <value>` | No | Write-only password. Required whenever `authType` is `password`, and rejected otherwise. Never readable back. |
|
||||
| `--allowed-emails <json\|@file>` | No | Email addresses or domains admitted under `email` and `sso` gating. At least one is required for those modes. (JSON, or @path / @- to read a file or stdin). |
|
||||
| `--output-configs <json\|@file>` | No | Block outputs to surface to visitors. Omitted surfaces none. (JSON, or @path / @- to read a file or stdin). |
|
||||
| `--include-thinking` | No | Allow visitors to receive provider thinking events. |
|
||||
| `--no-include-thinking` | No | Send --include-thinking as false. |
|
||||
| `--include-tool-calls` | No | Allow visitors to receive tool lifecycle events. |
|
||||
| `--no-include-tool-calls` | No | Send --include-tool-calls as false. |
|
||||
| `-y, --yes` | Yes | Confirm this destructive operation. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Deploy workflow
|
||||
|
||||
```bash
|
||||
sim workflows deploy <workflowId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `workflowId` | Yes | Unique workflow identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
@@ -298,10 +458,10 @@ sim workflows deploy <id> [options]
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Run a deployed workflow
|
||||
## Duplicate workflow
|
||||
|
||||
```bash
|
||||
sim workflows run <id> [options]
|
||||
sim workflows duplicate create <workflowId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -310,7 +470,34 @@ sim workflows run <id> [options]
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique workflow identifier. |
|
||||
| `workflowId` | Yes | Unique workflow identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--name <value>` | No | Name for the copy. Defaults to the source name, deduplicated within the folder. |
|
||||
| `--folder <value>` | No | Folder path as shown in the app; the leading / is optional. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Run a deployed workflow or execute saved state manually
|
||||
|
||||
```bash
|
||||
sim workflows run <workflowId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `workflowId` | Yes | Unique workflow identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
@@ -326,7 +513,12 @@ sim workflows run <id> [options]
|
||||
| `--select-output <value...>` | No | Return blockName.field values (e.g. agent_1.content); missing fields are omitted (space-separated, or @path / @- with one value per line). |
|
||||
| `--include-file-base64` | No | Inline eligible output files as base64 content. Rejected when `async` is true. |
|
||||
| `--no-include-file-base64` | No | Send --include-file-base64 as false. |
|
||||
| `--base64-max-bytes <value>` | No | Maximum total bytes of file content to inline as base64. Rejected when `async` is true. |
|
||||
| `--base64-max-bytes <value>` | No | Maximum total bytes of file content to inline as base64, lowering but never raising the server limit of 16 MiB. Rejected when `async` is true. |
|
||||
| `--manual` | No | Run the current saved workflow state instead of the active deployment. |
|
||||
| `--trigger <blockId>` | No | Enter a manual run through this runnable trigger (requires --manual). |
|
||||
| `--mock-payload` | No | Use the selected trigger's server-derived mock payload (requires --manual). |
|
||||
| `--from-block <blockId>` | No | Run manually from this saved workflow block. |
|
||||
| `--source-run <runId>` | No | Prior run whose persisted state supplies upstream outputs (requires --from-block). |
|
||||
| `--follow` | No | Stream the run as it happens; progress on stderr, result on stdout. The stream reports only success and output, so the result omits the run id and timings a non-streaming run returns. |
|
||||
| `--include-thinking` | No | Show model reasoning while following (requires --follow). |
|
||||
| `--include-tool-calls` | No | Show tool calls while following (requires --follow). |
|
||||
@@ -336,7 +528,7 @@ sim workflows run <id> [options]
|
||||
## Print a workflow as a portable JSON document
|
||||
|
||||
```bash
|
||||
sim workflows export <id>
|
||||
sim workflows export <workflowId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -345,14 +537,14 @@ sim workflows export <id>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique workflow identifier. |
|
||||
| `workflowId` | Yes | Unique workflow identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Get workflow
|
||||
|
||||
```bash
|
||||
sim workflows get <id>
|
||||
sim workflows get <workflowId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -361,14 +553,14 @@ sim workflows get <id>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique workflow identifier. |
|
||||
| `workflowId` | Yes | Unique workflow identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Show a workflow’s current deployment
|
||||
|
||||
```bash
|
||||
sim workflows deployment status <id>
|
||||
sim workflows deployment status <workflowId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -377,14 +569,89 @@ sim workflows deployment status <id>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique workflow identifier. |
|
||||
| `workflowId` | Yes | Unique workflow identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Update workflow public API access
|
||||
|
||||
```bash
|
||||
sim workflows deployment update <workflowId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `workflowId` | Yes | Unique workflow identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--is-public-api <true\|false>` | Yes | Whether the deployed workflow should accept unauthenticated public API execution. Accepted values: `true`, `false`. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Get workflow state
|
||||
|
||||
```bash
|
||||
sim workflows state get <workflowId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `workflowId` | Yes | Unique workflow identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Replace workflow state
|
||||
|
||||
```bash
|
||||
sim workflows state replace <workflowId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `workflowId` | Yes | Unique workflow identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--dry-run` | No | Validate and lint without persisting. The response is identical to the committed write of the same body, so a caller can inspect `lint` and then re-send the request for real. Nothing is written, no audit entry is recorded, and collaborators are not notified. |
|
||||
| `--no-dry-run` | No | Send --dry-run as false. |
|
||||
| `--blocks <json\|@file>` | Yes | Blocks keyed by block id. (JSON, or @path / @- to read a file or stdin). |
|
||||
| `--edges <json\|@file>` | Yes | Directed connections between blocks. (JSON, or @path / @- to read a file or stdin). |
|
||||
| `--loops <json\|@file>` | No | Ignored on write: loop containers are recomputed from `blocks`. (JSON, or @path / @- to read a file or stdin). |
|
||||
| `--parallels <json\|@file>` | No | Ignored on write: parallel containers are recomputed from `blocks`. (JSON, or @path / @- to read a file or stdin). |
|
||||
| `--variables <json\|@file>` | No | Replacement variable set. Omit to leave the stored variables untouched. (JSON, or @path / @- to read a file or stdin). |
|
||||
| `-y, --yes` | Yes | Confirm this destructive operation. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Get workflow version
|
||||
|
||||
```bash
|
||||
sim workflows versions get <id> <version>
|
||||
sim workflows versions get <workflowId> <version>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -393,7 +660,7 @@ sim workflows versions get <id> <version>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique workflow identifier. |
|
||||
| `workflowId` | Yes | Unique workflow identifier. |
|
||||
| `version` | Yes | Numeric deployment version. |
|
||||
|
||||
</CommandTable>
|
||||
@@ -401,7 +668,7 @@ sim workflows versions get <id> <version>
|
||||
## List workflow versions
|
||||
|
||||
```bash
|
||||
sim workflows versions list <id> [options]
|
||||
sim workflows versions list <workflowId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -410,7 +677,7 @@ sim workflows versions list <id> [options]
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique workflow identifier. |
|
||||
| `workflowId` | Yes | Unique workflow identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
@@ -424,6 +691,34 @@ sim workflows versions list <id> [options]
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Update workflow version
|
||||
|
||||
```bash
|
||||
sim workflows versions update <workflowId> <version> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `workflowId` | Yes | Unique workflow identifier. |
|
||||
| `version` | Yes | Numeric deployment version. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--name <value>` | No | New label for the deployment version. |
|
||||
| `--description <value>` | No | New release note for the deployment version, or null to clear it. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Import workflow
|
||||
|
||||
```bash
|
||||
@@ -455,6 +750,7 @@ sim workflows list [options]
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) for live workflows, `archived` for workflows a `DELETE` archived. `folderPath` resolves against active folders only, so pairing it with `scope=archived` returns an empty page when the containing folder was archived too. Accepted values: `active`, `archived`. |
|
||||
| `--folder <value>` | No | Folder path as shown in the app; the leading / is optional. |
|
||||
| `--deployed-only` | No | Return only workflows with an active deployment when true. |
|
||||
| `--no-deployed-only` | No | Send --deployed-only as false. |
|
||||
@@ -465,10 +761,27 @@ sim workflows list [options]
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Rollback workflow
|
||||
## Move workflows
|
||||
|
||||
```bash
|
||||
sim workflows rollback <id> [options]
|
||||
sim workflows move [options]
|
||||
```
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `--workflow <value...>` | Yes | Workflows to move. Duplicates are collapsed. (space-separated, or @path / @- with one value per line). |
|
||||
| `--folder <value>` | Yes | Folder path as shown in the app; the leading / is optional. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Restore an archived workflow
|
||||
|
||||
```bash
|
||||
sim workflows restore <workflowId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -477,7 +790,50 @@ sim workflows rollback <id> [options]
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique workflow identifier. |
|
||||
| `workflowId` | Yes | Unique workflow identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Revert workflow to version
|
||||
|
||||
```bash
|
||||
sim workflows revert create <workflowId> <version> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `workflowId` | Yes | Unique workflow identifier. |
|
||||
| `version` | Yes | Numeric deployment version, or `active` for the currently live version. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
**Options**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Option | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `-y, --yes` | Yes | Confirm this destructive operation. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Rollback workflow
|
||||
|
||||
```bash
|
||||
sim workflows rollback <workflowId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
<CommandTable>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `workflowId` | Yes | Unique workflow identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
@@ -494,7 +850,7 @@ sim workflows rollback <id> [options]
|
||||
## Take a workflow out of deployment
|
||||
|
||||
```bash
|
||||
sim workflows undeploy <id>
|
||||
sim workflows undeploy <workflowId>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -503,14 +859,14 @@ sim workflows undeploy <id>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique workflow identifier. |
|
||||
| `workflowId` | Yes | Unique workflow identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
## Update workflow
|
||||
|
||||
```bash
|
||||
sim workflows update <id> [options]
|
||||
sim workflows update <workflowId> [options]
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -519,7 +875,7 @@ sim workflows update <id> [options]
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique workflow identifier. |
|
||||
| `workflowId` | Yes | Unique workflow identifier. |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
@@ -538,7 +894,7 @@ sim workflows update <id> [options]
|
||||
## Move a workflow to a folder
|
||||
|
||||
```bash
|
||||
sim workflows mv <id> <folder>
|
||||
sim workflows mv <workflowId> <folder>
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
@@ -547,7 +903,7 @@ sim workflows mv <id> <folder>
|
||||
|
||||
| Argument | Required | Description |
|
||||
| --- | --- | --- |
|
||||
| `id` | Yes | Unique workflow identifier. |
|
||||
| `workflowId` | Yes | Unique workflow identifier. |
|
||||
| `folder` | Yes | Folder path as shown in the app; the leading / is optional |
|
||||
|
||||
</CommandTable>
|
||||
|
||||
@@ -174,7 +174,7 @@ Access resume data in downstream blocks using `<blockId.fieldName>`.
|
||||
|
||||
## API Execute Behavior
|
||||
|
||||
When triggering a workflow through `POST /api/v2/workflows/{id}/execute`, HITL blocks cause the execution to pause and return the `_resume` data in the v2 response envelope. The legacy `POST /api/workflows/{id}/execute` endpoint remains available for existing integrations.
|
||||
When triggering a workflow through `POST /api/v2/workflows/{workflowId}/execute`, HITL blocks cause the execution to pause and return the `_resume` data in the v2 response envelope. The legacy `POST /api/workflows/{id}/execute` endpoint remains available for existing integrations.
|
||||
|
||||
<Tabs items={['Sync (JSON)', 'Stream (SSE)', 'Async']}>
|
||||
<Tab>
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
"(generated)/credentials",
|
||||
"(generated)/secrets",
|
||||
"(generated)/billing",
|
||||
"(generated)/catalog",
|
||||
"(generated)/meta",
|
||||
"(generated)/audit-logs"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
"(generated)/credentials",
|
||||
"(generated)/secrets",
|
||||
"(generated)/billing",
|
||||
"(generated)/catalog",
|
||||
"(generated)/meta",
|
||||
"(generated)/audit-logs"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
"(generated)/credentials",
|
||||
"(generated)/secrets",
|
||||
"(generated)/billing",
|
||||
"(generated)/catalog",
|
||||
"(generated)/meta",
|
||||
"(generated)/audit-logs"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
"(generated)/credentials",
|
||||
"(generated)/secrets",
|
||||
"(generated)/billing",
|
||||
"(generated)/catalog",
|
||||
"(generated)/meta",
|
||||
"(generated)/audit-logs"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -189,6 +189,29 @@ export const DOCS_REDIRECTS: DocsRedirect[] = [
|
||||
* must resolve.
|
||||
*/
|
||||
// Pure operationId renames — same path and method, v1 -> v2.
|
||||
{
|
||||
// `/rows/find` became `/rows/search`: same operation, renamed once the
|
||||
// surface settled on `query` for a structured predicate and `search` for
|
||||
// text.
|
||||
source: '/api-reference/tables/findTableRows',
|
||||
destination: '/api-reference/tables/searchTableRows',
|
||||
permanent: true,
|
||||
},
|
||||
{
|
||||
// `/columns/run` became `POST /tables/{tableId}/dispatches`: it always
|
||||
// created a dispatch and was polled as one, and `GET .../dispatches`
|
||||
// already sat at the path it now posts to.
|
||||
//
|
||||
// These two are the only operations that pass retired a *published* slug —
|
||||
// confirmed by diffing operationIds in the committed specs, not by reading
|
||||
// the diff, because a path can move while its operationId (and therefore
|
||||
// its docs slug) stays put, and an operationId can change without the path
|
||||
// moving. Everything else renamed alongside them was added and removed
|
||||
// within the same unreleased branch.
|
||||
source: '/api-reference/tables/runTableColumns',
|
||||
destination: '/api-reference/tables/createTableDispatch',
|
||||
permanent: true,
|
||||
},
|
||||
{
|
||||
source: '/api-reference/audit-logs/getAuditLogDetails',
|
||||
destination: '/api-reference/audit-logs/getAuditLog',
|
||||
|
||||
@@ -43,9 +43,9 @@
|
||||
"name": "workspaceId",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"description": "Workspace whose payer should be resolved. Workspace API keys are pinned to their own workspace.",
|
||||
"description": "Workspace whose payer should be resolved. A workspace API key is pinned to its own workspace: any other id answers `404 Workspace not found`, which is also what an id that does not exist answers.",
|
||||
"schema": {
|
||||
"description": "Workspace whose payer should be resolved. Workspace API keys are pinned to their own workspace.",
|
||||
"description": "Workspace whose payer should be resolved. A workspace API key is pinned to its own workspace: any other id answers `404 Workspace not found`, which is also what an id that does not exist answers.",
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 128
|
||||
@@ -452,7 +452,7 @@
|
||||
"description": "Human-readable explanation of the error."
|
||||
},
|
||||
"details": {
|
||||
"description": "Structured error details. On a `403` whose cause a caller can act on, this carries a `code` from a closed set:\n- `INSUFFICIENT_WORKSPACE_ROLE` — The caller has access to the workspace but its role is below the one this operation requires.\n- `PERSONAL_API_KEYS_DISABLED` — The workspace's organization does not allow personal API keys. Use a workspace API key.\n- `WORKSPACE_KEY_OPERATION_NOT_PERMITTED` — This operation is not available to a workspace-scoped API key. Use a personal API key.\n- `PRINCIPAL_KIND_NOT_PERMITTED` — This operation does not accept the caller’s kind of API key.\n- `ORGANIZATION_MEMBERSHIP_REQUIRED` — The caller is not a member of the organization it named.\n- `ORGANIZATION_ADMIN_REQUIRED` — The caller is a member of the organization but not an admin or owner.\n- `ENTERPRISE_PLAN_REQUIRED` — The organization has no active enterprise subscription.\n- `ORGANIZATION_PLAN_REQUIRED` — The organization has no active organization subscription (Pro for Teams, Max for Teams, or Enterprise).\n- `AUDIT_LOGS_DISABLED` — Audit logging is not enabled for this deployment.\n- `SKILL_EDITOR_ACCESS_REQUIRED` — The caller can write in the workspace but is not an editor of this skill.\n- `SECRET_ADMIN_ACCESS_REQUIRED` — The caller can write in the workspace but is not an admin of this secret. Ask a workspace admin, or someone holding admin on the secret, to grant access or set the value.\n- `WORKSPACE_RESOURCE_LIMIT_REACHED` — The workspace already holds the maximum number of resources of this kind. Delete one, or contact Sim to raise the limit; the message names the ceiling.\n- `PUBLIC_SHARING_NOT_ALLOWED` — The workspace's organization does not permit sharing this resource publicly. An organization admin controls the policy.\n- `CREDENTIAL_ADMIN_ACCESS_REQUIRED` — The caller can reach the workspace but cannot administer this credential.\n- `MCP_SERVER_URL_NOT_ALLOWED` — The supplied MCP server URL is outside the allowed domains or resolves to an internal address."
|
||||
"description": "Structured error details. On a `403` whose cause a caller can act on, this carries a `code` from a closed set:\n- `INSUFFICIENT_WORKSPACE_ROLE` — The caller has access to the workspace but its role is below the one this operation requires.\n- `PERSONAL_API_KEYS_DISABLED` — The workspace's organization does not allow personal API keys. Use a workspace API key.\n- `WORKSPACE_KEY_OPERATION_NOT_PERMITTED` — This operation is not available to a workspace-scoped API key. Use a personal API key.\n- `PRINCIPAL_KIND_NOT_PERMITTED` — This operation does not accept the caller’s kind of API key.\n- `ORGANIZATION_MEMBERSHIP_REQUIRED` — The caller is not a member of the organization it named.\n- `ORGANIZATION_ADMIN_REQUIRED` — The caller is a member of the organization but not an admin or owner.\n- `ENTERPRISE_PLAN_REQUIRED` — The organization has no active enterprise subscription.\n- `ORGANIZATION_PLAN_REQUIRED` — The organization has no active organization subscription (Pro for Teams, Max for Teams, or Enterprise).\n- `AUDIT_LOGS_DISABLED` — Audit logging is not enabled for this deployment.\n- `SKILL_EDITOR_ACCESS_REQUIRED` — The caller can write in the workspace but is not an editor of this skill.\n- `SECRET_ADMIN_ACCESS_REQUIRED` — The caller can write in the workspace but is not an admin of this secret. Ask a workspace admin, or someone holding admin on the secret, to grant access or set the value.\n- `WORKSPACE_RESOURCE_LIMIT_REACHED` — The workspace already holds the maximum number of resources of this kind. Delete one, or contact Sim to raise the limit; the message names the ceiling.\n- `PUBLIC_SHARING_NOT_ALLOWED` — The workspace's organization does not permit sharing this resource publicly. An organization admin controls the policy.\n- `CREDENTIAL_ADMIN_ACCESS_REQUIRED` — The caller can reach the workspace but cannot administer this credential.\n- `MCP_SERVER_URL_NOT_ALLOWED` — The supplied MCP server URL is outside the allowed domains or resolves to an internal address.\n- `WORKSPACE_PLAN_CAPABILITY_REQUIRED` — The workspace's plan does not include a capability this request depends on. The message names the capability; upgrading the workspace's plan is the remedy.\n- `CHAT_AUTH_MODE_NOT_PERMITTED` — The workspace's permission group does not allow the chat authentication mode the request selected. A mode already saved on the deployment may still be re-saved; changing to a disallowed one cannot.\n- `CONNECTOR_MANAGED_RESOURCE_READ_ONLY` — This resource is managed by a knowledge base connector and cannot be edited directly. Change it at the source and re-sync, or exclude the document from the connector."
|
||||
}
|
||||
},
|
||||
"required": ["code", "message"],
|
||||
|
||||
@@ -264,6 +264,9 @@
|
||||
"413": {
|
||||
"$ref": "#/components/responses/PayloadTooLarge"
|
||||
},
|
||||
"415": {
|
||||
"$ref": "#/components/responses/UnsupportedMediaType"
|
||||
},
|
||||
"429": {
|
||||
"$ref": "#/components/responses/RateLimited"
|
||||
},
|
||||
@@ -330,6 +333,9 @@
|
||||
"413": {
|
||||
"$ref": "#/components/responses/PayloadTooLarge"
|
||||
},
|
||||
"415": {
|
||||
"$ref": "#/components/responses/UnsupportedMediaType"
|
||||
},
|
||||
"429": {
|
||||
"$ref": "#/components/responses/RateLimited"
|
||||
},
|
||||
@@ -343,6 +349,92 @@
|
||||
}
|
||||
},
|
||||
"/api/v2/files/uploads/{uploadId}": {
|
||||
"get": {
|
||||
"operationId": "getFileUpload",
|
||||
"summary": "Get File Upload",
|
||||
"description": "Read an upload session's current state — whether it is still accepting bytes, has finalized into a file, or has failed. Use it to decide whether an interrupted transfer can be resumed or should be abandoned. Like every other upload control leg it requires the signed upload token, and is re-authorized against the workspace on each call.",
|
||||
"tags": ["Files"],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "uploadId",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"description": "Upload session identifier.",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"description": "Upload session identifier."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "workspaceId",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"description": "Workspace that owns the upload session.",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 128,
|
||||
"description": "Workspace that owns the upload session."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "upload-token",
|
||||
"in": "header",
|
||||
"required": true,
|
||||
"description": "Signed upload control token returned when the upload session was created.",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"description": "Signed upload control token returned when the upload session was created."
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Current upload-session state.",
|
||||
"headers": {
|
||||
"X-RateLimit-Limit": {
|
||||
"$ref": "#/components/headers/X-RateLimit-Limit"
|
||||
},
|
||||
"X-RateLimit-Remaining": {
|
||||
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
||||
},
|
||||
"X-RateLimit-Reset": {
|
||||
"$ref": "#/components/headers/X-RateLimit-Reset"
|
||||
}
|
||||
},
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/FileUploadResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"$ref": "#/components/responses/BadRequest"
|
||||
},
|
||||
"401": {
|
||||
"$ref": "#/components/responses/Unauthorized"
|
||||
},
|
||||
"403": {
|
||||
"$ref": "#/components/responses/Forbidden"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/components/responses/NotFound"
|
||||
},
|
||||
"429": {
|
||||
"$ref": "#/components/responses/RateLimited"
|
||||
},
|
||||
"500": {
|
||||
"$ref": "#/components/responses/InternalError"
|
||||
},
|
||||
"503": {
|
||||
"$ref": "#/components/responses/ServiceUnavailable"
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"operationId": "abortFileUpload",
|
||||
"summary": "Abort File Upload",
|
||||
@@ -526,6 +618,9 @@
|
||||
"413": {
|
||||
"$ref": "#/components/responses/PayloadTooLarge"
|
||||
},
|
||||
"415": {
|
||||
"$ref": "#/components/responses/UnsupportedMediaType"
|
||||
},
|
||||
"429": {
|
||||
"$ref": "#/components/responses/RateLimited"
|
||||
},
|
||||
@@ -629,6 +724,286 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v2/files/{fileId}/text": {
|
||||
"get": {
|
||||
"operationId": "readFileText",
|
||||
"summary": "Read File Text",
|
||||
"description": "Return a file's text content, parsed out of the stored bytes. This reads the file; it writes nothing — `POST /api/v2/files/{fileId}/unzip` is the endpoint that unzips an archive into the workspace. Answers `400` for a type no parser supports, naming the raw-bytes download as the escape hatch, and `413` for a file above the extraction ceiling. A generated document is extracted from its compiled artifact rather than its generation source, so one still compiling answers `409` and is worth retrying. **`degraded: true` means text extraction did not fully succeed and the returned text may be incomplete or synthesized from the file's raw bytes. Do not treat it as authoritative content.** The legacy `.doc` and `.ppt` parsers deliberately return best-effort content rather than failing, so this flag — not an error status — is how a partial extraction is reported. `truncated` separately reports that a parser limit stopped extraction early.",
|
||||
"tags": ["Files"],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "fileId",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"description": "File identifier.",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 128,
|
||||
"pattern": "^[A-Za-z0-9_-]+$",
|
||||
"description": "File identifier."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "workspaceId",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"description": "Workspace that owns the file.",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 128,
|
||||
"description": "Workspace that owns the file."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "maxBytes",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"description": "Optional ceiling on the source bytes fed to the parser, lowering but never raising the server limit.",
|
||||
"schema": {
|
||||
"description": "Optional ceiling on the source bytes fed to the parser, lowering but never raising the server limit.",
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 26214400
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The extracted text and its extraction-quality flags.",
|
||||
"headers": {
|
||||
"X-RateLimit-Limit": {
|
||||
"$ref": "#/components/headers/X-RateLimit-Limit"
|
||||
},
|
||||
"X-RateLimit-Remaining": {
|
||||
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
||||
},
|
||||
"X-RateLimit-Reset": {
|
||||
"$ref": "#/components/headers/X-RateLimit-Reset"
|
||||
}
|
||||
},
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/FileTextResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"$ref": "#/components/responses/BadRequest"
|
||||
},
|
||||
"401": {
|
||||
"$ref": "#/components/responses/Unauthorized"
|
||||
},
|
||||
"403": {
|
||||
"$ref": "#/components/responses/Forbidden"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/components/responses/NotFound"
|
||||
},
|
||||
"409": {
|
||||
"$ref": "#/components/responses/Conflict"
|
||||
},
|
||||
"413": {
|
||||
"$ref": "#/components/responses/PayloadTooLarge"
|
||||
},
|
||||
"429": {
|
||||
"$ref": "#/components/responses/RateLimited"
|
||||
},
|
||||
"500": {
|
||||
"$ref": "#/components/responses/InternalError"
|
||||
},
|
||||
"503": {
|
||||
"$ref": "#/components/responses/ServiceUnavailable"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v2/files/bulk-download": {
|
||||
"get": {
|
||||
"operationId": "bulkDownloadFiles",
|
||||
"summary": "Bulk Download Files",
|
||||
"description": "Stream a selection of workspace files as one zip. Select files by id and folders by path, each as one comma-separated parameter; a folder expands to all its descendants, and a path matching no folder is rejected rather than ignored. Each parameter accepts at most 100 entries — the same ceiling the resolved selection is held to — and the resolved file count and total bytes are checked again, so an over-broad selection answers `400` rather than streaming indefinitely. Downloading records an audit event, so it is not a safe read. A `HEAD` skips the effect but is authorized exactly as the `GET` is, so it answers `400`, `401`, `403`, or `404` wherever the `GET` would and an empty `200` otherwise. Skipping the effect means skipping the read that produces the payload, so that `200` carries none of the response headers documented below — it answers whether the `GET` would be allowed, not what the `GET` would return. In particular a `HEAD` does not report `Content-Length`, so it cannot be used to size a download in advance; read the size from the file resource instead.",
|
||||
"tags": ["Files"],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "workspaceId",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"description": "Workspace containing the selection.",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 128,
|
||||
"description": "Workspace containing the selection."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "fileIds",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"description": "File identifiers to include, comma-separated. At most 100 entries.",
|
||||
"schema": {
|
||||
"description": "File identifiers to include, comma-separated. At most 100 entries.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "folderPaths",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"description": "Folder paths to include with all their descendants, comma-separated. At most 100 entries, and the files they resolve to count against the same 100-file download ceiling. A path that matches no folder is rejected rather than ignored.",
|
||||
"schema": {
|
||||
"description": "Folder paths to include with all their descendants, comma-separated. At most 100 entries, and the files they resolve to count against the same 100-file download ceiling. A path that matches no folder is rejected rather than ignored.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The selected files as a zip archive.",
|
||||
"headers": {
|
||||
"Content-Type": {
|
||||
"$ref": "#/components/headers/Content-Type"
|
||||
},
|
||||
"Content-Disposition": {
|
||||
"$ref": "#/components/headers/Content-Disposition"
|
||||
},
|
||||
"X-RateLimit-Limit": {
|
||||
"$ref": "#/components/headers/X-RateLimit-Limit"
|
||||
},
|
||||
"X-RateLimit-Remaining": {
|
||||
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
||||
},
|
||||
"X-RateLimit-Reset": {
|
||||
"$ref": "#/components/headers/X-RateLimit-Reset"
|
||||
}
|
||||
},
|
||||
"content": {
|
||||
"application/zip": {
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"format": "binary"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"$ref": "#/components/responses/BadRequest"
|
||||
},
|
||||
"401": {
|
||||
"$ref": "#/components/responses/Unauthorized"
|
||||
},
|
||||
"403": {
|
||||
"$ref": "#/components/responses/Forbidden"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/components/responses/NotFound"
|
||||
},
|
||||
"409": {
|
||||
"$ref": "#/components/responses/Conflict"
|
||||
},
|
||||
"429": {
|
||||
"$ref": "#/components/responses/RateLimited"
|
||||
},
|
||||
"500": {
|
||||
"$ref": "#/components/responses/InternalError"
|
||||
},
|
||||
"503": {
|
||||
"$ref": "#/components/responses/ServiceUnavailable"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v2/files/{fileId}/unzip": {
|
||||
"post": {
|
||||
"operationId": "unzipFile",
|
||||
"summary": "Unzip File",
|
||||
"description": "Unzip a `.zip` archive into a new folder beside it and answer counts plus the destination path. This writes new workspace files; it does not read anything out of the archive into the response — `GET /api/v2/files/{fileId}/text` is the endpoint that returns a file's text. The unpacked files are deliberately not returned — a large archive would materialize thousands of objects into one response — so page `GET /api/v2/files?folderPath=...` for the contents. Unzipping is slow: an archive near the size ceiling can run for minutes. Only one unzip of a given archive runs at a time; a concurrent attempt answers `409`. Archives past the size ceiling, and runs that outrun their time budget, answer `413`.",
|
||||
"tags": ["Files"],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "fileId",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"description": "File identifier.",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 128,
|
||||
"pattern": "^[A-Za-z0-9_-]+$",
|
||||
"description": "File identifier."
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"description": "Workspace scope for the archive.",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UnzipFileBody"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Counts and destination folder for the unpacked archive.",
|
||||
"headers": {
|
||||
"X-RateLimit-Limit": {
|
||||
"$ref": "#/components/headers/X-RateLimit-Limit"
|
||||
},
|
||||
"X-RateLimit-Remaining": {
|
||||
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
||||
},
|
||||
"X-RateLimit-Reset": {
|
||||
"$ref": "#/components/headers/X-RateLimit-Reset"
|
||||
}
|
||||
},
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/FileUnzipResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"$ref": "#/components/responses/BadRequest"
|
||||
},
|
||||
"401": {
|
||||
"$ref": "#/components/responses/Unauthorized"
|
||||
},
|
||||
"403": {
|
||||
"$ref": "#/components/responses/Forbidden"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/components/responses/NotFound"
|
||||
},
|
||||
"409": {
|
||||
"$ref": "#/components/responses/Conflict"
|
||||
},
|
||||
"413": {
|
||||
"$ref": "#/components/responses/PayloadTooLarge"
|
||||
},
|
||||
"415": {
|
||||
"$ref": "#/components/responses/UnsupportedMediaType"
|
||||
},
|
||||
"429": {
|
||||
"$ref": "#/components/responses/RateLimited"
|
||||
},
|
||||
"500": {
|
||||
"$ref": "#/components/responses/InternalError"
|
||||
},
|
||||
"503": {
|
||||
"$ref": "#/components/responses/ServiceUnavailable"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v2/files/{fileId}": {
|
||||
"get": {
|
||||
"operationId": "downloadFile",
|
||||
@@ -871,6 +1246,9 @@
|
||||
"413": {
|
||||
"$ref": "#/components/responses/PayloadTooLarge"
|
||||
},
|
||||
"415": {
|
||||
"$ref": "#/components/responses/UnsupportedMediaType"
|
||||
},
|
||||
"429": {
|
||||
"$ref": "#/components/responses/RateLimited"
|
||||
},
|
||||
@@ -955,6 +1333,9 @@
|
||||
"413": {
|
||||
"$ref": "#/components/responses/PayloadTooLarge"
|
||||
},
|
||||
"415": {
|
||||
"$ref": "#/components/responses/UnsupportedMediaType"
|
||||
},
|
||||
"429": {
|
||||
"$ref": "#/components/responses/RateLimited"
|
||||
},
|
||||
@@ -1232,7 +1613,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v2/audit-logs/{id}": {
|
||||
"/api/v2/audit-logs/{auditLogId}": {
|
||||
"get": {
|
||||
"operationId": "getAuditLog",
|
||||
"summary": "Get Audit Log",
|
||||
@@ -1240,7 +1621,7 @@
|
||||
"tags": ["Audit Logs"],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"name": "auditLogId",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"description": "Audit-log entry identifier.",
|
||||
@@ -1365,6 +1746,9 @@
|
||||
"413": {
|
||||
"$ref": "#/components/responses/PayloadTooLarge"
|
||||
},
|
||||
"415": {
|
||||
"$ref": "#/components/responses/UnsupportedMediaType"
|
||||
},
|
||||
"429": {
|
||||
"$ref": "#/components/responses/RateLimited"
|
||||
},
|
||||
@@ -1523,6 +1907,9 @@
|
||||
"413": {
|
||||
"$ref": "#/components/responses/PayloadTooLarge"
|
||||
},
|
||||
"415": {
|
||||
"$ref": "#/components/responses/UnsupportedMediaType"
|
||||
},
|
||||
"429": {
|
||||
"$ref": "#/components/responses/RateLimited"
|
||||
},
|
||||
@@ -1604,6 +1991,9 @@
|
||||
"413": {
|
||||
"$ref": "#/components/responses/PayloadTooLarge"
|
||||
},
|
||||
"415": {
|
||||
"$ref": "#/components/responses/UnsupportedMediaType"
|
||||
},
|
||||
"429": {
|
||||
"$ref": "#/components/responses/RateLimited"
|
||||
},
|
||||
@@ -1620,7 +2010,7 @@
|
||||
"post": {
|
||||
"operationId": "bulkDeleteFiles",
|
||||
"summary": "Delete Files",
|
||||
"description": "Delete up to 1,000 workspace files in one operation.",
|
||||
"description": "Delete up to 1,000 workspace files in one operation. This is the same soft delete as `DELETE /api/v2/files/{fileId}`: files are archived, not erased, and `POST /api/v2/files/{fileId}/restore` reverses each one.",
|
||||
"tags": ["Files"],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
@@ -1667,12 +2057,12 @@
|
||||
"404": {
|
||||
"$ref": "#/components/responses/NotFound"
|
||||
},
|
||||
"409": {
|
||||
"$ref": "#/components/responses/Conflict"
|
||||
},
|
||||
"413": {
|
||||
"$ref": "#/components/responses/PayloadTooLarge"
|
||||
},
|
||||
"415": {
|
||||
"$ref": "#/components/responses/UnsupportedMediaType"
|
||||
},
|
||||
"429": {
|
||||
"$ref": "#/components/responses/RateLimited"
|
||||
},
|
||||
@@ -1689,7 +2079,7 @@
|
||||
"get": {
|
||||
"operationId": "listFilesFolders",
|
||||
"summary": "List Folders",
|
||||
"description": "List workspace file folders with optional parent-path filtering and sorting. The bounded set is returned in one page; `nextCursor` is always null.",
|
||||
"description": "List workspace file folders with optional parent-path filtering and sorting. Pass `scope=archived` to list folders a recursive `DELETE` soft-deleted, which is how a caller finds a path to hand to `POST /api/v2/files/folders/restore`. The bounded set is returned in one page; `nextCursor` is always null.",
|
||||
"tags": ["Files"],
|
||||
"parameters": [
|
||||
{
|
||||
@@ -1749,6 +2139,18 @@
|
||||
"type": "string",
|
||||
"enum": ["asc", "desc"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "scope",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"description": "Which lifecycle set to list: `active` (default) returns live folders only; `archived` returns folders a recursive `DELETE` soft-deleted, which is how a caller finds a path to hand to `POST /api/v2/files/folders/restore`. Authorization is identical for both.",
|
||||
"schema": {
|
||||
"default": "active",
|
||||
"description": "Which lifecycle set to list: `active` (default) returns live folders only; `archived` returns folders a recursive `DELETE` soft-deleted, which is how a caller finds a path to hand to `POST /api/v2/files/folders/restore`. Authorization is identical for both.",
|
||||
"type": "string",
|
||||
"enum": ["active", "archived"]
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -1852,6 +2254,9 @@
|
||||
"413": {
|
||||
"$ref": "#/components/responses/PayloadTooLarge"
|
||||
},
|
||||
"415": {
|
||||
"$ref": "#/components/responses/UnsupportedMediaType"
|
||||
},
|
||||
"429": {
|
||||
"$ref": "#/components/responses/RateLimited"
|
||||
},
|
||||
@@ -1919,6 +2324,9 @@
|
||||
"413": {
|
||||
"$ref": "#/components/responses/PayloadTooLarge"
|
||||
},
|
||||
"415": {
|
||||
"$ref": "#/components/responses/UnsupportedMediaType"
|
||||
},
|
||||
"429": {
|
||||
"$ref": "#/components/responses/RateLimited"
|
||||
},
|
||||
@@ -2032,6 +2440,78 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v2/files/folders/restore": {
|
||||
"post": {
|
||||
"operationId": "restoreFilesFolder",
|
||||
"summary": "Restore Folder",
|
||||
"description": "Restore a soft-deleted folder and everything archived with it. `DELETE /api/v2/files/folders` archives recursively, so this is what makes a recursive delete recoverable: without it the archived files stay visible through `GET /api/v2/files?scope=archived` but the folder structure cannot be rebuilt. Address the folder by the path reported by `GET /api/v2/files/folders?scope=archived`; a path that is not archived answers `404`.",
|
||||
"tags": ["Files"],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"description": "Workspace scope and archived folder path.",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/RestoreFileFolderRequest"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "The restored folder and what it brought back.",
|
||||
"headers": {
|
||||
"X-RateLimit-Limit": {
|
||||
"$ref": "#/components/headers/X-RateLimit-Limit"
|
||||
},
|
||||
"X-RateLimit-Remaining": {
|
||||
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
||||
},
|
||||
"X-RateLimit-Reset": {
|
||||
"$ref": "#/components/headers/X-RateLimit-Reset"
|
||||
}
|
||||
},
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/FileFolderRestoreResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"$ref": "#/components/responses/BadRequest"
|
||||
},
|
||||
"401": {
|
||||
"$ref": "#/components/responses/Unauthorized"
|
||||
},
|
||||
"403": {
|
||||
"$ref": "#/components/responses/Forbidden"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/components/responses/NotFound"
|
||||
},
|
||||
"409": {
|
||||
"$ref": "#/components/responses/Conflict"
|
||||
},
|
||||
"413": {
|
||||
"$ref": "#/components/responses/PayloadTooLarge"
|
||||
},
|
||||
"415": {
|
||||
"$ref": "#/components/responses/UnsupportedMediaType"
|
||||
},
|
||||
"429": {
|
||||
"$ref": "#/components/responses/RateLimited"
|
||||
},
|
||||
"500": {
|
||||
"$ref": "#/components/responses/InternalError"
|
||||
},
|
||||
"503": {
|
||||
"$ref": "#/components/responses/ServiceUnavailable"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
@@ -2219,6 +2699,22 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"UnsupportedMediaType": {
|
||||
"description": "The request uses an unsupported media type.",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/V2Error"
|
||||
},
|
||||
"example": {
|
||||
"error": {
|
||||
"code": "UNSUPPORTED_MEDIA_TYPE",
|
||||
"message": "Request body must be sent as application/json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"RateLimited": {
|
||||
"description": "The caller exceeded the request rate limit.",
|
||||
"headers": {
|
||||
@@ -2297,7 +2793,7 @@
|
||||
"description": "Human-readable explanation of the error."
|
||||
},
|
||||
"details": {
|
||||
"description": "Structured error details. On a `403` whose cause a caller can act on, this carries a `code` from a closed set:\n- `INSUFFICIENT_WORKSPACE_ROLE` — The caller has access to the workspace but its role is below the one this operation requires.\n- `PERSONAL_API_KEYS_DISABLED` — The workspace's organization does not allow personal API keys. Use a workspace API key.\n- `WORKSPACE_KEY_OPERATION_NOT_PERMITTED` — This operation is not available to a workspace-scoped API key. Use a personal API key.\n- `PRINCIPAL_KIND_NOT_PERMITTED` — This operation does not accept the caller’s kind of API key.\n- `ORGANIZATION_MEMBERSHIP_REQUIRED` — The caller is not a member of the organization it named.\n- `ORGANIZATION_ADMIN_REQUIRED` — The caller is a member of the organization but not an admin or owner.\n- `ENTERPRISE_PLAN_REQUIRED` — The organization has no active enterprise subscription.\n- `ORGANIZATION_PLAN_REQUIRED` — The organization has no active organization subscription (Pro for Teams, Max for Teams, or Enterprise).\n- `AUDIT_LOGS_DISABLED` — Audit logging is not enabled for this deployment.\n- `SKILL_EDITOR_ACCESS_REQUIRED` — The caller can write in the workspace but is not an editor of this skill.\n- `SECRET_ADMIN_ACCESS_REQUIRED` — The caller can write in the workspace but is not an admin of this secret. Ask a workspace admin, or someone holding admin on the secret, to grant access or set the value.\n- `WORKSPACE_RESOURCE_LIMIT_REACHED` — The workspace already holds the maximum number of resources of this kind. Delete one, or contact Sim to raise the limit; the message names the ceiling.\n- `PUBLIC_SHARING_NOT_ALLOWED` — The workspace's organization does not permit sharing this resource publicly. An organization admin controls the policy.\n- `CREDENTIAL_ADMIN_ACCESS_REQUIRED` — The caller can reach the workspace but cannot administer this credential.\n- `MCP_SERVER_URL_NOT_ALLOWED` — The supplied MCP server URL is outside the allowed domains or resolves to an internal address."
|
||||
"description": "Structured error details. On a `403` whose cause a caller can act on, this carries a `code` from a closed set:\n- `INSUFFICIENT_WORKSPACE_ROLE` — The caller has access to the workspace but its role is below the one this operation requires.\n- `PERSONAL_API_KEYS_DISABLED` — The workspace's organization does not allow personal API keys. Use a workspace API key.\n- `WORKSPACE_KEY_OPERATION_NOT_PERMITTED` — This operation is not available to a workspace-scoped API key. Use a personal API key.\n- `PRINCIPAL_KIND_NOT_PERMITTED` — This operation does not accept the caller’s kind of API key.\n- `ORGANIZATION_MEMBERSHIP_REQUIRED` — The caller is not a member of the organization it named.\n- `ORGANIZATION_ADMIN_REQUIRED` — The caller is a member of the organization but not an admin or owner.\n- `ENTERPRISE_PLAN_REQUIRED` — The organization has no active enterprise subscription.\n- `ORGANIZATION_PLAN_REQUIRED` — The organization has no active organization subscription (Pro for Teams, Max for Teams, or Enterprise).\n- `AUDIT_LOGS_DISABLED` — Audit logging is not enabled for this deployment.\n- `SKILL_EDITOR_ACCESS_REQUIRED` — The caller can write in the workspace but is not an editor of this skill.\n- `SECRET_ADMIN_ACCESS_REQUIRED` — The caller can write in the workspace but is not an admin of this secret. Ask a workspace admin, or someone holding admin on the secret, to grant access or set the value.\n- `WORKSPACE_RESOURCE_LIMIT_REACHED` — The workspace already holds the maximum number of resources of this kind. Delete one, or contact Sim to raise the limit; the message names the ceiling.\n- `PUBLIC_SHARING_NOT_ALLOWED` — The workspace's organization does not permit sharing this resource publicly. An organization admin controls the policy.\n- `CREDENTIAL_ADMIN_ACCESS_REQUIRED` — The caller can reach the workspace but cannot administer this credential.\n- `MCP_SERVER_URL_NOT_ALLOWED` — The supplied MCP server URL is outside the allowed domains or resolves to an internal address.\n- `WORKSPACE_PLAN_CAPABILITY_REQUIRED` — The workspace's plan does not include a capability this request depends on. The message names the capability; upgrading the workspace's plan is the remedy.\n- `CHAT_AUTH_MODE_NOT_PERMITTED` — The workspace's permission group does not allow the chat authentication mode the request selected. A mode already saved on the deployment may still be re-saved; changing to a disallowed one cannot.\n- `CONNECTOR_MANAGED_RESOURCE_READ_ONLY` — This resource is managed by a knowledge base connector and cannot be edited directly. Change it at the source and re-sync, or exclude the document from the connector."
|
||||
}
|
||||
},
|
||||
"required": ["code", "message"],
|
||||
@@ -2332,6 +2828,11 @@
|
||||
"description": "Unique file identifier.",
|
||||
"examples": ["wf_V1StGXR8z5jdHi6BmyT91"]
|
||||
},
|
||||
"webUrl": {
|
||||
"type": "string",
|
||||
"format": "uri",
|
||||
"description": "Canonical absolute URL for opening this resource in the Sim web application."
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Original file name.",
|
||||
@@ -2394,6 +2895,7 @@
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"webUrl",
|
||||
"name",
|
||||
"size",
|
||||
"type",
|
||||
@@ -2439,6 +2941,7 @@
|
||||
"data": [
|
||||
{
|
||||
"id": "wf_V1StGXR8z5jdHi6BmyT91",
|
||||
"webUrl": "https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/files/wf_V1StGXR8z5jdHi6BmyT91",
|
||||
"name": "data.csv",
|
||||
"size": 1024,
|
||||
"type": "text/csv",
|
||||
@@ -2470,6 +2973,7 @@
|
||||
{
|
||||
"data": {
|
||||
"id": "wf_V1StGXR8z5jdHi6BmyT91",
|
||||
"webUrl": "https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/files/wf_V1StGXR8z5jdHi6BmyT91",
|
||||
"name": "data.csv",
|
||||
"size": 1024,
|
||||
"type": "text/csv",
|
||||
@@ -2606,7 +3110,7 @@
|
||||
"url": {
|
||||
"type": "string",
|
||||
"format": "uri",
|
||||
"description": "Signed URL to which the file bytes are uploaded. Send the bytes with `PUT` to this URL, including exactly the headers in `headers` and nothing that alters the body. Success is `204` with an empty body. A failure is the same `{ \"error\": { \"code\", \"message\" } }` envelope as every other v2 response: `400` when the body does not match the size or content type the session was created for, `403` when the token is invalid, expired, or belongs to another session, and `409` when the session is no longer accepting bytes. The URL is signed and self-describing — construct it from this field only, never by hand."
|
||||
"description": "Signed URL to which the file bytes are uploaded. Send the bytes with `PUT` to this URL, including exactly the headers in `headers` and nothing that alters the body. The URL is signed and self-describing — construct it from this field only, never by hand.\n\n**Where this URL points depends on the deployment, and so does what answers you.** When Sim stores objects itself the URL is Sim's own data plane: success is `204` with an empty body, and a failure is the same `{ \"error\": { \"code\", \"message\" } }` envelope as every other v2 response — `400` when the body does not match the size or content type the session was created for, `403` when the token is invalid, expired, or belongs to another session, and `409` when the session is no longer accepting bytes. When object storage is configured — S3, Google Cloud Storage, or Azure Blob — the URL is that provider's own presigned URL, and the provider answers directly: treat **any `2xx` as success** (S3 and GCS answer `200`, Azure `201`), and on failure expect the provider's error document, typically XML, not the v2 envelope. Do not branch on `204` and do not parse a failure as JSON."
|
||||
},
|
||||
"headers": {
|
||||
"type": "object",
|
||||
@@ -2760,7 +3264,7 @@
|
||||
"url": {
|
||||
"type": "string",
|
||||
"format": "uri",
|
||||
"description": "Signed URL for this upload part. Send the bytes with `PUT` to this URL, including exactly the headers in `headers` and nothing that alters the body. Success is `204` with an empty body. A failure is the same `{ \"error\": { \"code\", \"message\" } }` envelope as every other v2 response: `400` when the body does not match the size or content type the session was created for, `403` when the token is invalid, expired, or belongs to another session, and `409` when the session is no longer accepting bytes. The URL is signed and self-describing — construct it from this field only, never by hand."
|
||||
"description": "Signed URL for this upload part. Send the bytes with `PUT` to this URL, including exactly the headers in `headers` and nothing that alters the body. The URL is signed and self-describing — construct it from this field only, never by hand.\n\n**Where this URL points depends on the deployment, and so does what answers you.** When Sim stores objects itself the URL is Sim's own data plane: success is `204` with an empty body, and a failure is the same `{ \"error\": { \"code\", \"message\" } }` envelope as every other v2 response — `400` when the body does not match the size or content type the session was created for, `403` when the token is invalid, expired, or belongs to another session, and `409` when the session is no longer accepting bytes. When object storage is configured — S3, Google Cloud Storage, or Azure Blob — the URL is that provider's own presigned URL, and the provider answers directly: treat **any `2xx` as success** (S3 and GCS answer `200`, Azure `201`), and on failure expect the provider's error document, typically XML, not the v2 envelope. Do not branch on `204` and do not parse a failure as JSON.\n\nYou do not need to retain the `ETag` each part upload returns. Unlike a raw S3 multipart flow, completion takes no request body: Sim lists the uploaded parts from the provider itself and reads their entity tags there, so `POST .../complete` only has to happen after every part has been sent."
|
||||
},
|
||||
"headers": {
|
||||
"type": "object",
|
||||
@@ -2839,6 +3343,143 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"V2FileText": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"fileId": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 128,
|
||||
"pattern": "^[A-Za-z0-9_-]+$",
|
||||
"description": "File the text was extracted from."
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "File name, including its extension."
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "Stored MIME type of the source file."
|
||||
},
|
||||
"text": {
|
||||
"type": "string",
|
||||
"description": "Extracted text."
|
||||
},
|
||||
"truncated": {
|
||||
"type": "boolean",
|
||||
"description": "True when a parser limit stopped extraction before the input was exhausted."
|
||||
},
|
||||
"degraded": {
|
||||
"type": "boolean",
|
||||
"description": "True when text extraction did not fully succeed and `text` may be incomplete or synthesized from the raw bytes rather than read from the document. Never treat degraded text as authoritative content."
|
||||
},
|
||||
"degradedReason": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"description": "Why extraction degraded, or null when it did not."
|
||||
},
|
||||
"charCount": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 9007199254740991,
|
||||
"description": "Length of `text` in characters."
|
||||
},
|
||||
"byteCount": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 9007199254740991,
|
||||
"description": "Source bytes read from storage before extraction."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"fileId",
|
||||
"name",
|
||||
"type",
|
||||
"text",
|
||||
"truncated",
|
||||
"degraded",
|
||||
"degradedReason",
|
||||
"charCount",
|
||||
"byteCount"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"title": "Extracted file text",
|
||||
"description": "Text extracted from a workspace file, with extraction-quality flags."
|
||||
},
|
||||
"FileTextResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"description": "Response data.",
|
||||
"$ref": "#/components/schemas/V2FileText"
|
||||
}
|
||||
},
|
||||
"required": ["data"],
|
||||
"additionalProperties": false,
|
||||
"title": "File text response",
|
||||
"description": "Text extracted from a workspace file."
|
||||
},
|
||||
"V2FileUnzipResult": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"folderPath": {
|
||||
"type": "string",
|
||||
"title": "Folder path",
|
||||
"description": "Canonical path of the folder the archive was unpacked into. May differ from the archive name when a sibling folder already claimed it.",
|
||||
"maxLength": 4096
|
||||
},
|
||||
"extractedFileCount": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 9007199254740991,
|
||||
"description": "Number of files written into the destination folder."
|
||||
},
|
||||
"skippedFileCount": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 9007199254740991,
|
||||
"description": "Number of archive entries skipped as unsafe, empty, or noise."
|
||||
}
|
||||
},
|
||||
"required": ["folderPath", "extractedFileCount", "skippedFileCount"],
|
||||
"additionalProperties": false,
|
||||
"title": "Unzip result",
|
||||
"description": "Outcome of unzipping a workspace archive into a folder."
|
||||
},
|
||||
"FileUnzipResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"description": "Response data.",
|
||||
"$ref": "#/components/schemas/V2FileUnzipResult"
|
||||
}
|
||||
},
|
||||
"required": ["data"],
|
||||
"additionalProperties": false,
|
||||
"title": "Unzip file response",
|
||||
"description": "Counts and destination folder for the unpacked archive."
|
||||
},
|
||||
"UnzipFileBody": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"workspaceId": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 128,
|
||||
"description": "Workspace that owns the archive."
|
||||
}
|
||||
},
|
||||
"required": ["workspaceId"],
|
||||
"additionalProperties": false,
|
||||
"title": "Unzip file body",
|
||||
"description": "Workspace scope for the archive."
|
||||
},
|
||||
"V2DeleteFileResult": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -2913,6 +3554,7 @@
|
||||
{
|
||||
"data": {
|
||||
"id": "wf_V1StGXR8z5jdHi6BmyT91",
|
||||
"webUrl": "https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/files/wf_V1StGXR8z5jdHi6BmyT91",
|
||||
"name": "data_restored.csv",
|
||||
"size": 1024,
|
||||
"type": "text/csv",
|
||||
@@ -3018,6 +3660,11 @@
|
||||
"description": "Unique file identifier.",
|
||||
"examples": ["wf_V1StGXR8z5jdHi6BmyT91"]
|
||||
},
|
||||
"webUrl": {
|
||||
"type": "string",
|
||||
"format": "uri",
|
||||
"description": "Canonical absolute URL for opening this resource in the Sim web application."
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Original file name.",
|
||||
@@ -3091,6 +3738,7 @@
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"webUrl",
|
||||
"name",
|
||||
"size",
|
||||
"type",
|
||||
@@ -3122,6 +3770,7 @@
|
||||
{
|
||||
"data": {
|
||||
"id": "wf_V1StGXR8z5jdHi6BmyT91",
|
||||
"webUrl": "https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/files/wf_V1StGXR8z5jdHi6BmyT91",
|
||||
"name": "data.csv",
|
||||
"size": 1024,
|
||||
"type": "text/csv",
|
||||
@@ -3137,6 +3786,7 @@
|
||||
{
|
||||
"data": {
|
||||
"id": "wf_V1StGXR8z5jdHi6BmyT91",
|
||||
"webUrl": "https://www.sim.ai/workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/files/wf_V1StGXR8z5jdHi6BmyT91",
|
||||
"name": "data.csv",
|
||||
"size": 1024,
|
||||
"type": "text/csv",
|
||||
@@ -3223,7 +3873,7 @@
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"description": "Identifier of the affected resource."
|
||||
"description": "Identifier of the affected resource. Always null when `resourceType` is `folder`: folders are addressed by canonical path on this API, so their internal identifiers are withheld rather than published as an id no other endpoint accepts."
|
||||
},
|
||||
"resourceName": {
|
||||
"anyOf": [
|
||||
@@ -3248,7 +3898,7 @@
|
||||
"description": "Human-readable description of the action."
|
||||
},
|
||||
"metadata": {
|
||||
"description": "Arbitrary per-action JSON metadata."
|
||||
"description": "Arbitrary per-action JSON metadata. Internal folder identifiers are stripped at every nesting level, for the same reason `resourceId` is null on a folder entry."
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string",
|
||||
@@ -3718,6 +4368,77 @@
|
||||
"title": "File folder list response",
|
||||
"description": "Workspace file folders in the current page."
|
||||
},
|
||||
"V2FileFolderRestore": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"folder": {
|
||||
"description": "The restored folder.",
|
||||
"$ref": "#/components/schemas/V2Folder"
|
||||
},
|
||||
"restoredItems": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"files": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 9007199254740991,
|
||||
"description": "Files restored inside the folder tree."
|
||||
},
|
||||
"folders": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 9007199254740991,
|
||||
"description": "Folders restored, including the one addressed."
|
||||
}
|
||||
},
|
||||
"required": ["files", "folders"],
|
||||
"additionalProperties": false,
|
||||
"description": "What the restore brought back."
|
||||
}
|
||||
},
|
||||
"required": ["folder", "restoredItems"],
|
||||
"additionalProperties": false,
|
||||
"title": "Folder restore result",
|
||||
"description": "The restored folder and the counts of items it brought back."
|
||||
},
|
||||
"FileFolderRestoreResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"description": "Response data.",
|
||||
"$ref": "#/components/schemas/V2FileFolderRestore"
|
||||
}
|
||||
},
|
||||
"required": ["data"],
|
||||
"additionalProperties": false,
|
||||
"title": "Folder restore response",
|
||||
"description": "The restored folder and the counts of items it brought back."
|
||||
},
|
||||
"NonRootFolderPathInput": {
|
||||
"title": "Non-root folder path input",
|
||||
"description": "Non-root folder path. A missing leading slash is normalized before validation. Segments are percent-encoded, so a folder shown as \"New folder\" is `/New%20folder`: everything outside `A-Z a-z 0-9 - _ . ~` is escaped as uppercase hex, and only that exact encoding is accepted. A trailing slash, an empty segment, and a literal `.` or `..` segment are rejected. At most 64 segments and 4096 encoded bytes.",
|
||||
"maxLength": 4096,
|
||||
"type": "string"
|
||||
},
|
||||
"RestoreFileFolderRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"workspaceId": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 128,
|
||||
"description": "Workspace that owns the archived folder."
|
||||
},
|
||||
"path": {
|
||||
"description": "Path of the archived folder to restore, as reported by `GET /api/v2/files/folders?scope=archived`.",
|
||||
"$ref": "#/components/schemas/NonRootFolderPathInput"
|
||||
}
|
||||
},
|
||||
"required": ["workspaceId", "path"],
|
||||
"additionalProperties": false,
|
||||
"title": "Restore file folder request",
|
||||
"description": "Workspace scope and archived folder path."
|
||||
},
|
||||
"FileFolderResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -3731,12 +4452,6 @@
|
||||
"title": "File folder response",
|
||||
"description": "A single workspace file folder."
|
||||
},
|
||||
"NonRootFolderPathInput": {
|
||||
"title": "Non-root folder path input",
|
||||
"description": "Non-root folder path. A missing leading slash is normalized before validation. Segments are percent-encoded, so a folder shown as \"New folder\" is `/New%20folder`: everything outside `A-Z a-z 0-9 - _ . ~` is escaped as uppercase hex, and only that exact encoding is accepted. A trailing slash, an empty segment, and a literal `.` or `..` segment are rejected. At most 64 segments and 4096 encoded bytes.",
|
||||
"maxLength": 4096,
|
||||
"type": "string"
|
||||
},
|
||||
"CreateFileFolderRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
+2571
-146
File diff suppressed because it is too large
Load Diff
+548
-25
@@ -2,7 +2,7 @@
|
||||
"openapi": "3.1.0",
|
||||
"info": {
|
||||
"title": "Sim API v2 — Logs",
|
||||
"description": "Version 2 of the Sim REST API for listing workflow execution logs and retrieving complete diagnostic run snapshots.",
|
||||
"description": "Version 2 of the Sim REST API for workflow execution logs: listing and sorting runs with filters, retrieving complete diagnostic run snapshots, and reading bucketed execution statistics.",
|
||||
"version": "2.0.0",
|
||||
"contact": {
|
||||
"name": "Sim Support",
|
||||
@@ -36,7 +36,7 @@
|
||||
"get": {
|
||||
"operationId": "listLogs",
|
||||
"summary": "List Logs",
|
||||
"description": "List workflow execution logs for a workspace with filters, selectable detail, and opaque cursor pagination. Runs are hard-deleted once they pass the payer's log retention window, so an older run is simply absent rather than reported as removed. The window is 30 days from run start on the free plan, unbounded on Pro and Team, and set per organization on Enterprise with an optional per-workspace override.",
|
||||
"description": "List workflow execution logs for a workspace with filters, selectable detail, sorting by start time, duration, cost, or status, and opaque cursor pagination. Chat and Sim-agent job runs join the sequence with `includeJobRuns=true`, which is accepted only under `sortBy=startedAt` — their cost is stored as a document and their status is not comparable, so they cannot participate in the other orderings. Each item's `files` lists only the files the run itself produced, addressed by `downloadPath`; input attachments a caller supplied are read through the files API instead. Runs are hard-deleted once they pass the payer's log retention window, so an older run is simply absent rather than reported as removed. The window is 30 days from run start on the free plan, unbounded on Pro and Team, and set per organization on Enterprise with an optional per-workspace override. A workspace folder tree over 10,000 folders is a `413`.",
|
||||
"tags": ["Logs"],
|
||||
"parameters": [
|
||||
{
|
||||
@@ -55,20 +55,20 @@
|
||||
"name": "workflowIds",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"description": "Comma-separated workflow identifiers to include. An empty entry is rejected.",
|
||||
"description": "Comma-separated workflow identifiers to include. An empty entry is rejected. At most 200 entries.",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"description": "Comma-separated workflow identifiers to include. An empty entry is rejected."
|
||||
"description": "Comma-separated workflow identifiers to include. An empty entry is rejected. At most 200 entries."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "triggers",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"description": "Comma-separated trigger types to include. An empty entry is rejected. Values are matched exactly and are case-sensitive — every recorded trigger is lowercase, so `API` matches nothing while `api` matches. The vocabulary is open: it covers the core trigger types (`manual`, `api`, `schedule`, `chat`, `webhook`, `mcp`, `copilot`, `workflow`, `custom_block`) and the provider id of any webhook trigger (`slack`, `gmail`, `github`, …), so an unrecognized member is not rejected — it selects no runs. The literal value `all` is a sentinel that disables this filter entirely, so a list containing it returns runs of every trigger type; no real trigger type is named `all`.",
|
||||
"description": "Comma-separated trigger types to include. An empty entry is rejected. Values are matched exactly and are case-sensitive — every recorded trigger is lowercase, so `API` matches nothing while `api` matches. The vocabulary is open: it covers the core trigger types (`manual`, `api`, `schedule`, `chat`, `webhook`, `mcp`, `copilot`, `workflow`, `custom_block`) and the provider id of any webhook trigger (`slack`, `gmail`, `github`, …), so an unrecognized member is not rejected — it selects no runs. The literal value `all` is a sentinel that disables this filter entirely, so a list containing it returns runs of every trigger type; no real trigger type is named `all`. At most 100 entries.",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"description": "Comma-separated trigger types to include. An empty entry is rejected. Values are matched exactly and are case-sensitive — every recorded trigger is lowercase, so `API` matches nothing while `api` matches. The vocabulary is open: it covers the core trigger types (`manual`, `api`, `schedule`, `chat`, `webhook`, `mcp`, `copilot`, `workflow`, `custom_block`) and the provider id of any webhook trigger (`slack`, `gmail`, `github`, …), so an unrecognized member is not rejected — it selects no runs. The literal value `all` is a sentinel that disables this filter entirely, so a list containing it returns runs of every trigger type; no real trigger type is named `all`."
|
||||
"description": "Comma-separated trigger types to include. An empty entry is rejected. Values are matched exactly and are case-sensitive — every recorded trigger is lowercase, so `API` matches nothing while `api` matches. The vocabulary is open: it covers the core trigger types (`manual`, `api`, `schedule`, `chat`, `webhook`, `mcp`, `copilot`, `workflow`, `custom_block`) and the provider id of any webhook trigger (`slack`, `gmail`, `github`, …), so an unrecognized member is not rejected — it selects no runs. The literal value `all` is a sentinel that disables this filter entirely, so a list containing it returns runs of every trigger type; no real trigger type is named `all`. At most 100 entries."
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -168,12 +168,12 @@
|
||||
"name": "details",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"description": "Response detail level. `full` adds the `workflow` summary to every item. `includeTraceSpans=true` and `includeFinalOutput=true` each imply `full`, so either one adds `workflow` even when `details=basic` is sent explicitly.",
|
||||
"description": "Response detail level. `full` adds the `workflow` summary to every workflow run; a job run never carries one, whatever this is set to. `includeTraceSpans=true` and `includeFinalOutput=true` each imply `full`, so either one adds `workflow` even when `details=basic` is sent explicitly.",
|
||||
"schema": {
|
||||
"default": "basic",
|
||||
"type": "string",
|
||||
"enum": ["basic", "full"],
|
||||
"description": "Response detail level. `full` adds the `workflow` summary to every item. `includeTraceSpans=true` and `includeFinalOutput=true` each imply `full`, so either one adds `workflow` even when `details=basic` is sent explicitly."
|
||||
"description": "Response detail level. `full` adds the `workflow` summary to every workflow run; a job run never carries one, whatever this is set to. `includeTraceSpans=true` and `includeFinalOutput=true` each imply `full`, so either one adds `workflow` even when `details=basic` is sent explicitly."
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -219,15 +219,35 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "order",
|
||||
"name": "status",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"description": "Sort direction by execution start time. This list is sortable only by execution start time, so it takes `order` in place of `sortBy`/`sortOrder`, which it rejects.",
|
||||
"description": "Comma-separated execution statuses to include, from `pending` | `running` | `paused` | `redacting` | `completed` | `failed` | `cancelled`. An empty entry is rejected. ANDed with `level`, which reports severity rather than lifecycle.",
|
||||
"schema": {
|
||||
"default": "desc",
|
||||
"description": "Sort direction by execution start time. This list is sortable only by execution start time, so it takes `order` in place of `sortBy`/`sortOrder`, which it rejects.",
|
||||
"type": "string",
|
||||
"enum": ["asc", "desc"]
|
||||
"description": "Comma-separated execution statuses to include, from `pending` | `running` | `paused` | `redacting` | `completed` | `failed` | `cancelled`. An empty entry is rejected. ANDed with `level`, which reports severity rather than lifecycle."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "workflowName",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"description": "Case-insensitive substring match against the run's workflow name. Runs whose workflow has been deleted match nothing, because the name is no longer joinable.",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 200,
|
||||
"description": "Case-insensitive substring match against the run's workflow name. Runs whose workflow has been deleted match nothing, because the name is no longer joinable."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "includeJobRuns",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"description": "Whether Chat and Sim-agent job runs join the sequence alongside workflow runs. Job runs report `kind: \"job\"`, carry no `workflow` summary, and never carry a cost ledger. They are dropped entirely — not partially matched — whenever a filter they cannot answer is set (`workflowIds`, `workflowName`, `folderPaths`, `model`, or `status`), so a filter never means two different things across the union. Accepted only under `sortBy=startedAt`: job runs record cost as a document and no comparable status, so they cannot participate in the other orderings.",
|
||||
"schema": {
|
||||
"description": "Whether Chat and Sim-agent job runs join the sequence alongside workflow runs. Job runs report `kind: \"job\"`, carry no `workflow` summary, and never carry a cost ledger. They are dropped entirely — not partially matched — whenever a filter they cannot answer is set (`workflowIds`, `workflowName`, `folderPaths`, `model`, or `status`), so a filter never means two different things across the union. Accepted only under `sortBy=startedAt`: job runs record cost as a document and no comparable status, so they cannot participate in the other orderings.",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -243,14 +263,38 @@
|
||||
"description": "Exact run identifier to match."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "sortBy",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"description": "Field used to sort the result. `durationMs` and `cost` are null until a run settles; those runs order as though the value were below every recorded one, so they trail an ascending page and lead a descending one. Only `startedAt` can order Chat and Sim-agent job runs, so any other value is rejected together with `includeJobRuns=true`.",
|
||||
"schema": {
|
||||
"default": "startedAt",
|
||||
"description": "Field used to sort the result. `durationMs` and `cost` are null until a run settles; those runs order as though the value were below every recorded one, so they trail an ascending page and lead a descending one. Only `startedAt` can order Chat and Sim-agent job runs, so any other value is rejected together with `includeJobRuns=true`.",
|
||||
"type": "string",
|
||||
"enum": ["startedAt", "durationMs", "cost", "status"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "sortOrder",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"description": "Sort direction.",
|
||||
"schema": {
|
||||
"default": "desc",
|
||||
"description": "Sort direction.",
|
||||
"type": "string",
|
||||
"enum": ["asc", "desc"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "folderPaths",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"description": "Comma-separated workflow folder paths to include. A path that names no folder narrows the result to nothing, so the response is an empty page rather than an error.",
|
||||
"description": "Comma-separated workflow folder paths to include. At most 100 entries. A path covers its whole subtree, so `/prod` also selects runs in `/prod/nested`. A path that names no folder narrows the result to nothing, so the response is an empty page rather than an error.",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"description": "Comma-separated workflow folder paths to include. A path that names no folder narrows the result to nothing, so the response is an empty page rather than an error."
|
||||
"description": "Comma-separated workflow folder paths to include. At most 100 entries. A path covers its whole subtree, so `/prod` also selects runs in `/prod/nested`. A path that names no folder narrows the result to nothing, so the response is an empty page rather than an error."
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -288,6 +332,9 @@
|
||||
"404": {
|
||||
"$ref": "#/components/responses/NotFound"
|
||||
},
|
||||
"413": {
|
||||
"$ref": "#/components/responses/PayloadTooLarge"
|
||||
},
|
||||
"429": {
|
||||
"$ref": "#/components/responses/RateLimited"
|
||||
},
|
||||
@@ -304,7 +351,7 @@
|
||||
"get": {
|
||||
"operationId": "getLog",
|
||||
"summary": "Get Log",
|
||||
"description": "Retrieve the diagnostic representation of a run, including its workflow snapshot, trace spans, final output, and cost. Trace spans are pruned on their own retention schedule, so an empty `traceSpans` array does not mean the run recorded none.",
|
||||
"description": "Retrieve the diagnostic representation of a run, including its workflow snapshot, trace spans, final output, and cost. Trace spans are pruned on their own retention schedule, so an empty `traceSpans` array does not mean the run recorded none. A workspace folder tree over 10,000 folders is a `413`. Runs are hard-deleted once they pass the payer's log retention window, so an older run is simply absent rather than reported as removed. The window is 30 days from run start on the free plan, unbounded on Pro and Team, and set per organization on Enterprise with an optional per-workspace override.",
|
||||
"tags": ["Logs"],
|
||||
"parameters": [
|
||||
{
|
||||
@@ -355,6 +402,156 @@
|
||||
"404": {
|
||||
"$ref": "#/components/responses/NotFound"
|
||||
},
|
||||
"413": {
|
||||
"$ref": "#/components/responses/PayloadTooLarge"
|
||||
},
|
||||
"429": {
|
||||
"$ref": "#/components/responses/RateLimited"
|
||||
},
|
||||
"500": {
|
||||
"$ref": "#/components/responses/InternalError"
|
||||
},
|
||||
"503": {
|
||||
"$ref": "#/components/responses/ServiceUnavailable"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v2/logs/stats": {
|
||||
"get": {
|
||||
"operationId": "getLogStats",
|
||||
"summary": "Get Log Statistics",
|
||||
"description": "Bucketed run counts, success rate, error count, and mean latency for a workspace and for each of its workflows — the aggregate a caller would otherwise have to page every run to compute. The window spans the oldest matching run through the later of the newest matching run and now, divided into exactly `segmentCount` equal buckets whose width is `max(60000, floor(windowMs / segmentCount))` milliseconds. The one-minute floor is a floor on bucket width, not on the window: when it applies, the series runs past `timeBounds.end` and the trailing buckets are empty rather than the window being compressed. A folder path covers its whole subtree. Per-workflow series are capped and `workflowsTruncated` reports whether the cap applied; the workspace totals are always computed from every workflow. Runs are hard-deleted once they pass the payer's log retention window, so an older run is simply absent rather than reported as removed. The window is 30 days from run start on the free plan, unbounded on Pro and Team, and set per organization on Enterprise with an optional per-workspace override. A workspace folder tree over 10,000 folders is a `413`.",
|
||||
"tags": ["Logs"],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "workspaceId",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"description": "Workspace whose execution statistics to summarize.",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 128,
|
||||
"description": "Workspace whose execution statistics to summarize."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "workflowIds",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"description": "Comma-separated workflow identifiers to include. At most 200 entries. An empty entry is rejected.",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"description": "Comma-separated workflow identifiers to include. At most 200 entries. An empty entry is rejected."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "folderPaths",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"description": "Comma-separated workflow folder paths to include. At most 100 entries. A path covers its whole subtree. A path that names no folder narrows the result to nothing, so the response is an empty page rather than an error.",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"description": "Comma-separated workflow folder paths to include. At most 100 entries. A path covers its whole subtree. A path that names no folder narrows the result to nothing, so the response is an empty page rather than an error."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "triggers",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"description": "Comma-separated trigger types to include. An empty entry is rejected. The vocabulary is open, so an unrecognized member selects no runs; the literal `all` disables this filter.",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"description": "Comma-separated trigger types to include. An empty entry is rejected. The vocabulary is open, so an unrecognized member selects no runs; the literal `all` disables this filter."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "level",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"description": "Severity level to include.",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"enum": ["info", "error"],
|
||||
"description": "Severity level to include."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "startDate",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"description": "Only include runs started at or after this UTC ISO 8601 timestamp, e.g. `2026-08-06T00:00:00Z`. A date without a time, or a timestamp carrying a UTC offset instead of `Z`, is rejected, as is year `0000`, which names no storable instant.",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
||||
"description": "Only include runs started at or after this UTC ISO 8601 timestamp, e.g. `2026-08-06T00:00:00Z`. A date without a time, or a timestamp carrying a UTC offset instead of `Z`, is rejected, as is year `0000`, which names no storable instant."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "endDate",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"description": "Only include runs started at or before this UTC ISO 8601 timestamp, e.g. `2026-08-06T00:00:00Z`. A date without a time, or a timestamp carrying a UTC offset instead of `Z`, is rejected, as is year `0000`, which names no storable instant.",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
||||
"description": "Only include runs started at or before this UTC ISO 8601 timestamp, e.g. `2026-08-06T00:00:00Z`. A date without a time, or a timestamp carrying a UTC offset instead of `Z`, is rejected, as is year `0000`, which names no storable instant."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "segmentCount",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"description": "Number of equal time buckets to divide the window into, from 1 to 500. Exactly this many buckets are always returned. Buckets are never narrower than one minute, so on a short window the series extends past the end of the window rather than being compressed, and the trailing buckets are empty.",
|
||||
"schema": {
|
||||
"default": 72,
|
||||
"description": "Number of equal time buckets to divide the window into, from 1 to 500. Exactly this many buckets are always returned. Buckets are never narrower than one minute, so on a short window the series extends past the end of the window rather than being compressed, and the trailing buckets are empty.",
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 500
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Bucketed execution statistics for the workspace.",
|
||||
"headers": {
|
||||
"X-RateLimit-Limit": {
|
||||
"$ref": "#/components/headers/X-RateLimit-Limit"
|
||||
},
|
||||
"X-RateLimit-Remaining": {
|
||||
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
||||
},
|
||||
"X-RateLimit-Reset": {
|
||||
"$ref": "#/components/headers/X-RateLimit-Reset"
|
||||
}
|
||||
},
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/V2LogStatsResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"$ref": "#/components/responses/BadRequest"
|
||||
},
|
||||
"401": {
|
||||
"$ref": "#/components/responses/Unauthorized"
|
||||
},
|
||||
"403": {
|
||||
"$ref": "#/components/responses/Forbidden"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/components/responses/NotFound"
|
||||
},
|
||||
"413": {
|
||||
"$ref": "#/components/responses/PayloadTooLarge"
|
||||
},
|
||||
"429": {
|
||||
"$ref": "#/components/responses/RateLimited"
|
||||
},
|
||||
@@ -496,6 +693,22 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"PayloadTooLarge": {
|
||||
"description": "The request, or a resource collection it must materialize, exceeds the allowed size: an oversized request body, a generated artifact past the download ceiling, or a workspace folder tree too large to load in full.",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/V2Error"
|
||||
},
|
||||
"example": {
|
||||
"error": {
|
||||
"code": "PAYLOAD_TOO_LARGE",
|
||||
"message": "Request body is too large"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"RateLimited": {
|
||||
"description": "The caller exceeded the request rate limit.",
|
||||
"headers": {
|
||||
@@ -574,7 +787,7 @@
|
||||
"description": "Human-readable explanation of the error."
|
||||
},
|
||||
"details": {
|
||||
"description": "Structured error details. On a `403` whose cause a caller can act on, this carries a `code` from a closed set:\n- `INSUFFICIENT_WORKSPACE_ROLE` — The caller has access to the workspace but its role is below the one this operation requires.\n- `PERSONAL_API_KEYS_DISABLED` — The workspace's organization does not allow personal API keys. Use a workspace API key.\n- `WORKSPACE_KEY_OPERATION_NOT_PERMITTED` — This operation is not available to a workspace-scoped API key. Use a personal API key.\n- `PRINCIPAL_KIND_NOT_PERMITTED` — This operation does not accept the caller’s kind of API key.\n- `ORGANIZATION_MEMBERSHIP_REQUIRED` — The caller is not a member of the organization it named.\n- `ORGANIZATION_ADMIN_REQUIRED` — The caller is a member of the organization but not an admin or owner.\n- `ENTERPRISE_PLAN_REQUIRED` — The organization has no active enterprise subscription.\n- `ORGANIZATION_PLAN_REQUIRED` — The organization has no active organization subscription (Pro for Teams, Max for Teams, or Enterprise).\n- `AUDIT_LOGS_DISABLED` — Audit logging is not enabled for this deployment.\n- `SKILL_EDITOR_ACCESS_REQUIRED` — The caller can write in the workspace but is not an editor of this skill.\n- `SECRET_ADMIN_ACCESS_REQUIRED` — The caller can write in the workspace but is not an admin of this secret. Ask a workspace admin, or someone holding admin on the secret, to grant access or set the value.\n- `WORKSPACE_RESOURCE_LIMIT_REACHED` — The workspace already holds the maximum number of resources of this kind. Delete one, or contact Sim to raise the limit; the message names the ceiling.\n- `PUBLIC_SHARING_NOT_ALLOWED` — The workspace's organization does not permit sharing this resource publicly. An organization admin controls the policy.\n- `CREDENTIAL_ADMIN_ACCESS_REQUIRED` — The caller can reach the workspace but cannot administer this credential.\n- `MCP_SERVER_URL_NOT_ALLOWED` — The supplied MCP server URL is outside the allowed domains or resolves to an internal address."
|
||||
"description": "Structured error details. On a `403` whose cause a caller can act on, this carries a `code` from a closed set:\n- `INSUFFICIENT_WORKSPACE_ROLE` — The caller has access to the workspace but its role is below the one this operation requires.\n- `PERSONAL_API_KEYS_DISABLED` — The workspace's organization does not allow personal API keys. Use a workspace API key.\n- `WORKSPACE_KEY_OPERATION_NOT_PERMITTED` — This operation is not available to a workspace-scoped API key. Use a personal API key.\n- `PRINCIPAL_KIND_NOT_PERMITTED` — This operation does not accept the caller’s kind of API key.\n- `ORGANIZATION_MEMBERSHIP_REQUIRED` — The caller is not a member of the organization it named.\n- `ORGANIZATION_ADMIN_REQUIRED` — The caller is a member of the organization but not an admin or owner.\n- `ENTERPRISE_PLAN_REQUIRED` — The organization has no active enterprise subscription.\n- `ORGANIZATION_PLAN_REQUIRED` — The organization has no active organization subscription (Pro for Teams, Max for Teams, or Enterprise).\n- `AUDIT_LOGS_DISABLED` — Audit logging is not enabled for this deployment.\n- `SKILL_EDITOR_ACCESS_REQUIRED` — The caller can write in the workspace but is not an editor of this skill.\n- `SECRET_ADMIN_ACCESS_REQUIRED` — The caller can write in the workspace but is not an admin of this secret. Ask a workspace admin, or someone holding admin on the secret, to grant access or set the value.\n- `WORKSPACE_RESOURCE_LIMIT_REACHED` — The workspace already holds the maximum number of resources of this kind. Delete one, or contact Sim to raise the limit; the message names the ceiling.\n- `PUBLIC_SHARING_NOT_ALLOWED` — The workspace's organization does not permit sharing this resource publicly. An organization admin controls the policy.\n- `CREDENTIAL_ADMIN_ACCESS_REQUIRED` — The caller can reach the workspace but cannot administer this credential.\n- `MCP_SERVER_URL_NOT_ALLOWED` — The supplied MCP server URL is outside the allowed domains or resolves to an internal address.\n- `WORKSPACE_PLAN_CAPABILITY_REQUIRED` — The workspace's plan does not include a capability this request depends on. The message names the capability; upgrading the workspace's plan is the remedy.\n- `CHAT_AUTH_MODE_NOT_PERMITTED` — The workspace's permission group does not allow the chat authentication mode the request selected. A mode already saved on the deployment may still be re-saved; changing to a disallowed one cannot.\n- `CONNECTOR_MANAGED_RESOURCE_READ_ONLY` — This resource is managed by a knowledge base connector and cannot be edited directly. Change it at the source and re-sync, or exclude the document from the connector."
|
||||
}
|
||||
},
|
||||
"required": ["code", "message"],
|
||||
@@ -598,6 +811,11 @@
|
||||
"V2LogListItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"kind": {
|
||||
"type": "string",
|
||||
"enum": ["workflow", "job"],
|
||||
"description": "Whether the run executed a workflow or a Chat / Sim-agent job. Job runs appear only when `includeJobRuns=true`."
|
||||
},
|
||||
"runId": {
|
||||
"type": "string",
|
||||
"description": "Unique run identifier."
|
||||
@@ -692,21 +910,21 @@
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"description": "Cost charged for the run, or null when unavailable."
|
||||
"description": "Cost charged for the run, or null when the run has neither a recorded total nor an itemized ledger."
|
||||
},
|
||||
"files": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "Attachment metadata captured for the execution."
|
||||
"$ref": "#/components/schemas/V2LogFile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"description": "Files attached to the run, or null when none are recorded."
|
||||
"description": "Files the run produced, or null when none are recorded. Only the run's own output files appear; input attachments a caller supplied are addressed through the files API instead."
|
||||
},
|
||||
"workflow": {
|
||||
"type": "object",
|
||||
@@ -758,6 +976,7 @@
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"kind",
|
||||
"runId",
|
||||
"workflowId",
|
||||
"deploymentVersionId",
|
||||
@@ -774,6 +993,37 @@
|
||||
"title": "Execution log summary",
|
||||
"description": "Summary information for one workflow execution log."
|
||||
},
|
||||
"V2LogFile": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Identifier to address this file by on the download endpoint."
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "File name, including its extension."
|
||||
},
|
||||
"size": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 9007199254740991,
|
||||
"description": "File size in bytes."
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "MIME type recorded for the file."
|
||||
},
|
||||
"downloadPath": {
|
||||
"type": "string",
|
||||
"description": "Path to fetch this file's bytes from, relative to the API host."
|
||||
}
|
||||
},
|
||||
"required": ["id", "name", "size", "type", "downloadPath"],
|
||||
"additionalProperties": false,
|
||||
"title": "Execution log file",
|
||||
"description": "A file produced by the run this log records."
|
||||
},
|
||||
"LogTraceSpan": {
|
||||
"title": "Log trace span",
|
||||
"description": "One recursive operation span in a workflow execution trace.",
|
||||
@@ -972,6 +1222,7 @@
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"kind": "workflow",
|
||||
"runId": "e4f8d2b6-9a1c-4e3d-8b7f-5c0a2d9e6f13",
|
||||
"workflowId": "3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36",
|
||||
"deploymentVersionId": "dep_2c4e6a8b0d1f",
|
||||
@@ -984,7 +1235,15 @@
|
||||
"cost": {
|
||||
"total": 0.0032
|
||||
},
|
||||
"files": null
|
||||
"files": [
|
||||
{
|
||||
"id": "f1c3a7d0-4b52-4a8e-9f61-2d7c8b3e5a04",
|
||||
"name": "summary.pdf",
|
||||
"size": 18422,
|
||||
"type": "application/pdf",
|
||||
"downloadPath": "/api/v2/workflows/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36/runs/e4f8d2b6-9a1c-4e3d-8b7f-5c0a2d9e6f13/files/f1c3a7d0-4b52-4a8e-9f61-2d7c8b3e5a04"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"nextCursor": "eyJzdGFydGVkQXQiOiIyMDI2LTAxLTE1VDEwOjMwOjAwMFoifQ=="
|
||||
@@ -1076,14 +1335,14 @@
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"description": "Attachment metadata captured for the execution."
|
||||
"$ref": "#/components/schemas/V2LogFile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"description": "Files attached to the run, or null when none are recorded."
|
||||
"description": "Files the run produced, or null when none are recorded. Only the run's own output files appear; input attachments a caller supplied are addressed through the files API instead."
|
||||
},
|
||||
"workflow": {
|
||||
"type": "object",
|
||||
@@ -1238,9 +1497,49 @@
|
||||
"total": {
|
||||
"type": "number",
|
||||
"description": "Total execution cost in USD."
|
||||
},
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"category": {
|
||||
"type": "string",
|
||||
"enum": ["fixed", "model", "tool"],
|
||||
"description": "What the line is for: the run's base fee (`fixed`), one model's inference (`model`), or one metered tool or integration call (`tool`)."
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"description": "Human-readable name of the billed item, such as the model or tool id."
|
||||
},
|
||||
"cost": {
|
||||
"type": "number",
|
||||
"description": "Amount billed for this line, in USD."
|
||||
},
|
||||
"inputTokens": {
|
||||
"description": "Input tokens attributed to this line. Absent for lines that do not bill tokens.",
|
||||
"type": "number"
|
||||
},
|
||||
"outputTokens": {
|
||||
"description": "Output tokens attributed to this line. Absent for lines that do not bill tokens.",
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"required": ["category", "description", "cost"],
|
||||
"additionalProperties": false,
|
||||
"description": "One billed line of a run, folded across every event that billed it."
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"description": "Billed lines reconciling to `total`, or null when no itemized ledger exists for the run."
|
||||
}
|
||||
},
|
||||
"required": ["total"],
|
||||
"required": ["total", "items"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
@@ -1249,6 +1548,17 @@
|
||||
],
|
||||
"description": "Cost charged for the run, or null when unavailable."
|
||||
},
|
||||
"workflowInput": {
|
||||
"anyOf": [
|
||||
{
|
||||
"description": "Caller-supplied trigger payload for the run."
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"description": "Input the run was triggered with, or null when the run recorded none. Credential-bearing and PII-masked values are redacted the same way `finalOutput` is."
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
@@ -1272,6 +1582,7 @@
|
||||
"traceSpans",
|
||||
"finalOutput",
|
||||
"cost",
|
||||
"workflowInput",
|
||||
"createdAt"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
@@ -1323,12 +1634,224 @@
|
||||
"result": "Hello, world!"
|
||||
},
|
||||
"cost": {
|
||||
"total": 0.0032
|
||||
"total": 0.0032,
|
||||
"items": [
|
||||
{
|
||||
"category": "fixed",
|
||||
"description": "Base execution charge",
|
||||
"cost": 0.001
|
||||
},
|
||||
{
|
||||
"category": "model",
|
||||
"description": "gpt-5",
|
||||
"cost": 0.0022,
|
||||
"inputTokens": 1840,
|
||||
"outputTokens": 260
|
||||
}
|
||||
]
|
||||
},
|
||||
"workflowInput": {
|
||||
"ticketId": "T-4821"
|
||||
},
|
||||
"createdAt": "2026-01-15T10:30:00.000Z"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"V2WorkflowLogStats": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"workflowId": {
|
||||
"type": "string",
|
||||
"description": "Workflow identifier, or the literal `deleted` for the single series that collects runs whose workflow no longer exists."
|
||||
},
|
||||
"workflowName": {
|
||||
"type": "string",
|
||||
"description": "Workflow name, or `Deleted Workflow`."
|
||||
},
|
||||
"segments": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/V2LogStatsSegment"
|
||||
},
|
||||
"description": "One entry per bucket, in order, including buckets with no runs."
|
||||
},
|
||||
"totalExecutions": {
|
||||
"type": "number",
|
||||
"description": "Runs for this workflow across the window."
|
||||
},
|
||||
"totalSuccessful": {
|
||||
"type": "number",
|
||||
"description": "Runs for this workflow that did not error."
|
||||
},
|
||||
"overallSuccessRate": {
|
||||
"type": "number",
|
||||
"description": "Percentage of runs that did not error, from 0 to 100. 100 when there were no runs."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"workflowId",
|
||||
"workflowName",
|
||||
"segments",
|
||||
"totalExecutions",
|
||||
"totalSuccessful",
|
||||
"overallSuccessRate"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"title": "Per-workflow log stats",
|
||||
"description": "Bucketed run counts and success rate for one workflow."
|
||||
},
|
||||
"V2LogStatsSegment": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"timestamp": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
||||
"description": "ISO 8601 start of the bucket."
|
||||
},
|
||||
"totalExecutions": {
|
||||
"type": "number",
|
||||
"description": "Runs that started inside the bucket."
|
||||
},
|
||||
"successfulExecutions": {
|
||||
"type": "number",
|
||||
"description": "Runs in the bucket that did not error."
|
||||
},
|
||||
"avgDurationMs": {
|
||||
"type": "number",
|
||||
"description": "Mean duration of the bucket's runs in milliseconds, weighted by run count. Zero when no run in the bucket recorded a duration."
|
||||
}
|
||||
},
|
||||
"required": ["timestamp", "totalExecutions", "successfulExecutions", "avgDurationMs"],
|
||||
"additionalProperties": false,
|
||||
"title": "Log stats bucket",
|
||||
"description": "Run counts and mean latency for one time bucket."
|
||||
},
|
||||
"V2LogStats": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"workflows": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/V2WorkflowLogStats"
|
||||
},
|
||||
"description": "Per-workflow series, ordered by error rate descending then by name, capped at 200 entries."
|
||||
},
|
||||
"workflowsTruncated": {
|
||||
"type": "boolean",
|
||||
"description": "Whether `workflows` was cut to 200 entries. The workspace totals and `aggregateSegments` are computed from every workflow before the cut, so they stay exact either way."
|
||||
},
|
||||
"aggregateSegments": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/V2LogStatsSegment"
|
||||
},
|
||||
"description": "Workspace-wide totals per bucket, in the same order as each workflow series."
|
||||
},
|
||||
"totalRuns": {
|
||||
"type": "number",
|
||||
"description": "Runs in the window across the whole workspace."
|
||||
},
|
||||
"totalErrors": {
|
||||
"type": "number",
|
||||
"description": "Runs in the window that errored."
|
||||
},
|
||||
"avgLatency": {
|
||||
"type": "number",
|
||||
"description": "Mean run duration in milliseconds across the window, weighted by run count."
|
||||
},
|
||||
"timeBounds": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"start": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
||||
"description": "ISO 8601 start of the window."
|
||||
},
|
||||
"end": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
||||
"description": "ISO 8601 end of the window."
|
||||
}
|
||||
},
|
||||
"required": ["start", "end"],
|
||||
"additionalProperties": false,
|
||||
"description": "The window the buckets span: the oldest matching run through the later of the newest matching run and now. A workspace with no matching runs reports the trailing 24 hours."
|
||||
},
|
||||
"segmentMs": {
|
||||
"type": "number",
|
||||
"description": "Width of one bucket in milliseconds."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"workflows",
|
||||
"workflowsTruncated",
|
||||
"aggregateSegments",
|
||||
"totalRuns",
|
||||
"totalErrors",
|
||||
"avgLatency",
|
||||
"timeBounds",
|
||||
"segmentMs"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"title": "Execution log statistics",
|
||||
"description": "Bucketed success rate, error count, and latency for a workspace and each of its workflows."
|
||||
},
|
||||
"V2LogStatsResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"description": "Response data.",
|
||||
"$ref": "#/components/schemas/V2LogStats"
|
||||
}
|
||||
},
|
||||
"required": ["data"],
|
||||
"additionalProperties": false,
|
||||
"title": "Log statistics response",
|
||||
"description": "Bucketed success rate, error count, and latency for a workspace and its workflows.",
|
||||
"examples": [
|
||||
{
|
||||
"data": {
|
||||
"workflows": [
|
||||
{
|
||||
"workflowId": "3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36",
|
||||
"workflowName": "Customer Support Agent",
|
||||
"segments": [
|
||||
{
|
||||
"timestamp": "2026-01-15T10:00:00.000Z",
|
||||
"totalExecutions": 40,
|
||||
"successfulExecutions": 38,
|
||||
"avgDurationMs": 1180
|
||||
}
|
||||
],
|
||||
"totalExecutions": 40,
|
||||
"totalSuccessful": 38,
|
||||
"overallSuccessRate": 95
|
||||
}
|
||||
],
|
||||
"workflowsTruncated": false,
|
||||
"aggregateSegments": [
|
||||
{
|
||||
"timestamp": "2026-01-15T10:00:00.000Z",
|
||||
"totalExecutions": 40,
|
||||
"successfulExecutions": 38,
|
||||
"avgDurationMs": 1180
|
||||
}
|
||||
],
|
||||
"totalRuns": 40,
|
||||
"totalErrors": 2,
|
||||
"avgLatency": 1180,
|
||||
"timeBounds": {
|
||||
"start": "2026-01-15T10:00:00.000Z",
|
||||
"end": "2026-01-15T22:00:00.000Z"
|
||||
},
|
||||
"segmentMs": 600000
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
+3894
-24
File diff suppressed because it is too large
Load Diff
+1859
-36
File diff suppressed because it is too large
Load Diff
+5116
-220
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user