mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel
This commit is contained in:
commit
03a45634d0
|
@ -0,0 +1,20 @@
|
|||
> curl --data @- -X PUT --dump - http://localhost:8529/_api/graph/graph1/edge/edge1
|
||||
{"optional2" : "val2"}
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
content-type: application/json; charset=utf-8
|
||||
|
||||
{
|
||||
"edge": {
|
||||
"_id": "e/edge1",
|
||||
"_rev": 57595391,
|
||||
"_key": "edge1",
|
||||
"_bidirectional": false,
|
||||
"_from": "v/vert2",
|
||||
"_to": "v/vert1",
|
||||
"$label": null,
|
||||
"optional2": "val2"
|
||||
},
|
||||
"error": false,
|
||||
"code": 200
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
> curl --data @- -X PUT --dump - http://localhost:8529/_api/graph/graph1/vertex/v1
|
||||
{"optional1" : "val2"}
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
content-type: application/json; charset=utf-8
|
||||
|
||||
{
|
||||
"vertex": {
|
||||
"_id": "v/v1",
|
||||
"_rev": 24332190,
|
||||
"_key": "v1",
|
||||
"optional1": "val2"
|
||||
},
|
||||
"error": false,
|
||||
"code": 200
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
> curl --data @- -X POST --dump - http://localhost:8529/_api/graph/graph1/edge
|
||||
{"_key" : "edge1", "_from" : "vert2", "_to" : "vert1", "optional1" : "val1"}
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
content-type: application/json; charset=utf-8
|
||||
|
||||
{
|
||||
"edge": {
|
||||
"_id": "e/edge1",
|
||||
"_rev": 57595366,
|
||||
"_key": "edge1",
|
||||
"_bidirectional": false,
|
||||
"_from": "v/vert2",
|
||||
"_to": "v/vert1",
|
||||
"$label": null,
|
||||
"optional1": "val1"
|
||||
},
|
||||
"error": false,
|
||||
"code": 200
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
> curl --data @- -X POST --dump - http://localhost:8529/_api/graph
|
||||
{"_name" : "graph1", "vertices" : "v", "edges" : "e"}
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
content-type: application/json; charset=utf-8
|
||||
|
||||
{
|
||||
"graph": {
|
||||
"_id": "_graphs/graph1",
|
||||
"_rev": 11767958,
|
||||
"_key": "graph1",
|
||||
"vertices": 9670806,
|
||||
"edges": 10588310
|
||||
},
|
||||
"error": false,
|
||||
"code": 200
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
> curl --data @- -X POST --dump - http://localhost:8529/_api/graph/graph1/vertex
|
||||
{"_key" : "v1", "optional1" : "val1", "optional2" : "val2"}
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
content-type: application/json; charset=utf-8
|
||||
|
||||
{
|
||||
"vertex": {
|
||||
"_id": "v/v1",
|
||||
"_rev": 24332177,
|
||||
"_key": "v1",
|
||||
"optional1": "val1",
|
||||
"optional2": "val2"
|
||||
},
|
||||
"error": false,
|
||||
"code": 200
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
> curl -X DELETE --dump - http://localhost:8529/_api/graph/graph1/edge/edge1
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
content-type: application/json; charset=utf-8
|
||||
|
||||
{
|
||||
"deleted": true,
|
||||
"error": false,
|
||||
"code": 200
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
> curl -X DELETE --dump - http://localhost:8529/_api/graph/graph1
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
content-type: application/json; charset=utf-8
|
||||
|
||||
{
|
||||
"deleted": true,
|
||||
"error": false,
|
||||
"code": 200
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
> curl -X DELETE --dump - http://localhost:8529/_api/graph/graph1/vertex/v1
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
content-type: application/json; charset=utf-8
|
||||
|
||||
{
|
||||
"deleted": true,
|
||||
"error": false,
|
||||
"code": 200
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
> curl -X GET --dump - http://localhost:8529/_api/graph/graph1/edge/edge1
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
content-type: application/json; charset=utf-8
|
||||
|
||||
{
|
||||
"edge": {
|
||||
"_id": "e/edge1",
|
||||
"_rev": 57595366,
|
||||
"_key": "edge1",
|
||||
"_bidirectional": false,
|
||||
"_from": "v/vert2",
|
||||
"_to": "v/vert1",
|
||||
"$label": null,
|
||||
"optional1": "val1"
|
||||
},
|
||||
"error": false,
|
||||
"code": 200
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
> curl --data @- -X POST --dump - http://localhost:8529/_api/graph/graph1/edges
|
||||
{"batchSize" : 100}
|
||||
|
||||
HTTP/1.1 201 Created
|
||||
content-type: application/json; charset=utf-8
|
||||
|
||||
{
|
||||
"result": [
|
||||
{
|
||||
"_id": "e/edge1",
|
||||
"_rev": 125407382,
|
||||
"_key": "edge1",
|
||||
"_bidirectional": false,
|
||||
"_from": "v/id1",
|
||||
"_to": "v/id2",
|
||||
"$label": null,
|
||||
"optional1": "val1a"
|
||||
},
|
||||
{
|
||||
"_id": "e/edge2",
|
||||
"_rev": 125800598,
|
||||
"_key": "edge2",
|
||||
"_bidirectional": false,
|
||||
"_from": "v/id2",
|
||||
"_to": "v/id3",
|
||||
"$label": null,
|
||||
"optional1": "val1b"
|
||||
},
|
||||
{
|
||||
"_id": "e/edge3",
|
||||
"_rev": 125800602,
|
||||
"_key": "edge3",
|
||||
"_bidirectional": false,
|
||||
"_from": "v/id3",
|
||||
"_to": "v/id4",
|
||||
"$label": null,
|
||||
"optional1": "val1c"
|
||||
},
|
||||
{
|
||||
"_id": "e/edge4",
|
||||
"_rev": 125808651,
|
||||
"_key": "edge4",
|
||||
"_bidirectional": false,
|
||||
"_from": "v/id4",
|
||||
"_to": "v/id5",
|
||||
"$label": null,
|
||||
"optional1": "val1d"
|
||||
}
|
||||
],
|
||||
"hasMore": false,
|
||||
"error": false,
|
||||
"code": 201
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
> curl -X GET --dump - http://localhost:8529/_api/graph/graph1
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
content-type: application/json; charset=utf-8
|
||||
|
||||
{
|
||||
"graph": {
|
||||
"_id": "_graphs/graph1",
|
||||
"_rev": 11767958,
|
||||
"_key": "graph1",
|
||||
"vertices": 9670806,
|
||||
"edges": 10588310
|
||||
},
|
||||
"error": false,
|
||||
"code": 200
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
> curl -X GET --dump - http://localhost:8529/_api/graph/graph1/vertex/v1
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
content-type: application/json; charset=utf-8
|
||||
|
||||
{
|
||||
"vertex": {
|
||||
"_id": "v/v1",
|
||||
"_rev": 24332177,
|
||||
"_key": "v1",
|
||||
"optional1": "val1",
|
||||
"optional2": "val2"
|
||||
},
|
||||
"error": false,
|
||||
"code": 200
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
> curl --data @- -X POST --dump - http://localhost:8529/_api/graph/graph1/edges/id2
|
||||
{"batchSize" : 100}
|
||||
|
||||
HTTP/1.1 201 Created
|
||||
content-type: application/json; charset=utf-8
|
||||
|
||||
{
|
||||
"result": [
|
||||
{
|
||||
"_id": "e/edge1",
|
||||
"_rev": 125407382,
|
||||
"_key": "edge1",
|
||||
"_bidirectional": false,
|
||||
"_from": "v/id1",
|
||||
"_to": "v/id2",
|
||||
"$label": null,
|
||||
"optional1": "val1a"
|
||||
},
|
||||
{
|
||||
"_id": "e/edge2",
|
||||
"_rev": 125800598,
|
||||
"_key": "edge2",
|
||||
"_bidirectional": false,
|
||||
"_from": "v/id2",
|
||||
"_to": "v/id3",
|
||||
"$label": null,
|
||||
"optional1": "val1b"
|
||||
}
|
||||
],
|
||||
"hasMore": false,
|
||||
"error": false,
|
||||
"code": 201
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
> curl --data @- -X POST --dump - http://localhost:8529/_api/grap/graph1/vertices/id2
|
||||
{"batchSize" : 100 }
|
||||
|
||||
HTTP/1.1 201 Created
|
||||
content-type: application/json; charset=utf-8
|
||||
|
||||
{
|
||||
"result": [
|
||||
{
|
||||
"_id": "v/id3",
|
||||
"_rev": 47810529,
|
||||
"_key": "id3",
|
||||
"optional2": 2,
|
||||
"optional1": "val1"
|
||||
},
|
||||
{
|
||||
"_id": "v/id1",
|
||||
"_rev": 47548385,
|
||||
"_key": "id1",
|
||||
"optional2": 1,
|
||||
"optional1": "val1"
|
||||
}
|
||||
],
|
||||
"hasMore": false,
|
||||
"error": false,
|
||||
"code": 201
|
||||
}
|
||||
|
||||
> curl --data @- -X POST --dump - http://localhost:8529/_api/grap/graph1/vertices/id2
|
||||
{"batchSize" : 100, "filter" : { "direction" : "out" } }
|
||||
|
||||
HTTP/1.1 201 Created
|
||||
content-type: application/json; charset=utf-8
|
||||
|
||||
{
|
||||
"result": [
|
||||
{
|
||||
"_id": "v/id3",
|
||||
"_rev": 47810529,
|
||||
"_key": "id3",
|
||||
"optional2": 2,
|
||||
"optional1": "val1"
|
||||
}
|
||||
],
|
||||
"hasMore": false,
|
||||
"error": false,
|
||||
"code": 201
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
> curl --data @- -X POST --dump - http://localhost:8529/_api/grap/graph1/vertices
|
||||
{"batchSize" : 100 }
|
||||
|
||||
HTTP/1.1 201 Created
|
||||
content-type: application/json; charset=utf-8
|
||||
|
||||
{
|
||||
"result": [
|
||||
{
|
||||
"_id": "v/id2",
|
||||
"_rev": 47744993,
|
||||
"_key": "id2",
|
||||
"optional2": 2,
|
||||
"optional1": "val1"
|
||||
},
|
||||
{
|
||||
"_id": "v/id3",
|
||||
"_rev": 47810529,
|
||||
"_key": "id3",
|
||||
"optional2": 2,
|
||||
"optional1": "val1"
|
||||
},
|
||||
{
|
||||
"_id": "v/id1",
|
||||
"_rev": 47548385,
|
||||
"_key": "id1",
|
||||
"optional2": 1,
|
||||
"optional1": "val1"
|
||||
},
|
||||
{
|
||||
"_id": "v/id5",
|
||||
"_rev": 48007137,
|
||||
"_key": "id5",
|
||||
"optional2": "val2"
|
||||
},
|
||||
{
|
||||
"_id": "v/id4",
|
||||
"_rev": 47876065,
|
||||
"_key": "id4",
|
||||
"optional2": 3,
|
||||
"optional1": "val1"
|
||||
}
|
||||
],
|
||||
"hasMore": false,
|
||||
"error": false,
|
||||
"code": 201
|
||||
}
|
|
@ -230,7 +230,7 @@
|
|||
///
|
||||
/// @EXAMPLES
|
||||
///
|
||||
/// @verbinclude api-blueprints-delete-graph
|
||||
/// @verbinclude api-graph-delete-graph
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function DELETE_graph_graph (req, res) {
|
||||
|
@ -505,7 +505,7 @@
|
|||
///
|
||||
/// Select all vertices
|
||||
///
|
||||
///
|
||||
/// @verbinclude api-graph-get-vertices
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function POST_graph_all_vertices (req, res, g) {
|
||||
|
@ -832,6 +832,7 @@
|
|||
///
|
||||
/// Select all edges
|
||||
///
|
||||
/// @verbinclude api-graph-get-edges
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function POST_graph_all_edges (req, res, g) {
|
||||
|
@ -911,6 +912,7 @@
|
|||
///
|
||||
/// Select all edges
|
||||
///
|
||||
/// @verbinclude api-graph-get-vertex-edges
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function POST_graph_vertex_edges (req, res, g) {
|
||||
|
|
Loading…
Reference in New Issue