Productmind API

Feature map

The feature map is your feature catalog drawn as a tree, with the applications each feature spans. Read the map, run feature discovery across your repositories to build or rebuild the catalog, follow the scan's progress or stop it, and deep scan selected features across every service they span. See Features.


Get what the next feature discovery would do

GET
https://api.productmind.ai
/workspaces/{workspaceId}/feature-map/scan-mode

A feature discovery scan writes its catalogue directly only in a workspace that has no features of its own. Once a scan has run, or the workspace holds features a person made, imported or edited, the scan changes nothing and proposes the differences for review instead. This returns which of the two the next scan would be, why, and whether a scan has run here before.

Get what the next feature discovery would do › path Parameters

workspaceId
​string · required

Get what the next feature discovery would do › Responses

200

Whether the next scan proposes, and why

​FeatureMapScanModeDTO · required

Get the pending re-scan proposal

GET
https://api.productmind.ai
/workspaces/{workspaceId}/feature-map/proposals/pending

Once a workspace has a feature catalogue, a feature discovery scan is a re-scan: it changes nothing and proposes the differences it found instead (features added, renamed, moved, merged or removed). This returns the proposal awaiting review, with its counts per kind of change, or null when there is none.

Get the pending re-scan proposal › path Parameters

workspaceId
​string · required

Get the pending re-scan proposal › Responses

200

The pending proposal's summary, or null

​required

Get a re-scan proposal

GET
https://api.productmind.ai
/workspaces/{workspaceId}/feature-map/proposals/{proposalId}

One re-scan proposal with each proposed change: its kind, the feature it is about, the values before and after, the scan's reason, and its decision. A change about a private feature you cannot see is left out and counted in hiddenCount. A change whose feature was edited after the scan is flagged changedSinceScan.

Get a re-scan proposal › path Parameters

workspaceId
​string · required
proposalId
​string · required

Get a re-scan proposal › Responses

The proposal, with the changes you may see

​FeatureMapProposalDTO · required

Accept, amend or decline proposed changes

PATCH
https://api.productmind.ai
/workspaces/{workspaceId}/feature-map/proposals/{proposalId}/deltas

Records decisions on a pending re-scan proposal's changes, saved as they are made. accepted takes a change as proposed; amended takes it with your own title, parent or merge target (a removal cannot be amended); declined leaves the catalogue as it is and is remembered, so the same change is not proposed again; pending clears a decision. Nothing is written to the catalogue until the proposal is applied.

Accept, amend or decline proposed changes › path Parameters

workspaceId
​string · required
proposalId
​string · required

Accept, amend or decline proposed changes › Request Body

​object[] · minItems: 1 · maxItems: 1000 · required

Accept, amend or decline proposed changes › Responses

The proposal, with the changes you may see

​FeatureMapProposalDTO · required

Tag proposed changes

PATCH
https://api.productmind.ai
/workspaces/{workspaceId}/feature-map/proposals/{proposalId}/deltas/tags

Puts tags on a pending re-scan proposal's changes, or takes them off. A tag on a change passes to the changes under it (an addition proposed under it, or the same kind of change on a feature inside its feature), unless it is taken off there. New tags are spelled lowercase-with-hyphens. Merges and removals take no tags. Nothing is written to the features until the proposal is applied: then each accepted or amended change's tags land on the feature it creates, links or changes.

Tag proposed changes › path Parameters

workspaceId
​string · required
proposalId
​string · required

Tag proposed changes › Request Body

deltaIds
​string[] · minItems: 1 · maxItems: 1000 · required

The changes to tag. A tag passes to the changes under each of them; merges and removals take none.

add
​string[] · maxItems: 20

Tags to put on the changes, spelled the standard way (lowercase-with-hyphens) when saved.

Default: []
remove
​string[] · maxItems: 20

Tags to take off the changes, and so off the changes under them.

Default: []

Tag proposed changes › Responses

The proposal, with the changes you may see

​FeatureMapProposalDTO · required

Assign proposed changes

PATCH
https://api.productmind.ai
/workspaces/{workspaceId}/feature-map/proposals/{proposalId}/deltas/assignees

Assigns a pending re-scan proposal's changes to people or teams, replacing who they are assigned to. The changes under each one follow it, unless someone assigned them separately. An empty list assigns nobody; null puts the changes back to their features' owners, which each change is assigned to when the re-scan finishes. Assignment is guidance only: it does not change who may decide, and it sends no notification.

Assign proposed changes › path Parameters

workspaceId
​string · required
proposalId
​string · required

Assign proposed changes › Request Body

deltaIds
​string[] · minItems: 1 · maxItems: 1000 · required

The changes to assign. The changes under each of them follow it, unless a person assigned them.

​required

The people and teams to assign, replacing who the changes are assigned to. [] assigns nobody; null puts the changes back to automatic (their features' owners).

Assign proposed changes › Responses

The proposal, with the changes you may see

​FeatureMapProposalDTO · required

Apply a re-scan proposal

POST
https://api.productmind.ai
/workspaces/{workspaceId}/feature-map/proposals/{proposalId}/apply

Writes the accepted and amended changes in one transaction; declined ones leave the catalogue unchanged, and undecided ones are skipped and may be proposed again. Every change is checked first against the catalogue as it would be after the apply: a feature edited since the scan, an addition under a declined parent, a parent of the wrong tier, a move inside itself, the workspace's feature limit or a private feature you cannot edit each refuse the apply with 409 and a reason per change, and nothing is written. Accepting a removal or a merge marks the feature Deprecated with a note saying why; nothing is deleted. Adding features also needs permission to create them.

Apply a re-scan proposal › path Parameters

workspaceId
​string · required
proposalId
​string · required

Apply a re-scan proposal › Request Body

Apply a re-scan proposal › Responses

The proposal, with the changes you may see

​FeatureMapProposalDTO · required

Discard a re-scan proposal

POST
https://api.productmind.ai
/workspaces/{workspaceId}/feature-map/proposals/{proposalId}/discard

Drops a pending re-scan proposal without changing the catalogue. Changes you declined on it stay remembered and are not proposed again.

Discard a re-scan proposal › path Parameters

workspaceId
​string · required
proposalId
​string · required

Discard a re-scan proposal › Request Body

Discard a re-scan proposal › Responses

The proposal, with the changes you may see

​FeatureMapProposalDTO · required

Get the workspace's feature map

GET
https://api.productmind.ai
/workspaces/{workspaceId}/feature-map

Every feature with its place in the hierarchy and the applications it spans, each span carrying the layer it sits at (frontend → backend → data → external). This is what makes a cross-repository feature visible as one thing.

Get the workspace's feature map › path Parameters

workspaceId
​string · required

Get the workspace's feature map › Responses

200

The feature graph

​FeatureGraphDTO · required

Get the latest feature map scan run

GET
https://api.productmind.ai
/workspaces/{workspaceId}/feature-map/runs/latest

The most recent feature map scan of any status — drives the map's staleness caption and its in-flight progress.

Get the latest feature map scan run › path Parameters

workspaceId
​string · required

Get the latest feature map scan run › Responses

200

The latest run with when a scan of the same kind last completed, or null when the workspace has never been mapped

​required

Stop the in-flight feature map scan

POST
https://api.productmind.ai
/workspaces/{workspaceId}/feature-map/scan/cancel

Settles the running scan and cancels its background session, releasing the one-scan-at-a-time slot. Features the run already created are KEPT - a later run reconciles against them. Idempotent, and the agent stops on its next status poll rather than immediately. Only the person who started the scan, or someone who manages the workspace (an organization Owner or Admin, the workspace's owner or one of its admins), can stop it. Deliberately not MCP-exposed.

Stop the in-flight feature map scan › path Parameters

workspaceId
​string · required

Stop the in-flight feature map scan › Responses

The settled run, or null when the workspace has never been mapped

​required

Build (or rebuild) the feature catalogue across several repositories

POST
https://api.productmind.ai
/workspaces/{workspaceId}/feature-map/scan

Starts ONE background Productmind agent scan that builds the feature catalogue: capabilities named in the business's own language, arranged into a hierarchy, each recording every service it spans. Takes existing applications (applicationIds) and/or raw repository refs (repositories); the union is deduped. It builds the catalogue by INDEXING each repository and walking its entry points through the call graph, spending model calls only to name what it found. When the index cannot produce a catalogue worth writing, the run fails with the reason and records result.readingPassOffer: reading the code with AI instead is a separate start (start-agentic-feature-map-scan) the user chooses, because it uses considerably more AI credits. Once the workspace already has a catalogue the scan is a re-scan: it changes nothing and proposes what it found different for review (get-pending-feature-map-proposal). kbDocumentIds (at most 10) names knowledge-base documents whose content reaches the prompts that group the code into domains and features, as the customer's own naming and grouping rules. Omit it to use the workspace's default documents (Settings > Feature discovery), skipping any default document that was deleted since, and only when the caller can read the knowledge base; send [] to use none. On a pay-as-you-go plan it starts only when your balance covers what its run reserves; otherwise it answers 402 (or 429) before anything is created. Owner/admin only.

Build (or rebuild) the feature catalogue across several repositories › path Parameters

workspaceId
​string · required

Build (or rebuild) the feature catalogue across several repositories › Request Body

applicationIds
​string[] · maxItems: 60
​object[] · maxItems: 60
kbDocumentIds
​string[] · maxItems: 10

Knowledge-base documents (at most 10) whose content reaches the prompts that group the code into domains and features, in the order they should be read. Omit it to use the workspace's default documents (Settings > Feature discovery); send [] to use none for this run. Each listed document must be in the workspace and neither a system document nor being deleted, and the caller must be able to read the knowledge base.

Build (or rebuild) the feature catalogue across several repositories › Responses

The queued scan run

​WorkspaceScanRunDTO · required

A short-lived URL for one deterministic feature-graph artifact

GET
https://api.productmind.ai
/workspaces/{workspaceId}/feature-map/graph

Returns a presigned URL for one artifact of the latest deterministic feature-map run. With no featureId it is the SKELETON — every domain and capability, their entry points and their counts — which is what the map loads once. With a featureId it is the slice holding that node's depth: the files it spans and the decision points the walk reached from it. The graph attaches files and decisions at the DOMAIN level, so a capability is answered with its domain's slice — artifactFeatureId names whose slice it is and scopeExternalId is the graph key to filter the decisions by (decisions[].subdomains / majorIn). Answers null rather than 404 when there is no deterministic run yet, when the feature was authored by a person rather than a scan, or when no ancestor owns a slice. The URL is short-lived and the objects are immutable per run, so re-request rather than cache the link.

A short-lived URL for one deterministic feature-graph artifact › path Parameters

workspaceId
​string · required

A short-lived URL for one deterministic feature-graph artifact › query Parameters

featureId
​string

The feature whose slice to fetch. Omit for the skeleton.

A short-lived URL for one deterministic feature-graph artifact › Responses

200

The artifact URL, or null when there is nothing to fetch

​required

Build the feature catalogue by indexing the code, and fail if you cannot

POST
https://api.productmind.ai
/workspaces/{workspaceId}/feature-map/scan/deterministic

Platform owners only. The indexing arm on its own, with NO handover: it indexes every selected repository, walks each entry point it finds through the call graph, clusters what they activate into domains, and extracts the decision points along the way - spending model calls only to NAME the result and divide it into capabilities. start-feature-map-scan runs this same pipeline and, when it cannot produce a catalogue, records a reading-pass offer instead of failing plainly; this route exists so an indexing failure stays a plain failure and can be diagnosed. It needs each application's install command to be set: with no dependency tree there is no index, and with no index there are no domains - the run fails and says so rather than reporting an empty catalogue. kbDocumentIds works as on start-feature-map-scan: omitted, the workspace's default documents are used; [] uses none. Mutually exclusive with any other catalogue run in flight.

Build the feature catalogue by indexing the code, and fail if you cannot › path Parameters

workspaceId
​string · required

Build the feature catalogue by indexing the code, and fail if you cannot › Request Body

applicationIds
​string[] · maxItems: 60
​object[] · maxItems: 60
kbDocumentIds
​string[] · maxItems: 10

Knowledge-base documents (at most 10) whose content reaches the prompts that group the code into domains and features, in the order they should be read. Omit it to use the workspace's default documents (Settings > Feature discovery); send [] to use none for this run. Each listed document must be in the workspace and neither a system document nor being deleted, and the caller must be able to read the knowledge base.

Build the feature catalogue by indexing the code, and fail if you cannot › Responses

The queued scan run

​WorkspaceScanRunDTO · required

Build the feature catalogue by reading the code, never indexing it

POST
https://api.productmind.ai
/workspaces/{workspaceId}/feature-map/scan/agentic

The AI reading pass: one long agent turn over every selected repository, naming capabilities as it goes and creating them one at a time so the map renders live. Start it when start-feature-map-scan could not build the catalogue by indexing (its run carries result.readingPassOffer), passing that run's repositories. It uses considerably more AI credits than indexing, and it is one new session (one more user-hosted session fee when it runs on your own machine). Also usable to run the two arms over one estate and compare them. kbDocumentIds works as on start-feature-map-scan: omitted, the workspace's default documents are used; [] uses none, so pass the offered run's own kbDocumentIds (or []) to repeat it. Mutually exclusive with any other catalogue run in flight. On a pay-as-you-go plan it starts only when your balance covers what its run reserves; otherwise it answers 402 (or 429) before anything is created.

Build the feature catalogue by reading the code, never indexing it › path Parameters

workspaceId
​string · required

Build the feature catalogue by reading the code, never indexing it › Request Body

applicationIds
​string[] · maxItems: 60
​object[] · maxItems: 60
kbDocumentIds
​string[] · maxItems: 10

Knowledge-base documents (at most 10) whose content reaches the prompts that group the code into domains and features, in the order they should be read. Omit it to use the workspace's default documents (Settings > Feature discovery); send [] to use none for this run. Each listed document must be in the workspace and neither a system document nor being deleted, and the caller must be able to read the knowledge base.

Build the feature catalogue by reading the code, never indexing it › Responses

The queued scan run

​WorkspaceScanRunDTO · required

Deep scan the selected features across every service they span

POST
https://api.productmind.ai
/workspaces/{workspaceId}/feature-map/deep-scan

Dispatches one deep read per selected feature. Each clones every application the feature is linked to, starts at the entry point a user touches and works backwards, so business rules are found at every layer rather than only in whichever repository happened to be scanned. Anything not started is returned in skipped with its reason; a feature your pay-as-you-go balance does not cover also carries the refusal's billing code (refusalCode). When nothing starts because of such a refusal, the call answers 402 (or 429) instead.

Deep scan the selected features across every service they span › path Parameters

workspaceId
​string · required

Deep scan the selected features across every service they span › Request Body

featureIds
​string[] · minItems: 1 · maxItems: 1000 · required

Deep scan the selected features across every service they span › Responses

What was started, and what was not

​FeatureDeepScanResultDTO · required