Skip to content

Instantly share code, notes, and snippets.

@spmallette
Created March 24, 2011 15:32
Show Gist options
  • Save spmallette/885254 to your computer and use it in GitHub Desktop.
Save spmallette/885254 to your computer and use it in GitHub Desktop.
curl to rexster
## post an edge
curl -d "" -v http://localhost:8182/graphs/dexsample/edges?_outV=1024\&_inV=1025\&_label=friend
curl -v -X POST -H "Content-Type:application/json" -d '{name:"willa"}' http://localhost:8182/graphs/tinkergraph/vertices/100
curl -v -d 'age=(integer,100)' -X POST http://localhost:8182/graphs/tinkergraph/vertices/1
curl -v -d 'age=(list,((i,100)))' -X POST http://localhost:8182/graphs/tinkergraph/vertices/1
curl -v -X POST -H "Content-Type:application/json" -d '{"script":"g.v(1)"}' http://localhost:8182/graphs/tinkergraph/tp/gremlin
curl -v -X POST -d "script=g.v(1)" http://localhost:8182/graphs/tinkergraph/tp/gremlin
curl -v -X POST -H "Content-Type:application/json" -d "@gremlin.script" http://localhost:8182/graphs/tinkergraph/tp/gremlin
curl -X POST -d "script=t=new Table();g.V.name.as('s').back(1).outE.label.as('p').back(1).inV.name.as('o').back(1).table(t)>>-1;t" http://localhost:8182/graphs/tinkergraph/tp/gremlin
#sail
curl -v -X POST http://localhost:8182/graphs/sailgraph/prefixes?namespace=http:%3A%2F%2Ftinkerpop.com%23\&prefix=tp
curl -v http://localhost:8182/graphs/sailgraph/vertices/rdf:1
curl -v http://localhost:8182/graphs/sailgraph/vertices/tp:1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment