Specifications¶
In AIGr.id, you create things (clusters, nodes, components, blocks, vDAGs) by describing them in a JSON specification and submitting it to the network's Parser. This section is the reference for those specifications.
Which spec do I need?¶
| To... | Write a... | Submit with action | Reference |
|---|---|---|---|
| Register a cluster | Cluster spec | createCluster |
Cluster and node spec |
| Add a node to a cluster | Node spec | addNode |
Cluster and node spec |
| Package code for deployment | Component spec | addComponent |
Component spec |
| Deploy a component as a running service | Block spec | createBlock |
Block spec |
| Chain blocks into a workflow | vDAG spec | createvDAG |
vDAG spec |
| Send a command to a running block or cluster | Management command spec | executeMgmtCommand |
Management commands |
| Find blocks, clusters, vDAGs or policies | Search or filter spec | search, filter |
Search and filter |
How submission works¶
flowchart LR
S["Your spec<br/>(JSON)"] -->|"POST /api/<action>"| P["Parser"]
P -->|"templateUri = Parser/V1"| IR["Built-in parsing"]
P -->|"custom templateUri"| T["Your template policy"]
IR --> B["Backend services<br/><small>Gateway, vDAG processor,<br/>registries, ...</small>"]
T --> B
Every spec has the same outer shape: a header that says how to parse it, and a body with the content:
{
"header": {
"templateUri": "Parser/V1",
"parameters": {}
},
"body": {
"spec": {
"values": {
...
}
}
}
}
Parser/V1 is the built-in format documented in this section. You can also define your own format.
Start with How the Parser works.