Last active
December 16, 2015 22:29
-
-
Save justjake/5507712 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update = { | |
/* Two basic sections. */ | |
"Nodes": { | |
/* Nodes is a int->node map. | |
* nodes that already exist are updaasdted | |
* by the fields supplied in the Nodes section | |
* delete a node by passing `null` or a string as the value | |
* | |
* id, name, class fields required for new node creationjsdfA | |
* */ | |
// create node 1 | |
1: {id:1, name:"Router", classes:["server", "blue-team"], data:{ /* misc properties */ } }, | |
// update node 5 | |
5: {classes:["down", "compromised"], data:{ "last-owned-at": /*Native DATE here*/ "UTC-340033424derp"} }, | |
// fast delete 24445 | |
24445: null, | |
// delete with reason 512 | |
512: "hit with hammer" | |
} | |
"Edges": { | |
/* same deal as before, except with different required fields | |
* from: and to: are both Node IDs. | |
* classes is the same | |
*/ | |
// create | |
5334: {from: 1, to: 5, classes: ["http", "suspicious"]}, | |
// update | |
12223: {classes: ["port-scan"]}, | |
// delete - string with termination reason, or null to prune quickly | |
121: "client-terminated", | |
3233: null | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment