Bind an asset's variables
Proposal: a person approves it in Muvia, unless an administrator lets that kind run at once.
- Scopes
muvia.write- Module
- Models and Lab
Propose binding an asset's variables to their tags, unbinding some, or recording that a tag now arrives under another name.
Arguments
project_idstringrequired
asset_idstringrequired
bindingsobjectoptional
{variable: {tag, node_id}}.
Default {}
unbind_the_restbooleanoptional
Unbind every variable bindings does not name.
Default false
unboundarray of stringoptional
Variables to unbind.
Default []
renamesarray of objectoptional
Tags now arriving under another name, each {field_name, tag, since, node_id} (GUIDE).
Default []
Input schema (JSON)
{
"additionalProperties": false,
"properties": {
"project_id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"bindings": {
"default": {},
"description": "{variable: {tag, node_id}}.",
"type": "object"
},
"unbind_the_rest": {
"default": false,
"description": "Unbind every variable bindings does not name.",
"type": "boolean"
},
"unbound": {
"default": [],
"description": "Variables to unbind.",
"items": {
"type": "string"
},
"type": "array"
},
"renames": {
"default": [],
"description": "Tags now arriving under another name, each {field_name, tag, since, node_id} (GUIDE).",
"items": {
"type": "object"
},
"type": "array"
}
},
"required": [
"project_id",
"asset_id"
],
"type": "object"
}
Copy a data model
Proposal: a person approves it in Muvia, unless an administrator lets that kind run at once.
- Scopes
muvia.write- Module
- Models and Lab
Propose a draft copy of a model, with deep its whole subtree of child models.
Arguments
Input schema (JSON)
{
"additionalProperties": false,
"properties": {
"project_id": {
"type": "string"
},
"model_id": {
"type": "string"
},
"deep": {
"default": false,
"description": "Copy its whole subtree of child models too.",
"type": "boolean"
}
},
"required": [
"project_id",
"model_id"
],
"type": "object"
}
Create assets
Proposal: a person approves it in Muvia, unless an administrator lets that kind run at once.
- Scopes
muvia.write- Module
- Models and Lab
Propose new assets of one data model (one or a line) with fixed values and bindings or a tag pattern.
Arguments
project_idstringrequired
model_idstringrequired
The data model the assets are of, from list_models.
itemsarray of objectrequired
Each {name, description, tags, static_fields: {variable: value}, bindings: {variable: {tag, node_id}}, tag_pattern}.
parent_asset_idstringoptional
The asset they are components of.
Default null
tag_patternstringoptional
Binds every tag-read variable (GUIDE).
Default null
node_idstringoptional
The node the patterned tags arrive from.
Default null
Input schema (JSON)
{
"additionalProperties": false,
"properties": {
"project_id": {
"type": "string"
},
"model_id": {
"description": "The data model the assets are of, from list_models.",
"type": "string"
},
"items": {
"description": "Each {name, description, tags, static_fields: {variable: value}, bindings: {variable: {tag, node_id}}, tag_pattern}.",
"items": {
"type": "object"
},
"type": "array"
},
"parent_asset_id": {
"default": null,
"description": "The asset they are components of.",
"type": "string"
},
"tag_pattern": {
"default": null,
"description": "Binds every tag-read variable (GUIDE).",
"type": "string"
},
"node_id": {
"default": null,
"description": "The node the patterned tags arrive from.",
"type": "string"
}
},
"required": [
"project_id",
"model_id",
"items"
],
"type": "object"
}
Create a data model
Proposal: a person approves it in Muvia, unless an administrator lets that kind run at once.
- Scopes
muvia.write- Module
- Models and Lab
Propose a draft data model with variables (see suggest_model_from_tags, suggest_fields_from_document).
Arguments
project_idstringrequired
namestringrequired
The model's name.
At least 1 character
descriptionstringoptional
What it describes.
Default null
fieldsarray of objectrequired
Its variables (GUIDE).
tagsarray of stringoptional
Its labels.
Default []
parent_model_idstringoptional
Its parent model.
Default null
colorstringoptional
Default null
Input schema (JSON)
{
"additionalProperties": false,
"properties": {
"project_id": {
"type": "string"
},
"name": {
"description": "The model's name.",
"minLength": 1,
"type": "string"
},
"description": {
"default": null,
"description": "What it describes.",
"type": "string"
},
"fields": {
"description": "Its variables (GUIDE).",
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
"tags": {
"default": [],
"description": "Its labels.",
"items": {
"type": "string"
},
"type": "array"
},
"parent_model_id": {
"default": null,
"description": "Its parent model.",
"type": "string"
},
"color": {
"default": null,
"type": "string"
}
},
"required": [
"project_id",
"name",
"fields"
],
"type": "object"
}
Delete an asset
Proposal: a person approves it in Muvia, unless an administrator lets that kind run at once.
- Scopes
muvia.write- Module
- Models and Lab
Propose deleting an asset and its documents. Refused while it has components.
Arguments
project_idstringrequired
asset_idstringrequired
Input schema (JSON)
{
"additionalProperties": false,
"properties": {
"project_id": {
"type": "string"
},
"asset_id": {
"type": "string"
}
},
"required": [
"project_id",
"asset_id"
],
"type": "object"
}
Delete a data model
Proposal: a person approves it in Muvia, unless an administrator lets that kind run at once.
- Scopes
muvia.write- Module
- Models and Lab
Propose deleting a model, with recursive its child models; refused while an asset is of one.
Arguments
Input schema (JSON)
{
"additionalProperties": false,
"properties": {
"project_id": {
"type": "string"
},
"model_id": {
"type": "string"
},
"recursive": {
"default": false,
"description": "Delete its child models too; refused otherwise.",
"type": "boolean"
}
},
"required": [
"project_id",
"model_id"
],
"type": "object"
}
Describe an asset
- Scopes
muvia.read- Module
- Models and Lab
One asset whole: variables with limits, source, documentation, datasets and dashboards reading it, documents, facts, completeness, a newer model version. A binding's `last_seen_at` is when its tag last sent in 7 days, null if none -- unless `unmeasured` names it.
Arguments
project_idstringrequired
asset_idstringrequired
Input schema (JSON)
{
"additionalProperties": false,
"properties": {
"project_id": {
"type": "string"
},
"asset_id": {
"type": "string"
}
},
"required": [
"project_id",
"asset_id"
],
"type": "object"
}
Describe a data model
- Scopes
muvia.read- Module
- Models
One data model whole: variables with type, unit, limits and category, versions, parents and children, documents.
Arguments
project_idstringrequired
model_idstringrequired
Input schema (JSON)
{
"additionalProperties": false,
"properties": {
"project_id": {
"type": "string"
},
"model_id": {
"type": "string"
}
},
"required": [
"project_id",
"model_id"
],
"type": "object"
}
Read where variables are documented
- Scopes
muvia.read- Module
- Models and Lab
Where each variable is documented, by model family (model_id) or asset (asset_id): whether each document is still there, and which may be cited.
Arguments
Input schema (JSON)
{
"additionalProperties": false,
"properties": {
"project_id": {
"type": "string"
},
"model_id": {
"default": null,
"description": "Model whose family's references to read (its documents and the project's).",
"type": "string"
},
"asset_id": {
"default": null,
"description": "Or the asset whose own references to read (in its own files).",
"type": "string"
}
},
"required": [
"project_id"
],
"type": "object"
}
Duplicate an asset
Proposal: a person approves it in Muvia, unless an administrator lets that kind run at once.
- Scopes
muvia.write- Module
- Models and Lab
Propose a copy of an asset under another name: same model, parent, labels, fixed values; bindings with a text of each tag replaced.
Arguments
project_idstringrequired
asset_idstringrequired
namestringrequired
The copy's name.
At least 1 character
with_bindingsbooleanoptional
Copy its bindings too.
Default true
tag_findstringoptional
Text replaced in every copied tag (e.g. C101.).
At least 1 character; default null
tag_replacestringoptional
What tag_find becomes.
Default ""
node_idstringoptional
The node the copied tags arrive from.
Default null
Input schema (JSON)
{
"additionalProperties": false,
"properties": {
"project_id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"name": {
"description": "The copy's name.",
"minLength": 1,
"type": "string"
},
"with_bindings": {
"default": true,
"description": "Copy its bindings too.",
"type": "boolean"
},
"tag_find": {
"default": null,
"description": "Text replaced in every copied tag (e.g. C101.).",
"minLength": 1,
"type": "string"
},
"tag_replace": {
"default": "",
"description": "What tag_find becomes.",
"type": "string"
},
"node_id": {
"default": null,
"description": "The node the copied tags arrive from.",
"type": "string"
}
},
"required": [
"project_id",
"asset_id",
"name"
],
"type": "object"
}
File an object in an asset
Proposal: a person approves it in Muvia, unless an administrator lets that kind run at once.
- Scopes
muvia.write- Module
- Models and Lab
Propose filing a dashboard, notebook, report, dataset, query or flow in an asset's contents, or taking one out.
Arguments
project_idstringrequired
asset_idstringrequired
kindstringrequired
What is filed: not an analysis.
One of "dashboard", "notebook", "report", "dataset", "query", "flow", "analysis"
targetstringrequired
Where to file it.
1 to 64 characters
unfilebooleanoptional
Take it out of the asset instead of filing it.
Default false
Input schema (JSON)
{
"additionalProperties": false,
"properties": {
"project_id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"kind": {
"description": "What is filed: not an analysis.",
"enum": [
"dashboard",
"notebook",
"report",
"dataset",
"query",
"flow",
"analysis"
],
"type": "string"
},
"target": {
"description": "Where to file it.",
"maxLength": 64,
"minLength": 1,
"type": "string"
},
"unfile": {
"default": false,
"description": "Take it out of the asset instead of filing it.",
"type": "boolean"
}
},
"required": [
"project_id",
"asset_id",
"kind",
"target"
],
"type": "object"
}
List the assets
- Scopes
muvia.read- Module
- Models and Lab
List assets (machines): model, parent, binding completeness.
Arguments
project_idstringrequired
searchstringoptional
Text to search for.
Default null
Input schema (JSON)
{
"additionalProperties": false,
"properties": {
"project_id": {
"type": "string"
},
"search": {
"default": null,
"description": "Text to search for.",
"type": "string"
}
},
"required": [
"project_id"
],
"type": "object"
}
List the data models
- Scopes
muvia.read- Module
- Models
List data models (what a kind of machine measures): version, status, parent, labels, variable count.
Arguments
project_idstringrequired
namestringoptional
Keep the models whose name contains this text.
Default null
tagsarray of stringoptional
Keep the models carrying every one of these tags.
Default []
latest_onlybooleanoptional
Only the newest version of each model family.
Default true
Input schema (JSON)
{
"additionalProperties": false,
"properties": {
"project_id": {
"type": "string"
},
"name": {
"default": null,
"description": "Keep the models whose name contains this text.",
"type": "string"
},
"tags": {
"default": [],
"description": "Keep the models carrying every one of these tags.",
"items": {
"type": "string"
},
"type": "array"
},
"latest_only": {
"default": true,
"description": "Only the newest version of each model family.",
"type": "boolean"
}
},
"required": [
"project_id"
],
"type": "object"
}
Preview an asset's upgrade
- Scopes
muvia.read- Module
- Models
What moving an asset to a newer model version would do per variable (kept, renamed, added, removed), binding and fixed value. Writes nothing.
Arguments
Input schema (JSON)
{
"additionalProperties": false,
"properties": {
"project_id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"target_model_id": {
"default": null,
"description": "Model id of the asset's family to move to; none: the newest published.",
"type": "string"
}
},
"required": [
"project_id",
"asset_id"
],
"type": "object"
}
Document where variables are described
Proposal: a person approves it in Muvia, unless an administrator lets that kind run at once.
- Scopes
muvia.write- Module
- Models and Lab
Propose where named variables are documented: model or project documents (model_id) or an asset's files (asset_id).
Arguments
project_idstringrequired
model_idstringoptional
Model whose family's references to read (its documents and the project's).
Default null
asset_idstringoptional
Or the asset whose own references to read (in its own files).
Default null
referencesobjectrequired
{field_id: [reference]}, replacing what it had (GUIDE); [] clears it.
Input schema (JSON)
{
"additionalProperties": false,
"properties": {
"project_id": {
"type": "string"
},
"model_id": {
"default": null,
"description": "Model whose family's references to read (its documents and the project's).",
"type": "string"
},
"asset_id": {
"default": null,
"description": "Or the asset whose own references to read (in its own files).",
"type": "string"
},
"references": {
"description": "{field_id: [reference]}, replacing what it had (GUIDE); [] clears it.",
"type": "object"
}
},
"required": [
"project_id",
"references"
],
"type": "object"
}
Read an asset's live values
- Scopes
muvia.read- Module
- Models
Each variable of an asset as it reads now: tag, newest value and when, and its freshness by the node's cadence.
Arguments
project_idstringrequired
asset_idstringrequired
Input schema (JSON)
{
"additionalProperties": false,
"properties": {
"project_id": {
"type": "string"
},
"asset_id": {
"type": "string"
}
},
"required": [
"project_id",
"asset_id"
],
"type": "object"
}
Release a data model
Proposal: a person approves it in Muvia, unless an administrator lets that kind run at once.
- Scopes
muvia.write- Module
- Models and Lab
Propose releasing a draft model or a released model's next version; every asset of the family then has an upgrade.
Arguments
project_idstringrequired
model_idstringrequired
release_notesstringoptional
Default null
new_versionobjectoptional
A released model's next version: fields (as create_model takes them), optionally name, description, tags, release_notes.
Default null
Input schema (JSON)
{
"additionalProperties": false,
"properties": {
"project_id": {
"type": "string"
},
"model_id": {
"type": "string"
},
"release_notes": {
"default": null,
"type": "string"
},
"new_version": {
"additionalProperties": true,
"default": null,
"description": "A released model's next version: fields (as create_model takes them), optionally name, description, tags, release_notes.",
"type": "object"
}
},
"required": [
"project_id",
"model_id"
],
"type": "object"
}
Set an asset's fixed values
Proposal: a person approves it in Muvia, unless an administrator lets that kind run at once.
- Scopes
muvia.write- Module
- Models and Lab
Propose setting or clearing an asset's fixed values (serial, rating) by variable name.
Arguments
project_idstringrequired
asset_idstringrequired
valuesobjectoptional
Fixed variable name → its value on this asset (a serial, a rating).
Default {}
clearedarray of stringoptional
Fixed variables whose value to clear.
Default []
Input schema (JSON)
{
"additionalProperties": false,
"properties": {
"project_id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"values": {
"additionalProperties": true,
"default": {},
"description": "Fixed variable name → its value on this asset (a serial, a rating).",
"type": "object"
},
"cleared": {
"default": [],
"description": "Fixed variables whose value to clear.",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"project_id",
"asset_id"
],
"type": "object"
}
Suggest an asset's bindings
- Scopes
muvia.write- Module
- Models
Likeliest tag per unbound variable of an asset, scored. Writes nothing: bind_asset saves the pairings kept.
Arguments
project_idstringrequired
asset_idstringrequired
Input schema (JSON)
{
"additionalProperties": false,
"properties": {
"project_id": {
"type": "string"
},
"asset_id": {
"type": "string"
}
},
"required": [
"project_id",
"asset_id"
],
"type": "object"
}
Suggest variables from a datasheet
- Scopes
muvia.write- Module
- Models
Variables a model's document (datasheet, manual) says it should have, with page and heading. Writes nothing; reading it uses the AI.
Arguments
Input schema (JSON)
{
"additionalProperties": false,
"properties": {
"project_id": {
"type": "string"
},
"model_id": {
"type": "string"
},
"attachment_name": {
"description": "A model document's name (describe_model).",
"type": "string"
}
},
"required": [
"project_id",
"model_id",
"attachment_name"
],
"type": "object"
}
Suggest a model from the tags
- Scopes
muvia.write- Module
- Models
A data model from the tags the project sends: a variable per tag with type, unit, whether it adds up. Writes nothing; create_model saves it.
Arguments
Input schema (JSON)
{
"additionalProperties": false,
"properties": {
"project_id": {
"type": "string"
}
},
"required": [
"project_id"
],
"type": "object"
}
Update an asset
Proposal: a person approves it in Muvia, unless an administrator lets that kind run at once.
- Scopes
muvia.write- Module
- Models and Lab
Propose changing one asset's name, description, labels or parent.
Arguments
project_idstringrequired
asset_idstringrequired
namestringoptional
Default null
descriptionstringoptional
Its description; null clears it.
Default null
tagsarray of stringoptional
Default null
parent_asset_idstringoptional
The asset it is a component of; null detaches it.
Default null
Input schema (JSON)
{
"additionalProperties": false,
"properties": {
"project_id": {
"type": "string"
},
"asset_id": {
"type": "string"
},
"name": {
"default": null,
"type": "string"
},
"description": {
"default": null,
"description": "Its description; null clears it.",
"type": "string"
},
"tags": {
"default": null,
"items": {
"type": "string"
},
"type": "array"
},
"parent_asset_id": {
"default": null,
"description": "The asset it is a component of; null detaches it.",
"type": "string"
}
},
"required": [
"project_id",
"asset_id"
],
"type": "object"
}
Update a draft data model
Proposal: a person approves it in Muvia, unless an administrator lets that kind run at once.
- Scopes
muvia.write- Module
- Models and Lab
Propose changing a draft model's name, variables, labels, parent or colour. A released model gets release_model.
Arguments
project_idstringrequired
model_idstringrequired
namestringoptional
Default null
descriptionstringoptional
Default null
fieldsarray of objectoptional
Its variables (GUIDE), replaced whole; one keeps its id by name.
Default null
tagsarray of stringoptional
Default null
parent_model_idstringoptional
Default null
colorstringoptional
Default null
Input schema (JSON)
{
"additionalProperties": false,
"properties": {
"project_id": {
"type": "string"
},
"model_id": {
"type": "string"
},
"name": {
"default": null,
"type": "string"
},
"description": {
"default": null,
"type": "string"
},
"fields": {
"default": null,
"description": "Its variables (GUIDE), replaced whole; one keeps its id by name.",
"items": {
"additionalProperties": true,
"type": "object"
},
"type": "array"
},
"tags": {
"default": null,
"items": {
"type": "string"
},
"type": "array"
},
"parent_model_id": {
"default": null,
"type": "string"
},
"color": {
"default": null,
"type": "string"
}
},
"required": [
"project_id",
"model_id"
],
"type": "object"
}
Upgrade an asset's model version
Proposal: a person approves it in Muvia, unless an administrator lets that kind run at once.
- Scopes
muvia.write- Module
- Models and Lab
Propose moving an asset, or every asset of a family, to a newer model version, as preview_asset_upgrade shows.
Arguments
project_idstringrequired
asset_idstringoptional
Asset to move; none: every asset of the family below the target, which must only add variables.
Default null
target_model_idstringrequired
The published version to move to, a model id of the family.
static_fieldsobjectoptional
Values for the fixed variables the new version adds.
Default {}
Input schema (JSON)
{
"additionalProperties": false,
"properties": {
"project_id": {
"type": "string"
},
"asset_id": {
"default": null,
"description": "Asset to move; none: every asset of the family below the target, which must only add variables.",
"type": "string"
},
"target_model_id": {
"description": "The published version to move to, a model id of the family.",
"type": "string"
},
"static_fields": {
"additionalProperties": true,
"default": {},
"description": "Values for the fixed variables the new version adds.",
"type": "object"
}
},
"required": [
"project_id",
"target_model_id"
],
"type": "object"
}