Skip to content

Capabilities

Each row is a core capability and each column a surface; a cell names the route, function, method or command that performs it. The HTTP API reference describes every route named here. In the TypeScript client, Control in @mosaicajs/client calls the control-plane routes with the operator credential. In the Python client, Control calls the same routes with the operator credential, on any server, and Database writes to a database it runs itself, made by create or open. The CLI builds a bundle from a declaration, writes to a running service through its control plane, with --control and the credential in MOSAICA_CREDENTIAL, and reads from it with a session token.

Only a layer and a view of a view group can be dropped, on every surface. Nothing drops an attribute, a vocabulary, a view outside a view group, a view group or the shard size.

Capability HTTP TypeScript client Python client CLI
Declare views, view groups, attributes and vocabularies PUT /control/views/{name}, PUT /control/view_groups/{name}, PUT /control/views/{group}/{key}, PUT /control/attributes, PUT /control/vocabularies/{name}, PATCH /control/vocabularies/{name}/values, DELETE /control/views/{group}/{key} Control.declareView, declareViewGroup, createView, declareAttribute, declareVocabulary, vocabularyValues, dropView Database.declare_view, declare_view_group, declare_attribute, declare_unique, declare_vocabulary, declare_columns, declare, sent by Database.commit; Database.drop_view; Control.declare_view, declare_view_group, create_view, declare_attribute, declare_vocabulary, vocabulary_values, drop_view The declaration file, checked by mosaica check and built by mosaica build; mosaica check --payloads prints the matching control-plane bodies. On a running service, mosaica declare sends the whole declaration, and mosaica declare view, declare view-group, declare attribute and declare vocabulary one block each; mosaica insert --vocabulary; mosaica drop view
Declare the shard size PUT /control/shards; shards.size in GET /control/status Control.declareShards; shards.size in Control.status Database.declare_shards, written into the declaration before the first commit and sent by Database.commit after it; shards.size in Database.status; Control.declare_shards; shards.size in Control.status [shards] size in the declaration file, checked by mosaica check and built by mosaica build; mosaica check --payloads prints the matching body; mosaica declare shards; shards.size in mosaica status
Insert and edit POST /control/ingest (new items, existing items into a further view, and edits of existing items) Control.ingest (new items, existing items into a further view, and edits of existing items) Database.insert, sent by Database.commit; Control.ingest mosaica build reads the declaration's sources into a new bundle; mosaica insert writes rows into a running service
Delete POST /control/changes with op: "delete" Control.changes with op: 'delete' Database.remove; Control.changes with op: "delete" mosaica delete
Suppress and lift a suppression POST /control/changes with op: "suppress" or op: "unsuppress" Control.changes with op: 'suppress' or op: 'unsuppress' Database.suppress, Database.unsuppress; Control.changes with op: "suppress" or op: "unsuppress" mosaica suppress, mosaica unsuppress
Compact POST /control/compact; GET /control/compact/{request} for where a request is and its outcome Control.compact, which waits for the answer with wait; Control.awaitCompaction; Control.compactionRequest Database.compact, which waits for the answer with wait=True; Control.compact; Control.await_compaction; Control.compaction_request mosaica compact; mosaica compact --wait [--progress] to wait for its outcome; mosaica compact --request N [--wait] to read or wait for a request already made
Query the map POST /v1/viewport MosaicaClient.viewport; Store.setView Selection.sample, Selection.count, Selection.map, Viewer.map, Database.view, Database.map, Map Not built yet
Query items POST /v1/items (pages of records, or those a mosaica_id leaf in filters names), POST /v1/items/{mosaica_id} (one record) MosaicaClient.items, with namedItems for the items named by their ids, MosaicaClient.item; Store.items, Store.pick, Store.describe Viewer.items, Database.items, Selection.items, each taking a mosaica_id leaf in filters; Viewer.item, Database.item; Viewer.lookup, Database.lookup mosaica items, with a mosaica_id leaf in --filters for the items named
Count and compare distributions POST /v1/aggregate MosaicaClient.aggregate; Store.setAggregate Viewer.aggregate, Database.aggregate, Selection.aggregate mosaica aggregate, one grouping a run
Filter filters in the bodies of POST /v1/viewport, POST /v1/artifacts/viewport, POST /v1/items, POST /v1/artifacts, POST /v1/artifacts/browse, POST /v1/aggregate and POST /v1/categories/{column}/suggest filters on MosaicaClient.viewport, MosaicaClient.viewportArtifacts, MosaicaClient.items, MosaicaClient.artifacts, MosaicaClient.browse, MosaicaClient.aggregate and MosaicaClient.suggest; Store.setFilters, Store.setMembers, Store.select; filters on Store.browse and Store.items Selection.filter, Selection.within; filters on Viewer.items, Viewer.artifacts, Database.items, Database.artifacts, Viewer.viewport_artifacts, Viewer.aggregate, Database.aggregate, Viewer.browse_artifacts, Viewer.categories and Database.categories --filters on mosaica items, mosaica artifacts and mosaica aggregate
Highlight highlight in the bodies of POST /v1/viewport and POST /v1/artifacts/viewport highlight on MosaicaClient.viewport and MosaicaClient.viewportArtifacts; Store.setFilters with a clause in the draft's highlight; Store.setMembers with a clause whose verb is highlight highlight on Selection.sample and Viewer.viewport_artifacts Not built yet
Search text, and suggest category values A match leaf in filters; GET /v1/categories/{column}/suggest, and POST to it for counts under a filter A text clause in Store.setFilters; MosaicaClient.suggest, Store.suggest A match leaf in Selection.filter; Viewer.categories and Database.categories with prefix A match leaf in --filters on mosaica items. Suggesting category values: not built yet
Declare and publish annotation layers PUT /control/layers, PUT /control/layers/{name}/artifacts, PATCH /control/layers/{name}/artifacts, DELETE /control/layers/{name} Control.declareLayer, Control.publish, Control.grow, Control.dropLayer Database.declare_layer, Database.declare_labels, Database.insert into the layer, sent by Database.commit; Database.leave; Database.drop_layer; Control.declare_layer, Control.publish, Control.grow, Control.drop_layer [[layer]] in the declaration, built by mosaica build; mosaica declare layer, mosaica publish, mosaica grow, mosaica drop layer
Read annotation layers POST /v1/artifacts/viewport (the artifacts of each tile); layers in the body of POST /v1/viewport (each point's tag); POST /v1/artifacts (pages of artifacts, or those ids names); POST /v1/artifacts/browse; POST /v1/artifacts/{mosaica_id} MosaicaClient.viewportArtifacts, Store.setLayers; layers on MosaicaClient.viewport; MosaicaClient.artifacts; MosaicaClient.browse, Store.browse; MosaicaClient.artifact, Store.openArtifact Viewer.viewport_artifacts, Database.viewport_artifacts; layers on Selection.sample; Viewer.artifacts, Database.artifacts; Viewer.browse_artifacts; Viewer.artifact mosaica artifacts, with --ids