create_diagram
Make a diagram in a space: nodes and the edges between them — flowcharts, processes, system architecture, data flows, org charts, user journeys — with groups drawn around related nodes. Artifacts lays it out top to bottom or left to right so nothing overlaps; people drag, rename, connect and comment on nodes. Give the nodes (id, label, shape), then the edges (from, to, label). Read guide topic "diagrams" first; check it with render_diagram.
Parameters
space_idstringrequiredtitlestringrequiredsubtitlestringdirectionstringTB, LR, BT, RL.nodesobject[]requiredShow child attributes
idstringlabelstringrequiredshapestringbox, rounded, pill, diamond, circle, cylinder, note.descriptionstringcolorstringdefault, blue, green, amber, red, violet, gray.groupstringedgesobject[]requiredShow child attributes
fromstringrequiredtostringrequiredlabelstringstylestringsolid, dashed.arrowstringend, both, none.groupsobject[]Show child attributes
idstringlabelstringrequiredread_diagram
A diagram as it is now, people's edits included: direction, groups, nodes (with x and y where people placed them) and edges with their ids (what update_diagram takes).
Parameters
item_idstringrequiredupdate_diagram
Change a diagram. Any of: title, subtitle, direction; add_groups, remove_groups (their nodes stay, outside any group); add_nodes; change_nodes (by id: the fields you give replace those fields, "" clears one — description, color, group; shape back to rounded); remove_nodes (with their edges); add_edges; change_edges (by id); remove_edges (ids); tidy (true: drop where people placed nodes and lay it all out again). Applied in that order, all or nothing; read_diagram first for the ids — people may have changed it.
Parameters
item_idstringrequiredtitlestringsubtitlestringdirectionstringTB, LR, BT, RL.add_groupsobject[]Show child attributes
idstringlabelstringrequiredremove_groupsstring[]add_nodesobject[]Show child attributes
idstringlabelstringrequiredshapestringbox, rounded, pill, diamond, circle, cylinder, note.descriptionstringcolorstringdefault, blue, green, amber, red, violet, gray.groupstringchange_nodesobject[]Show child attributes
idstringrequiredlabelstringshapestringbox, rounded, pill, diamond, circle, cylinder, note, ``.descriptionstringcolorstringdefault, blue, green, amber, red, violet, gray, ``.groupstringremove_nodesstring[]add_edgesobject[]Show child attributes
fromstringrequiredtostringrequiredlabelstringstylestringsolid, dashed.arrowstringend, both, none.change_edgesobject[]Show child attributes
idstringrequiredfromstringtostringlabelstringstylestringsolid, dashed, ``.arrowstringend, both, none, ``.remove_edgesstring[]tidybooleanrender_diagram
See a diagram as people do: a screenshot of the whole diagram fitted to the view, plus checks — nodes not connected, decisions without labelled answers, long or repeated labels, empty groups — and errors the page hit.
Parameters
item_idstringrequiredwideboolean