Open nikhan opened 8 years ago
I don't quite understand:
POST /pattern?action=get
- method is POST, action is GET and it's an export? How is it different to GET /pattern
?PUT /pattern/{id}/state
- when would this be used?you POST an array of IDs -- this is for circumstances where you export a series of blocks without a root parent. I was thinking about offloading the operation that generates the copy JSON to the server, such that when you hit ctrl-c, it does this api call to recursively retrieve all JSON of selected blocks that does not require a root.
the second is if you want a store to have a specific value. so i can post my weights to a store or whatever.
API
GET /pattern
Get JSON for all nodes.POST /pattern
Import JSON without a parent group. expects JSON body[]CreateElement
GET /pattern?action=get&id=,,,
(recursive) Batch JSON export of nodes.POST /pattern?action=reset&id=,,,
(recursive) Batch reset nodes.POST /pattern?action=delete&id=,,,
(recursive) Batch delete nodes.POST /pattern?action=ungroup&id=,,,
Batch ungroup nodes. Each group deleted and all child nodes are given to their grandparent.POST /pattern?action=translate&x=<offset>&y=<offset>&id=,,,
Batch translate nodes by offset.GET /pattern/{id}
Get JSON of id and all descendants of id.POST /pattern/{id}
Import JSON with parent group of id. expects JSON body[]CreateElement
PUT /pattern/{id}
sets node root keys. expects JSON bodyUpdateElement
GET /pattern/{id}/state
returns node state (if applicable)PUT /pattern/{id}/state
sets node state (if applicable) expects JSON bodyPUT /pattern/{id}/routes/{route_id}
sets route state on a group (if applicable) expects JSON bodyUpdateElement
websocket client
subscription
websocket server
element creation
element translation
elements deleted
elements update alias
elements update position
element update group route alias
element update group route hidden
element status
pattern JSON
where element order is leaf-first