Tutorial

API

The model of the project as JSON files, static, beside these pages: for scripts, dashboards and agents. Read them with fetch from a page, curl from a script, or as files in the deployed folder. The model is read only: writing is editing the sources and going through Git.

Format cadastre-model, version 2: within a version a field is added, never removed nor renamed. Every resource is designated by its qualified name (ops).

The files

FileWhat it holdsExample
api/project.jsonthe project: its name, counts by kind, views, checks and their results, modules, files, diagnosticsapi/project.json
api/resources.jsonevery resource as its short record: id, kind, name, label, owner, operator, site, system, incomplete, missing, declaredapi/resources.json
api/resources/<id>.jsonthe full record of a resource: the short record, then virtual, description, parent, path, module, attributes (every key written), references (each reference key resolved to qualified names), children, members, hosts (what runs on it), runs_here (what runs on what it contains), failures (the impact analysis), failure_pairs (the pairs of failures its redundancy rests on), questions, outgoing and incoming links (with, port, layers, carries, through, through_steps, through_deduced, attributes, declared)api/resources/ops.json
api/links.jsonevery link, both ends named: source, target, port, layers, carries, through, attributes, declaredapi/links.json
api/views/<name>.jsona view evaluated: name, title, description, formats, declared, then nodes (id, kind, label, frame), frames (id, title, resource, in), edges (source, target, relation, ports, layers, carries, through, through_steps, step), diagnostics; absent while the project has errorsapi/views/apps.json
api/checks.jsonthe checks and their results: name, severity, message, declared, result (passed, failed, cannot be evaluated, nothing to run, not run), summary, selected, failing (item, declared)api/checks.json
api/search.jsonthe index of the search of these pages: id, kind, label, wordsapi/search.json
views/<name>.svgthe diagram of a view, when laid out at build time

The same model elsewhere