Viewport daemon, relay, and hosted runtime are available in alpha. Surfaces may change.
VIEWPORT
ReferenceAPI reference

Memory

19 operations in the Memory group.

6 of 19 operations on this page are generated contract stubs: the routes are real, the schemas are placeholders pending the owning subsystem's contract pass.

GET /api/memory/proposals

Generated contract stub — the route is real and served, but its request/response schema has not been hand-tightened yet.

Operation ID: getApiMemoryProposals

Responses

StatusDescriptionSchema
200Successful responseGenericApiResponse
401Authentication is requiredErrorEnvelope
403Permission deniedErrorEnvelope
422Validation failedErrorEnvelope
500Server errorErrorEnvelope

GET /api/memory/proposals/{proposal}/policy-promotion

Generated contract stub — the route is real and served, but its request/response schema has not been hand-tightened yet.

Operation ID: getApiMemoryProposalsProposalPolicyPromotion

Parameters

NameInRequiredTypeDescription
proposalpathyesstring

Responses

StatusDescriptionSchema
200Successful responseGenericApiResponse
401Authentication is requiredErrorEnvelope
403Permission deniedErrorEnvelope
422Validation failedErrorEnvelope
500Server errorErrorEnvelope

POST /api/memory/proposals/{proposal}/policy-promotion/open-pr

Generated contract stub — the route is real and served, but its request/response schema has not been hand-tightened yet.

Operation ID: postApiMemoryProposalsProposalPolicyPromotionOpenPr

Parameters

NameInRequiredTypeDescription
proposalpathyesstring

Request bodyapplication/json · object

Responses

StatusDescriptionSchema
200Successful responseGenericApiResponse
201Successful responseGenericApiResponse
401Authentication is requiredErrorEnvelope
403Permission deniedErrorEnvelope
422Validation failedErrorEnvelope
500Server errorErrorEnvelope

POST /api/memory/proposals/batch-apply

Generated contract stub — the route is real and served, but its request/response schema has not been hand-tightened yet.

Operation ID: postApiMemoryProposalsBatchApply

Request bodyapplication/json · object

Responses

StatusDescriptionSchema
200Successful responseGenericApiResponse
201Successful responseGenericApiResponse
401Authentication is requiredErrorEnvelope
403Permission deniedErrorEnvelope
422Validation failedErrorEnvelope
500Server errorErrorEnvelope

GET /api/memory/receipts

Generated contract stub — the route is real and served, but its request/response schema has not been hand-tightened yet.

Operation ID: getApiMemoryReceipts

Responses

StatusDescriptionSchema
200Successful responseGenericApiResponse
401Authentication is requiredErrorEnvelope
403Permission deniedErrorEnvelope
422Validation failedErrorEnvelope
500Server errorErrorEnvelope

GET /api/memory/search

Generated contract stub — the route is real and served, but its request/response schema has not been hand-tightened yet.

Operation ID: getApiMemorySearch

Responses

StatusDescriptionSchema
200Successful responseGenericApiResponse
401Authentication is requiredErrorEnvelope
403Permission deniedErrorEnvelope
422Validation failedErrorEnvelope
500Server errorErrorEnvelope

GET /api/resources/{workspace}/context-sources

Operation ID: listContextSources

Parameters

NameInRequiredTypeDescription
workspacepathyesstring

Responses

StatusDescriptionSchema
200List context sources visible in the selected workspace/team scope. Response is metadata-only and never returns indexed plaintext, embeddings, or provider credentials.ContextSourceCollectionResponse

POST /api/resources/{workspace}/context-sources

Operation ID: createContextSource

Parameters

NameInRequiredTypeDescription
workspacepathyesstring

Request bodyapplication/json · ContextSourceUpsertRequest (required)

FieldTypeRequired
scopeenum(org, team)no
provider_typeenum(git, notion, confluence, viewport_memory)no
namestringno
description`stringnull`
external_refstringno
source_url`stringnull`
scope_configobjectno
execution_modeenum(viewport_managed, customer_managed_context_worker, runner_local)no
content_storageenum(none_metadata_only, managed_index, customer_index)no
read_enabledbooleanno
write_enabledbooleanno
default_update_strategyenum(git_pr, viewport_inbox_then_provider_write, read_only)no
privacy_labelstringno
freshness_statusstringno

Responses

StatusDescriptionSchema
201Create a provider-backed context source. UI writes do not create policy grants; access remains team/resource-scoped.ContextSourceResponse

GET /api/resources/{workspace}/context-sources/{contextSource}

Operation ID: showContextSource

Parameters

NameInRequiredTypeDescription
workspacepathyesstring
contextSourcepathyesstring

Responses

StatusDescriptionSchema
200Show a context source visible in the selected workspace/team scope. Response is metadata-only.ContextSourceResponse

PUT /api/resources/{workspace}/context-sources/{contextSource}

Operation ID: replaceContextSource

Parameters

NameInRequiredTypeDescription
workspacepathyesstring
contextSourcepathyesstring

Request bodyapplication/json · ContextSourceUpsertRequest (required)

FieldTypeRequired
scopeenum(org, team)no
provider_typeenum(git, notion, confluence, viewport_memory)no
namestringno
description`stringnull`
external_refstringno
source_url`stringnull`
scope_configobjectno
execution_modeenum(viewport_managed, customer_managed_context_worker, runner_local)no
content_storageenum(none_metadata_only, managed_index, customer_index)no
read_enabledbooleanno
write_enabledbooleanno
default_update_strategyenum(git_pr, viewport_inbox_then_provider_write, read_only)no
privacy_labelstringno
freshness_statusstringno

Responses

StatusDescriptionSchema
200Replace context-source metadata/configuration. This does not grant new policy access.ContextSourceResponse

PATCH /api/resources/{workspace}/context-sources/{contextSource}

Operation ID: updateContextSource

Parameters

NameInRequiredTypeDescription
workspacepathyesstring
contextSourcepathyesstring

Request bodyapplication/json · ContextSourceUpsertRequest (required)

FieldTypeRequired
scopeenum(org, team)no
provider_typeenum(git, notion, confluence, viewport_memory)no
namestringno
description`stringnull`
external_refstringno
source_url`stringnull`
scope_configobjectno
execution_modeenum(viewport_managed, customer_managed_context_worker, runner_local)no
content_storageenum(none_metadata_only, managed_index, customer_index)no
read_enabledbooleanno
write_enabledbooleanno
default_update_strategyenum(git_pr, viewport_inbox_then_provider_write, read_only)no
privacy_labelstringno
freshness_statusstringno

Responses

StatusDescriptionSchema
200Update context-source metadata/configuration. This does not grant new policy access.ContextSourceResponse

POST /api/resources/{workspace}/context-sources/{contextSource}/indexes

Operation ID: upsertContextSourceIndexes

Parameters

NameInRequiredTypeDescription
workspacepathyesstring
contextSourcepathyesstring

Request bodyapplication/json · ContextSourceIndexUpsertRequest (required)

FieldTypeRequired
documentsarray<ContextSourceIndexUpsertDocument>yes
sync_modeenum(merge, replace_missing)no
generate_embeddingsbooleanno
embedding_model`stringnull`

Responses

StatusDescriptionSchema
200Upserted managed context-source index blocks. Response is digest-only and never returns indexed plaintext.ContextSourceIndexUpsertResponse

POST /api/resources/{workspace}/context-sources/{contextSource}/sync-git

Operation ID: syncGitContextSource

Parameters

NameInRequiredTypeDescription
workspacepathyesstring
contextSourcepathyesstring

Request bodyapplication/json · ContextSourceGitSyncRequest

FieldTypeRequired
limitintegerno

Responses

StatusDescriptionSchema
200Synced a Viewport-managed Git context source through a connected GitHub App installation. Response is digest-only and never returns indexed plaintext.ContextSourceGitSyncResponse

GET /api/resources/{workspace}/memory/proposals

Operation ID: listMemoryProposals

Parameters

NameInRequiredTypeDescription
workspacepathyesstring
statusquerynostring
queue_bucketquerynostring
recommended_actionquerynostring
limitquerynointeger

Responses

StatusDescriptionSchema
200Digest-only memory/context update proposal queue scoped to the current workspace/team. Raw patches and memory plaintext are never returned.MemoryProposalCollectionResponse

GET /api/resources/{workspace}/memory/proposals/{proposal}/policy-promotion

Build a digest-only policy-promotion packet for a memory proposal

Operation ID: getMemoryPolicyPromotion

Parameters

NameInRequiredTypeDescription
workspacepathyesstring
proposalpathyesstring

Responses

StatusDescriptionSchema
200Digest-only policy-promotion packet.MemoryPolicyPromotionPacketResponse
403Forbidden.
404Not found.
422Proposal is not eligible for policy promotion.

POST /api/resources/{workspace}/memory/proposals/{proposal}/policy-promotion/open-pr

Open a GitOps pull request that promotes a memory rule into enforceable policy

Operation ID: openMemoryPolicyPromotionPullRequest

Parameters

NameInRequiredTypeDescription
workspacepathyesstring
proposalpathyesstring

Request bodyapplication/json · MemoryPolicyPromotionPullRequestRequest (required)

FieldTypeRequired
source_idstringyes

Responses

StatusDescriptionSchema
200Existing policy promotion pull request updated.MemoryPolicyPromotionPullRequestResponse
201Policy promotion pull request opened.MemoryPolicyPromotionPullRequestResponse
403Forbidden.
404Not found.
422Proposal, source, or target policy is not eligible for policy promotion.

POST /api/resources/{workspace}/memory/proposals/batch-apply

Operation ID: batchApplyMemoryProposals

Parameters

NameInRequiredTypeDescription
workspacepathyesstring

Request bodyapplication/json · MemoryProposalBatchApplyRequest (required)

FieldTypeRequired
proposal_idsarray<string>yes
message`stringnull`

Responses

StatusDescriptionSchema
200Human-initiated batch application for deterministically low-risk managed memory proposals. Only eligible same-team proposals are applied; raw patches and memory plaintext are never returned.MemoryProposalBatchApplyResponse

GET /api/resources/{workspace}/memory/receipts

Operation ID: listMemoryReceipts

Parameters

NameInRequiredTypeDescription
workspacepathyesstring
run_idquerynostring
limitquerynointeger

Responses

StatusDescriptionSchema
200Digest-only memory-use receipt summaries scoped to the current workspace/team. Raw run event payloads and memory plaintext are never returned.MemoryReceiptCollectionResponse

GET /api/resources/{workspace}/memory/search

Operation ID: searchMemory

Parameters

NameInRequiredTypeDescription
workspacepathyesstring
qqueryyesstring
limitquerynointeger
source_kindquerynoenum(all, approved_memory, managed_context_index)Restricts retrieval to approved governed memory, managed context indexes, or both. Defaults to all.
context_source_idsquerynoarray<string>Optional selected managed context source ids. Applies only to managed context index retrieval; inaccessible source ids silently return no citations.
query_embeddingquerynoarray<number>Optional caller-supplied query embedding used only against managed context index entries that carry stored embeddings. The vector itself is never returned.
generate_query_embeddingquerynobooleanWhen true, Viewport generates a hosted query embedding for managed-index retrieval if query_embedding is not supplied. Fails closed if the configured embedding provider is unavailable.
query_embedding_modelqueryno`stringnull`

Responses

StatusDescriptionSchema
200Governed memory metadata search. Rule memories are returned only as policy-promotion candidates and raw memory plaintext is never returned.MemorySearchResponse

On this page