1
0
Fork 0

Merge branch 'devel' of github.com:arangodb/arangodb into devel

This commit is contained in:
Heiko Kernbach 2015-02-26 14:18:38 +01:00
commit 23a0e17018
529 changed files with 17115 additions and 749 deletions

View File

@ -5,6 +5,7 @@ branches:
- "1.4"
- "2.3"
- "2.4"
- "2.5"
language: cpp
compiler: g++

View File

@ -1,5 +1,5 @@
v2.5.0-alpha2 (2015-02-16)
--------------------------
v2.6.0 (XXXX-XX-XX)
-------------------
* fixed issue #1230: API: document/col-name/_key and cursor return different floats
@ -7,6 +7,8 @@ v2.5.0-alpha2 (2015-02-16)
v2.5.0-beta1 (2015-02-23)
-------------------------
* fixed issue #1256: agency binary not found #1256
* front-end: dashboard tries not to (re)load statistics if user has no access
* V8: Upgrade to version 3.31.74.1
@ -30,7 +32,7 @@ v2.5.0-beta1 (2015-02-23)
* Moved Foxx applications to a different folder.
The naming convention now is: <app-path>/_db/<dbname>/<mointpoint>/APP
The naming convention now is: <app-path>/_db/<dbname>/<mountpoint>/APP
Before it was: <app-path>/databases/<dbname>/<appname>:<appversion>
This caused some trouble as apps where cached based on name and version and updates did not apply.
Hence the path on filesystem and the app's access URL had no relation to one another.

View File

@ -167,6 +167,15 @@ if (USE_VISTA_LOCKS)
add_definitions("-DTRI_WINDOWS_VISTA_LOCKS=1")
endif ()
################################################################################
### @brief etcd
################################################################################
if (DARWIN)
install(PROGRAMS ${PROJECT_SOURCE_DIR}/bin/etcd-arango
DESTINATION ${TRI_BINDIR_INSTALL})
endif ()
## -----------------------------------------------------------------------------
## --SECTION-- DIRECTORIES
## -----------------------------------------------------------------------------
@ -266,13 +275,8 @@ if (USE_RELATIVE)
### @brief TRI_BINDIR
################################################################################
if (MSVC)
set(TRI_BINDIR_INSTALL "bin")
set(TRI_BINDIR "${CMAKE_INSTALL_PREFIX}/bin")
else ()
set(TRI_BINDIR_INSTALL "bin")
set(TRI_BINDIR "${CMAKE_INSTALL_PREFIX}/bin")
endif ()
set(TRI_BINDIR_INSTALL "bin")
set(TRI_BINDIR "${CMAKE_INSTALL_PREFIX}/bin")
################################################################################
### @brief TRI_SBINDIR

View File

@ -21,11 +21,9 @@ Key features include:
* **Replication** and **Sharding**: set up the database in a master-slave configuration or spread bigger datasets across multiple servers
* It is **open source** (Apache Licence 2.0)
In this documentation you can inform yourself about all the functions, features and programs ArangoDB provides for you.
In this documentation you can inform yourself about all the functions, features and programs ArangoDB provides for you.
If you want to test the shell go [here](https://www.arangodb.com/shtutorial/).
If you want to play with our query language, go to our [AQL Tutorial](https://www.arangodb.com/aqltutorial/).
You can also go to our [cookbook](https://docs.arangodb.com/cookbook) and look through some recipes to learn more about ArangoDB specific problems and solutions.
!SUBSECTION Community

View File

@ -0,0 +1,5 @@
arangosh> col = db.example;
[ArangoCollection 950544547, "example" (type document, status loaded)]
arangosh> col.unload();
arangosh> col;
[ArangoCollection 950544547, "example" (type document, status unloaded)]

View File

@ -0,0 +1,20 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/gharial/social/edge/relation
{
"type" : "friend",
"_from" : "female/alice",
"_to" : "female/diana"
}
HTTP/1.1 202 Accepted
content-type: application/json
etag: 1492854947
{
"error" : false,
"code" : 202,
"edge" : {
"_id" : "relation/1492854947",
"_rev" : "1492854947",
"_key" : "1492854947"
}
}

View File

@ -0,0 +1,49 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/gharial/social/edge
{
"collection" : "lives_in",
"from" : [
"female",
"male"
],
"to" : [
"city"
]
}
HTTP/1.1 201 Created
content-type: application/json
etag: 1453467811
{
"error" : false,
"code" : 201,
"graph" : {
"name" : "social",
"edgeDefinitions" : [
{
"collection" : "relation",
"from" : [
"female",
"male"
],
"to" : [
"female",
"male"
]
},
{
"collection" : "lives_in",
"from" : [
"female",
"male"
],
"to" : [
"city"
]
}
],
"orphanCollections" : [ ],
"_id" : "_graphs/social",
"_rev" : "1453467811"
}
}

View File

@ -0,0 +1,18 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/gharial/social/vertex/male
{
"name" : "Francis"
}
HTTP/1.1 202 Accepted
content-type: application/json
etag: 1470245027
{
"error" : false,
"code" : 202,
"vertex" : {
"_id" : "male/1470245027",
"_rev" : "1470245027",
"_key" : "1470245027"
}
}

View File

@ -0,0 +1,34 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/gharial/social/vertex
{
"collection" : "otherVertices"
}
HTTP/1.1 201 Created
content-type: application/json
etag: 1436166307
{
"error" : false,
"code" : 201,
"graph" : {
"name" : "social",
"edgeDefinitions" : [
{
"collection" : "relation",
"from" : [
"female",
"male"
],
"to" : [
"female",
"male"
]
}
],
"orphanCollections" : [
"otherVertices"
],
"_id" : "_graphs/social",
"_rev" : "1436166307"
}
}

View File

@ -0,0 +1,41 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/gharial
{
"name" : "myGraph",
"edgeDefinitions" : [
{
"collection" : "edges",
"from" : [
"startVertices"
],
"to" : [
"endVertices"
]
}
]
}
HTTP/1.1 201 Created
content-type: application/json
etag: 1423911075
{
"error" : false,
"code" : 201,
"graph" : {
"name" : "myGraph",
"edgeDefinitions" : [
{
"collection" : "edges",
"from" : [
"startVertices"
],
"to" : [
"endVertices"
]
}
],
"orphanCollections" : [ ],
"_id" : "_graphs/myGraph",
"_rev" : "1423911075"
}
}

View File

@ -0,0 +1,10 @@
shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/gharial/social/edge/relation/aliceAndBob
HTTP/1.1 202 Accepted
content-type: application/json
{
"error" : false,
"code" : 202,
"removed" : true
}

View File

@ -0,0 +1,10 @@
shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/gharial/social/vertex/female/alice
HTTP/1.1 202 Accepted
content-type: application/json
{
"error" : false,
"code" : 202,
"removed" : true
}

View File

@ -0,0 +1,10 @@
shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/gharial/social
HTTP/1.1 200 OK
content-type: application/json
{
"error" : false,
"code" : 200,
"removed" : true
}

View File

@ -0,0 +1,20 @@
shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/gharial/social/edge/relation
HTTP/1.1 200 OK
content-type: application/json
etag: 1463429283
{
"error" : false,
"code" : 200,
"graph" : {
"name" : "social",
"edgeDefinitions" : [ ],
"orphanCollections" : [
"female",
"male"
],
"_id" : "_graphs/social",
"_rev" : "1463429283"
}
}

View File

@ -0,0 +1,18 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_api/gharial/social/edge/relation/aliceAndBob
HTTP/1.1 200 OK
content-type: application/json
etag: 1495869603
{
"error" : false,
"code" : 200,
"edge" : {
"_id" : "relation/aliceAndBob",
"_key" : "aliceAndBob",
"_rev" : "1495869603",
"_from" : "female/alice",
"_to" : "male/bob",
"type" : "married"
}
}

View File

@ -0,0 +1,27 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_api/gharial/myGraph
HTTP/1.1 200 OK
content-type: application/json
etag: 1425549475
{
"error" : false,
"code" : 200,
"graph" : {
"name" : "myGraph",
"edgeDefinitions" : [
{
"collection" : "edges",
"from" : [
"startVertices"
],
"to" : [
"endVertices"
]
}
],
"orphanCollections" : [ ],
"_id" : "_graphs/myGraph",
"_rev" : "1425549475"
}
}

View File

@ -0,0 +1,16 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_api/gharial/social/vertex/female/alice
HTTP/1.1 200 OK
content-type: application/json
etag: 1472211107
{
"error" : false,
"code" : 200,
"vertex" : {
"_id" : "female/alice",
"_key" : "alice",
"_rev" : "1472211107",
"name" : "Alice"
}
}

View File

@ -0,0 +1,67 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_api/gharial
HTTP/1.1 200 OK
content-type: application/json
{
"error" : false,
"code" : 202,
"graphs" : [
{
"_id" : "_graphs/social",
"_key" : "social",
"_rev" : "1401759907",
"edgeDefinitions" : [
{
"collection" : "relation",
"from" : [
"female",
"male"
],
"to" : [
"female",
"male"
]
}
],
"orphanCollections" : [ ]
},
{
"_id" : "_graphs/routeplanner",
"_key" : "routeplanner",
"_rev" : "1406085283",
"orphanCollections" : [ ],
"edgeDefinitions" : [
{
"collection" : "germanHighway",
"from" : [
"germanCity"
],
"to" : [
"germanCity"
]
},
{
"collection" : "frenchHighway",
"from" : [
"frenchCity"
],
"to" : [
"frenchCity"
]
},
{
"collection" : "internationalHighway",
"from" : [
"frenchCity",
"germanCity"
],
"to" : [
"frenchCity",
"germanCity"
]
}
]
}
]
}

View File

@ -0,0 +1,12 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_api/gharial/social/edge
HTTP/1.1 200 OK
content-type: application/json
{
"error" : false,
"code" : 200,
"collections" : [
"relation"
]
}

View File

@ -0,0 +1,13 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_api/gharial/social/vertex
HTTP/1.1 200 OK
content-type: application/json
{
"error" : false,
"code" : 200,
"collections" : [
"female",
"male"
]
}

View File

@ -0,0 +1,19 @@
shell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/gharial/social/vertex/female/alice
{
"age" : 26
}
HTTP/1.1 202 Accepted
content-type: application/json
etag: 1483417763
{
"error" : false,
"code" : 202,
"vertex" : {
"_id" : "female/alice",
"_rev" : "1483417763",
"_oldRev" : "1480927395",
"_key" : "alice"
}
}

View File

@ -0,0 +1,19 @@
shell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/gharial/social/edge/relation/aliceAndBob
{
"since" : "01.01.2001"
}
HTTP/1.1 202 Accepted
content-type: application/json
etag: 1505765539
{
"error" : false,
"code" : 202,
"edge" : {
"_id" : "relation/aliceAndBob",
"_rev" : "1505765539",
"_oldRev" : "1504323747",
"_key" : "aliceAndBob"
}
}

View File

@ -0,0 +1,19 @@
shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/gharial/social/edge/relation/aliceAndBob
{
"type" : "divorced"
}
HTTP/1.1 202 Accepted
content-type: application/json
etag: 1501309091
{
"error" : false,
"code" : 202,
"edge" : {
"_id" : "relation/aliceAndBob",
"_rev" : "1501309091",
"_oldRev" : "1499998371",
"_key" : "aliceAndBob"
}
}

View File

@ -0,0 +1,29 @@
shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/gharial/social/vertex/otherVertices
HTTP/1.1 200 OK
content-type: application/json
etag: 1443113123
{
"error" : false,
"code" : 200,
"graph" : {
"name" : "social",
"edgeDefinitions" : [
{
"collection" : "relation",
"from" : [
"female",
"male"
],
"to" : [
"female",
"male"
]
}
],
"orphanCollections" : [ ],
"_id" : "_graphs/social",
"_rev" : "1443113123"
}
}

View File

@ -0,0 +1,11 @@
shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/gharial/social/vertex/male
HTTP/1.1 400 Bad Request
content-type: application/json
{
"error" : true,
"code" : 400,
"errorNum" : 1928,
"errorMessage" : "not in orphan collection"
}

View File

@ -0,0 +1,44 @@
shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/gharial/social/edge/relation
{
"collection" : "relation",
"from" : [
"female",
"male",
"animal"
],
"to" : [
"female",
"male",
"animal"
]
}
HTTP/1.1 200 OK
content-type: application/json
etag: 1458514083
{
"error" : false,
"code" : 200,
"graph" : {
"name" : "social",
"edgeDefinitions" : [
{
"collection" : "relation",
"from" : [
"animal",
"female",
"male"
],
"to" : [
"animal",
"female",
"male"
]
}
],
"orphanCollections" : [ ],
"_id" : "_graphs/social",
"_rev" : "1458514083"
}
}

View File

@ -0,0 +1,20 @@
shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/gharial/social/vertex/female/alice
{
"name" : "Alice Cooper",
"age" : 26
}
HTTP/1.1 202 Accepted
content-type: application/json
etag: 1478895779
{
"error" : false,
"code" : 202,
"vertex" : {
"_id" : "female/alice",
"_rev" : "1478895779",
"_oldRev" : "1476405411",
"_key" : "alice"
}
}

View File

@ -0,0 +1,125 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_admin/statistics
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
{
"time" : 1424684829.707911,
"system" : {
"minorPageFaults" : 57279,
"majorPageFaults" : 2910,
"userTime" : 7.274074,
"systemTime" : 4.557473,
"numberOfThreads" : 28,
"residentSize" : 162291712,
"residentSizePercent" : 0.03778648376464844,
"virtualSize" : 5116907520
},
"client" : {
"httpConnections" : 1,
"connectionTime" : {
"sum" : 0.0015668869018554688,
"count" : 1,
"counts" : [
1,
0,
0,
0
]
},
"totalTime" : {
"sum" : 25.4695987701416,
"count" : 10674,
"counts" : [
10184,
413,
34,
38,
4,
0,
1
]
},
"requestTime" : {
"sum" : 23.66250491142273,
"count" : 10674,
"counts" : [
10197,
401,
34,
37,
4,
0,
1
]
},
"queueTime" : {
"sum" : 0.32120800018310547,
"count" : 10674,
"counts" : [
10672,
2,
0,
0,
0,
0,
0
]
},
"ioTime" : {
"sum" : 1.4858858585357666,
"count" : 10674,
"counts" : [
10671,
2,
0,
1,
0,
0,
0
]
},
"bytesSent" : {
"sum" : 3939808,
"count" : 10674,
"counts" : [
2796,
7713,
21,
12,
132,
0
]
},
"bytesReceived" : {
"sum" : 2314675,
"count" : 10674,
"counts" : [
8837,
1837,
0,
0,
0,
0
]
}
},
"http" : {
"requestsTotal" : 10675,
"requestsAsync" : 0,
"requestsGet" : 3818,
"requestsHead" : 339,
"requestsPost" : 4751,
"requestsPut" : 730,
"requestsPatch" : 31,
"requestsDelete" : 1006,
"requestsOptions" : 0,
"requestsOther" : 0
},
"server" : {
"uptime" : 35.26790189743042,
"physicalMemory" : 4294967296
},
"error" : false,
"code" : 200
}

View File

@ -0,0 +1,292 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_admin/statistics-description
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
{
"groups" : [
{
"group" : "system",
"name" : "Process Statistics",
"description" : "Statistics about the ArangoDB process"
},
{
"group" : "client",
"name" : "Client Connection Statistics",
"description" : "Statistics about the connections."
},
{
"group" : "http",
"name" : "HTTP Request Statistics",
"description" : "Statistics about the HTTP requests."
},
{
"group" : "server",
"name" : "Server Statistics",
"description" : "Statistics about the ArangoDB server"
}
],
"figures" : [
{
"group" : "system",
"identifier" : "userTime",
"name" : "User Time",
"description" : "Amount of time that this process has been scheduled in user mode, measured in seconds.",
"type" : "accumulated",
"units" : "seconds"
},
{
"group" : "system",
"identifier" : "systemTime",
"name" : "System Time",
"description" : "Amount of time that this process has been scheduled in kernel mode, measured in seconds.",
"type" : "accumulated",
"units" : "seconds"
},
{
"group" : "system",
"identifier" : "numberOfThreads",
"name" : "Number of Threads",
"description" : "Number of threads in the arangod process.",
"type" : "current",
"units" : "number"
},
{
"group" : "system",
"identifier" : "residentSize",
"name" : "Resident Set Size",
"description" : "The total size of the number of pages the process has in real memory. This is just the pages which count toward text, data, or stack space. This does not include pages which have not been demand-loaded in, or which are swapped out. The resident set size is reported in bytes.",
"type" : "current",
"units" : "bytes"
},
{
"group" : "system",
"identifier" : "residentSizePercent",
"name" : "Resident Set Size",
"description" : "The percentage of physical memory used by the process as resident set size.",
"type" : "current",
"units" : "percent"
},
{
"group" : "system",
"identifier" : "virtualSize",
"name" : "Virtual Memory Size",
"description" : "On Windows, this figure contains the total amount of memory that the memory manager has committed for the arangod process. On other systems, this figure contains The size of the virtual memory the process is using.",
"type" : "current",
"units" : "bytes"
},
{
"group" : "system",
"identifier" : "minorPageFaults",
"name" : "Minor Page Faults",
"description" : "The number of minor faults the process has made which have not required loading a memory page from disk. This figure is not reported on Windows.",
"type" : "accumulated",
"units" : "number"
},
{
"group" : "system",
"identifier" : "majorPageFaults",
"name" : "Major Page Faults",
"description" : "On Windows, this figure contains the total number of page faults. On other system, this figure contains the number of major faults the process has made which have required loading a memory page from disk.",
"type" : "accumulated",
"units" : "number"
},
{
"group" : "client",
"identifier" : "httpConnections",
"name" : "Client Connections",
"description" : "The number of connections that are currently open.",
"type" : "current",
"units" : "number"
},
{
"group" : "client",
"identifier" : "totalTime",
"name" : "Total Time",
"description" : "Total time needed to answer a request.",
"type" : "distribution",
"cuts" : [
0.01,
0.05,
0.1,
0.2,
0.5,
1
],
"units" : "seconds"
},
{
"group" : "client",
"identifier" : "requestTime",
"name" : "Request Time",
"description" : "Request time needed to answer a request.",
"type" : "distribution",
"cuts" : [
0.01,
0.05,
0.1,
0.2,
0.5,
1
],
"units" : "seconds"
},
{
"group" : "client",
"identifier" : "queueTime",
"name" : "Queue Time",
"description" : "Queue time needed to answer a request.",
"type" : "distribution",
"cuts" : [
0.01,
0.05,
0.1,
0.2,
0.5,
1
],
"units" : "seconds"
},
{
"group" : "client",
"identifier" : "bytesSent",
"name" : "Bytes Sent",
"description" : "Bytes sents for a request.",
"type" : "distribution",
"cuts" : [
250,
1000,
2000,
5000,
10000
],
"units" : "bytes"
},
{
"group" : "client",
"identifier" : "bytesReceived",
"name" : "Bytes Received",
"description" : "Bytes receiveds for a request.",
"type" : "distribution",
"cuts" : [
250,
1000,
2000,
5000,
10000
],
"units" : "bytes"
},
{
"group" : "client",
"identifier" : "connectionTime",
"name" : "Connection Time",
"description" : "Total connection time of a client.",
"type" : "distribution",
"cuts" : [
0.1,
1,
60
],
"units" : "seconds"
},
{
"group" : "http",
"identifier" : "requestsTotal",
"name" : "Total requests",
"description" : "Total number of HTTP requests.",
"type" : "accumulated",
"units" : "number"
},
{
"group" : "http",
"identifier" : "requestsAsync",
"name" : "Async requests",
"description" : "Number of asynchronously executed HTTP requests.",
"type" : "accumulated",
"units" : "number"
},
{
"group" : "http",
"identifier" : "requestsGet",
"name" : "HTTP GET requests",
"description" : "Number of HTTP GET requests.",
"type" : "accumulated",
"units" : "number"
},
{
"group" : "http",
"identifier" : "requestsHead",
"name" : "HTTP HEAD requests",
"description" : "Number of HTTP HEAD requests.",
"type" : "accumulated",
"units" : "number"
},
{
"group" : "http",
"identifier" : "requestsPost",
"name" : "HTTP POST requests",
"description" : "Number of HTTP POST requests.",
"type" : "accumulated",
"units" : "number"
},
{
"group" : "http",
"identifier" : "requestsPut",
"name" : "HTTP PUT requests",
"description" : "Number of HTTP PUT requests.",
"type" : "accumulated",
"units" : "number"
},
{
"group" : "http",
"identifier" : "requestsPatch",
"name" : "HTTP PATCH requests",
"description" : "Number of HTTP PATCH requests.",
"type" : "accumulated",
"units" : "number"
},
{
"group" : "http",
"identifier" : "requestsDelete",
"name" : "HTTP DELETE requests",
"description" : "Number of HTTP DELETE requests.",
"type" : "accumulated",
"units" : "number"
},
{
"group" : "http",
"identifier" : "requestsOptions",
"name" : "HTTP OPTIONS requests",
"description" : "Number of HTTP OPTIONS requests.",
"type" : "accumulated",
"units" : "number"
},
{
"group" : "http",
"identifier" : "requestsOther",
"name" : "other HTTP requests",
"description" : "Number of other HTTP requests.",
"type" : "accumulated",
"units" : "number"
},
{
"group" : "server",
"identifier" : "uptime",
"name" : "Server Uptime",
"description" : "Number of seconds elapsed since server start.",
"type" : "current",
"units" : "seconds"
},
{
"group" : "server",
"identifier" : "physicalMemory",
"name" : "Physical Memory",
"description" : "Physical memory in bytes.",
"type" : "current",
"units" : "bytes"
}
],
"error" : false,
"code" : 200
}

View File

@ -0,0 +1,10 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/aqlfunction
{"name":"myfunctions::temperature::celsiustofahrenheit","code":"function (celsius) { return celsius * 1.8 + 32; }"}
HTTP/1.1 201 Created
content-type: application/json; charset=utf-8
{
"error" : false,
"code" : 201
}

View File

@ -0,0 +1,9 @@
shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/aqlfunction/square::x::y
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
{
"error" : false,
"code" : 200
}

View File

@ -0,0 +1,11 @@
shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/aqlfunction/myfunction::x::y
HTTP/1.1 404 Not Found
content-type: application/json; charset=utf-8
{
"error" : true,
"code" : 404,
"errorNum" : 1582,
"errorMessage" : "user function '%s()' not found"
}

View File

@ -0,0 +1,6 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_api/aqlfunction
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
[ ]

View File

@ -0,0 +1,17 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/batch
--SomeBoundaryValue
Content-Type: application/x-arango-batchpart
DELETE /_api/collection/notexisting1 HTTP/1.1
--SomeBoundaryValue
Content-Type: application/x-arango-batchpart
DELETE /_api/collection/notexisting2 HTTP/1.1
--SomeBoundaryValue--
HTTP/1.1 200 OK
x-arango-errors: 2
"--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\n\r\nHTTP/1.1 404 Not Found\r\nContent-Type: application/json; charset=utf-8\r\nContent-Length: 92\r\n\r\n{\"error\":true,\"code\":404,\"errorNum\":1203,\"errorMessage\":\"unknown collection 'notexisting1'\"}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\n\r\nHTTP/1.1 404 Not Found\r\nContent-Type: application/json; charset=utf-8\r\nContent-Length: 92\r\n\r\n{\"error\":true,\"code\":404,\"errorNum\":1203,\"errorMessage\":\"unknown collection 'notexisting2'\"}\r\n--SomeBoundaryValue--"

View File

@ -0,0 +1,40 @@
shell> curl -X POST --header 'Content-Type: multipart/form-data; boundary=SomeBoundaryValue' --data-binary @- --dump - http://localhost:8529/_api/batch
--SomeBoundaryValue
Content-Type: application/x-arango-batchpart
Content-Id: myId1
GET /_api/version HTTP/1.1
--SomeBoundaryValue
Content-Type: application/x-arango-batchpart
Content-Id: myId2
DELETE /_api/collection/products HTTP/1.1
--SomeBoundaryValue
Content-Type: application/x-arango-batchpart
Content-Id: someId
POST /_api/collection/products HTTP/1.1
{ "name": "products" }
--SomeBoundaryValue
Content-Type: application/x-arango-batchpart
Content-Id: nextId
GET /_api/collection/products/figures HTTP/1.1
--SomeBoundaryValue
Content-Type: application/x-arango-batchpart
Content-Id: otherId
DELETE /_api/collection/products HTTP/1.1
--SomeBoundaryValue--
HTTP/1.1 200 OK
content-type: multipart/form-data; boundary=SomeBoundaryValue
x-arango-errors: 1
"--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: myId1\r\n\r\nHTTP/1.1 200 OK\r\nContent-Type: application/json; charset=utf-8\r\nContent-Length: 43\r\n\r\n{\"server\":\"arango\",\"version\":\"2.5.0-beta1\"}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: myId2\r\n\r\nHTTP/1.1 404 Not Found\r\nContent-Type: application/json; charset=utf-8\r\nContent-Length: 88\r\n\r\n{\"error\":true,\"code\":404,\"errorNum\":1203,\"errorMessage\":\"unknown collection 'products'\"}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: someId\r\n\r\nHTTP/1.1 200 OK\r\nLocation: /_db/_system/_api/collection/products\r\nContent-Type: application/json; charset=utf-8\r\nContent-Length: 138\r\n\r\n{\"id\":\"1510418595\",\"name\":\"products\",\"waitForSync\":false,\"isVolatile\":false,\"isSystem\":false,\"status\":3,\"type\":2,\"error\":false,\"code\":200}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: nextId\r\n\r\nHTTP/1.1 200 OK\r\nLocation: /_db/_system/_api/collection/products/figures\r\nContent-Type: application/json; charset=utf-8\r\nContent-Length: 618\r\n\r\n{\"id\":\"1510418595\",\"name\":\"products\",\"isSystem\":false,\"doCompact\":true,\"isVolatile\":false,\"journalSize\":1048576,\"keyOptions\":{\"type\":\"traditional\",\"allowUserKeys\":true},\"waitForSync\":false,\"count\":0,\"figures\":{\"alive\":{\"count\":0,\"size\":0},\"dead\":{\"count\":0,\"size\":0,\"deletion\":0},\"datafiles\":{\"count\":0,\"fileSize\":0},\"journals\":{\"count\":0,\"fileSize\":0},\"compactors\":{\"count\":0,\"fileSize\":0},\"shapefiles\":{\"count\":0,\"fileSize\":0},\"shapes\":{\"count\":0,\"size\":0},\"attributes\":{\"count\":0,\"size\":0},\"indexes\":{\"count\":1,\"size\":2008},\"lastTick\":\"0\",\"uncollectedLogfileEntries\":0},\"status\":3,\"type\":2,\"error\":false,\"code\":200}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: otherId\r\n\r\nHTTP/1.1 200 OK\r\nContent-Type: application/json; charset=utf-8\r\nContent-Length: 44\r\n\r\n{\"id\":\"1510418595\",\"error\":false,\"code\":200}\r\n--SomeBoundaryValue--"

View File

@ -0,0 +1,36 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/collection
{"name":"testCollectionBasics"}
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
location: /_db/_system/_api/collection/testCollectionBasics
{
"id" : "1373513891",
"name" : "testCollectionBasics",
"waitForSync" : false,
"isVolatile" : false,
"isSystem" : false,
"status" : 3,
"type" : 2,
"error" : false,
"code" : 200
}
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/collection
{"name":"testCollectionEdges","type":3}
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
location: /_db/_system/_api/collection/testCollectionEdges
{
"id" : "1373644963",
"name" : "testCollectionEdges",
"waitForSync" : false,
"isVolatile" : false,
"isSystem" : false,
"status" : 3,
"type" : 3,
"error" : false,
"code" : 200
}

View File

@ -0,0 +1,18 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/collection
{"name":"testCollectionUsers","keyOptions":{"type":"autoincrement","increment":5,"allowUserKeys":true}}
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
location: /_db/_system/_api/collection/testCollectionUsers
{
"id" : "1373907107",
"name" : "testCollectionUsers",
"waitForSync" : false,
"isVolatile" : false,
"isSystem" : false,
"status" : 3,
"type" : 2,
"error" : false,
"code" : 200
}

View File

@ -0,0 +1,10 @@
shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/collection/1399859363
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
{
"id" : "1399859363",
"error" : false,
"code" : 200
}

View File

@ -0,0 +1,10 @@
shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/collection/products1
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
{
"id" : "1400055971",
"error" : false,
"code" : 200
}

View File

@ -0,0 +1,489 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_api/collection
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
{
"collections" : [
{
"id" : "1086662819",
"name" : "frenchCity",
"isSystem" : false,
"status" : 3,
"type" : 2
},
{
"id" : "4663459",
"name" : "_statisticsRaw",
"isSystem" : true,
"status" : 3,
"type" : 2
},
{
"id" : "2435235",
"name" : "_routing",
"isSystem" : true,
"status" : 3,
"type" : 2
},
{
"id" : "5056675",
"name" : "_statistics",
"isSystem" : true,
"status" : 3,
"type" : 2
},
{
"id" : "1063004323",
"name" : "male",
"isSystem" : false,
"status" : 3,
"type" : 2
},
{
"id" : "141475",
"name" : "_configuration",
"isSystem" : true,
"status" : 3,
"type" : 2
},
{
"id" : "5449891",
"name" : "_statistics15",
"isSystem" : true,
"status" : 3,
"type" : 2
},
{
"id" : "1001597091",
"name" : "Company",
"isSystem" : false,
"status" : 3,
"type" : 2
},
{
"id" : "1086531747",
"name" : "germanHighway",
"isSystem" : false,
"status" : 3,
"type" : 3
},
{
"id" : "4532387",
"name" : "_aqlfunctions",
"isSystem" : true,
"status" : 3,
"type" : 2
},
{
"id" : "2304163",
"name" : "_modules",
"isSystem" : true,
"status" : 3,
"type" : 2
},
{
"id" : "6301859",
"name" : "_jobs",
"isSystem" : true,
"status" : 3,
"type" : 2
},
{
"id" : "1001990307",
"name" : "has_bought",
"isSystem" : false,
"status" : 3,
"type" : 3
},
{
"id" : "1086924963",
"name" : "internationalHighway",
"isSystem" : false,
"status" : 3,
"type" : 3
},
{
"id" : "7153827",
"name" : "_apps",
"isSystem" : true,
"status" : 3,
"type" : 2
},
{
"id" : "1181624483",
"name" : "edges2",
"isSystem" : false,
"status" : 3,
"type" : 3
},
{
"id" : "1062873251",
"name" : "female",
"isSystem" : false,
"status" : 3,
"type" : 2
},
{
"id" : "805382307",
"name" : "geo",
"isSystem" : false,
"status" : 3,
"type" : 2
},
{
"id" : "1001466019",
"name" : "friend_of",
"isSystem" : false,
"status" : 3,
"type" : 3
},
{
"id" : "1086400675",
"name" : "germanCity",
"isSystem" : false,
"status" : 3,
"type" : 2
},
{
"id" : "17311907",
"name" : "_system_sessions_sessions",
"isSystem" : true,
"status" : 3,
"type" : 2
},
{
"id" : "403619",
"name" : "_users",
"isSystem" : true,
"status" : 3,
"type" : 2
},
{
"id" : "2173091",
"name" : "_graphs",
"isSystem" : true,
"status" : 3,
"type" : 2
},
{
"id" : "6170787",
"name" : "_queues",
"isSystem" : true,
"status" : 3,
"type" : 2
},
{
"id" : "1001859235",
"name" : "Electronics",
"isSystem" : false,
"status" : 3,
"type" : 2
},
{
"id" : "1086793891",
"name" : "frenchHighway",
"isSystem" : false,
"status" : 3,
"type" : 3
},
{
"id" : "1180182691",
"name" : "vertices1",
"isSystem" : false,
"status" : 3,
"type" : 2
},
{
"id" : "2566307",
"name" : "_cluster_kickstarter_plans",
"isSystem" : true,
"status" : 3,
"type" : 2
},
{
"id" : "1001334947",
"name" : "Customer",
"isSystem" : false,
"status" : 3,
"type" : 2
},
{
"id" : "1063135395",
"name" : "relation",
"isSystem" : false,
"status" : 3,
"type" : 3
},
{
"id" : "1092036771",
"name" : "animals",
"isSystem" : false,
"status" : 3,
"type" : 2
},
{
"id" : "1091119267",
"name" : "demo",
"isSystem" : false,
"status" : 3,
"type" : 2
},
{
"id" : "758917283",
"name" : "better-example",
"isSystem" : false,
"status" : 3,
"type" : 2
},
{
"id" : "1001728163",
"name" : "Groceries",
"isSystem" : false,
"status" : 3,
"type" : 2
}
],
"names" : {
"frenchCity" : {
"id" : "1086662819",
"name" : "frenchCity",
"isSystem" : false,
"status" : 3,
"type" : 2
},
"_statisticsRaw" : {
"id" : "4663459",
"name" : "_statisticsRaw",
"isSystem" : true,
"status" : 3,
"type" : 2
},
"_routing" : {
"id" : "2435235",
"name" : "_routing",
"isSystem" : true,
"status" : 3,
"type" : 2
},
"_statistics" : {
"id" : "5056675",
"name" : "_statistics",
"isSystem" : true,
"status" : 3,
"type" : 2
},
"male" : {
"id" : "1063004323",
"name" : "male",
"isSystem" : false,
"status" : 3,
"type" : 2
},
"_configuration" : {
"id" : "141475",
"name" : "_configuration",
"isSystem" : true,
"status" : 3,
"type" : 2
},
"_statistics15" : {
"id" : "5449891",
"name" : "_statistics15",
"isSystem" : true,
"status" : 3,
"type" : 2
},
"Company" : {
"id" : "1001597091",
"name" : "Company",
"isSystem" : false,
"status" : 3,
"type" : 2
},
"germanHighway" : {
"id" : "1086531747",
"name" : "germanHighway",
"isSystem" : false,
"status" : 3,
"type" : 3
},
"_aqlfunctions" : {
"id" : "4532387",
"name" : "_aqlfunctions",
"isSystem" : true,
"status" : 3,
"type" : 2
},
"_modules" : {
"id" : "2304163",
"name" : "_modules",
"isSystem" : true,
"status" : 3,
"type" : 2
},
"_jobs" : {
"id" : "6301859",
"name" : "_jobs",
"isSystem" : true,
"status" : 3,
"type" : 2
},
"has_bought" : {
"id" : "1001990307",
"name" : "has_bought",
"isSystem" : false,
"status" : 3,
"type" : 3
},
"internationalHighway" : {
"id" : "1086924963",
"name" : "internationalHighway",
"isSystem" : false,
"status" : 3,
"type" : 3
},
"_apps" : {
"id" : "7153827",
"name" : "_apps",
"isSystem" : true,
"status" : 3,
"type" : 2
},
"edges2" : {
"id" : "1181624483",
"name" : "edges2",
"isSystem" : false,
"status" : 3,
"type" : 3
},
"female" : {
"id" : "1062873251",
"name" : "female",
"isSystem" : false,
"status" : 3,
"type" : 2
},
"geo" : {
"id" : "805382307",
"name" : "geo",
"isSystem" : false,
"status" : 3,
"type" : 2
},
"friend_of" : {
"id" : "1001466019",
"name" : "friend_of",
"isSystem" : false,
"status" : 3,
"type" : 3
},
"germanCity" : {
"id" : "1086400675",
"name" : "germanCity",
"isSystem" : false,
"status" : 3,
"type" : 2
},
"_system_sessions_sessions" : {
"id" : "17311907",
"name" : "_system_sessions_sessions",
"isSystem" : true,
"status" : 3,
"type" : 2
},
"_users" : {
"id" : "403619",
"name" : "_users",
"isSystem" : true,
"status" : 3,
"type" : 2
},
"_graphs" : {
"id" : "2173091",
"name" : "_graphs",
"isSystem" : true,
"status" : 3,
"type" : 2
},
"_queues" : {
"id" : "6170787",
"name" : "_queues",
"isSystem" : true,
"status" : 3,
"type" : 2
},
"Electronics" : {
"id" : "1001859235",
"name" : "Electronics",
"isSystem" : false,
"status" : 3,
"type" : 2
},
"frenchHighway" : {
"id" : "1086793891",
"name" : "frenchHighway",
"isSystem" : false,
"status" : 3,
"type" : 3
},
"vertices1" : {
"id" : "1180182691",
"name" : "vertices1",
"isSystem" : false,
"status" : 3,
"type" : 2
},
"_cluster_kickstarter_plans" : {
"id" : "2566307",
"name" : "_cluster_kickstarter_plans",
"isSystem" : true,
"status" : 3,
"type" : 2
},
"Customer" : {
"id" : "1001334947",
"name" : "Customer",
"isSystem" : false,
"status" : 3,
"type" : 2
},
"relation" : {
"id" : "1063135395",
"name" : "relation",
"isSystem" : false,
"status" : 3,
"type" : 3
},
"animals" : {
"id" : "1092036771",
"name" : "animals",
"isSystem" : false,
"status" : 3,
"type" : 2
},
"demo" : {
"id" : "1091119267",
"name" : "demo",
"isSystem" : false,
"status" : 3,
"type" : 2
},
"better-example" : {
"id" : "758917283",
"name" : "better-example",
"isSystem" : false,
"status" : 3,
"type" : 2
},
"Groceries" : {
"id" : "1001728163",
"name" : "Groceries",
"isSystem" : false,
"status" : 3,
"type" : 2
}
},
"error" : false,
"code" : 200
}

View File

@ -0,0 +1,16 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_api/collection/products/checksum
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
{
"id" : "1396451491",
"name" : "products",
"isSystem" : false,
"status" : 3,
"type" : 2,
"checksum" : 1092316760,
"revision" : "1396779171",
"error" : false,
"code" : 200
}

View File

@ -0,0 +1,16 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_api/collection/products/checksum?withRevisions=false&withData=true
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
{
"id" : "1397041315",
"name" : "products",
"isSystem" : false,
"status" : 3,
"type" : 2,
"checksum" : 602639546,
"revision" : "1397368995",
"error" : false,
"code" : 200
}

View File

@ -0,0 +1,24 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_api/collection/products/count
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
location: /_db/_system/_api/collection/products/count
{
"id" : "1374496931",
"name" : "products",
"isSystem" : false,
"doCompact" : true,
"isVolatile" : false,
"journalSize" : 1048576,
"keyOptions" : {
"type" : "traditional",
"allowUserKeys" : true
},
"waitForSync" : true,
"count" : 100,
"status" : 3,
"type" : 2,
"error" : false,
"code" : 200
}

View File

@ -0,0 +1,65 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_api/collection/products/figures
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
location: /_db/_system/_api/collection/products/figures
{
"id" : "1395206307",
"name" : "products",
"isSystem" : false,
"doCompact" : true,
"isVolatile" : false,
"journalSize" : 1048576,
"keyOptions" : {
"type" : "traditional",
"allowUserKeys" : true
},
"waitForSync" : false,
"count" : 1,
"figures" : {
"alive" : {
"count" : 1,
"size" : 88
},
"dead" : {
"count" : 0,
"size" : 0,
"deletion" : 0
},
"datafiles" : {
"count" : 0,
"fileSize" : 0
},
"journals" : {
"count" : 1,
"fileSize" : 1048576
},
"compactors" : {
"count" : 0,
"fileSize" : 0
},
"shapefiles" : {
"count" : 0,
"fileSize" : 0
},
"shapes" : {
"count" : 1,
"size" : 104
},
"attributes" : {
"count" : 1,
"size" : 48
},
"indexes" : {
"count" : 1,
"size" : 2008
},
"lastTick" : "1395599523",
"uncollectedLogfileEntries" : 0
},
"status" : 3,
"type" : 2,
"error" : false,
"code" : 200
}

View File

@ -0,0 +1,23 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_api/collection/1374103715/properties
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
location: /_db/_system/_api/collection/products/properties
{
"id" : "1374103715",
"name" : "products",
"isSystem" : false,
"doCompact" : true,
"isVolatile" : false,
"journalSize" : 1048576,
"keyOptions" : {
"type" : "traditional",
"allowUserKeys" : true
},
"waitForSync" : true,
"status" : 3,
"type" : 2,
"error" : false,
"code" : 200
}

View File

@ -0,0 +1,23 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_api/collection/products/properties
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
location: /_db/_system/_api/collection/products/properties
{
"id" : "1374300323",
"name" : "products",
"isSystem" : false,
"doCompact" : true,
"isVolatile" : false,
"journalSize" : 1048576,
"keyOptions" : {
"type" : "traditional",
"allowUserKeys" : true
},
"waitForSync" : true,
"status" : 3,
"type" : 2,
"error" : false,
"code" : 200
}

View File

@ -0,0 +1,15 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_api/collection/products/revision
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
{
"id" : "1396123811",
"name" : "products",
"isSystem" : false,
"status" : 3,
"type" : 2,
"revision" : "0",
"error" : false,
"code" : 200
}

View File

@ -0,0 +1,15 @@
shell> curl -X PUT --dump - http://localhost:8529/_api/collection/products/load
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
{
"id" : "1397631139",
"name" : "products",
"isSystem" : false,
"count" : 0,
"status" : 3,
"type" : 2,
"error" : false,
"code" : 200
}

View File

@ -0,0 +1,25 @@
shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/collection/products/properties
{
"waitForSync" : true
}
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
{
"id" : "1398352035",
"name" : "products",
"isSystem" : false,
"doCompact" : true,
"isVolatile" : false,
"journalSize" : 1048576,
"keyOptions" : {
"type" : "traditional",
"allowUserKeys" : true
},
"waitForSync" : true,
"status" : 3,
"type" : 2,
"error" : false,
"code" : 200
}

View File

@ -0,0 +1,17 @@
shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/collection/products1/rename
{
"name" : "newname"
}
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
{
"id" : "1398614179",
"name" : "newname",
"isSystem" : false,
"status" : 3,
"type" : 2,
"error" : false,
"code" : 200
}

View File

@ -0,0 +1,14 @@
shell> curl -X PUT --dump - http://localhost:8529/_api/collection/products/truncate
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
{
"id" : "1398089891",
"name" : "products",
"isSystem" : false,
"status" : 3,
"type" : 2,
"error" : false,
"code" : 200
}

View File

@ -0,0 +1,14 @@
shell> curl -X PUT --dump - http://localhost:8529/_api/collection/products/unload
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
{
"id" : "1397893283",
"name" : "products",
"isSystem" : false,
"status" : 4,
"type" : 2,
"error" : false,
"code" : 200
}

View File

@ -0,0 +1,12 @@
shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/collection/products/rotate
{
}
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
{
"result" : true,
"error" : false,
"code" : 200
}

View File

@ -0,0 +1,13 @@
shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/collection/products/rotate
{
}
HTTP/1.1 400 Bad Request
content-type: application/json; charset=utf-8
{
"error" : true,
"code" : 400,
"errorNum" : 1105,
"errorMessage" : "could not rotate journal: no journal"
}

View File

@ -0,0 +1,36 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor
{"query":"FOR p IN products LIMIT 5 RETURN p","count":true,"batchSize":2}
HTTP/1.1 201 Created
content-type: application/json; charset=utf-8
{
"result" : [
{
"_id" : "products/1096100003",
"_key" : "1096100003",
"_rev" : "1096100003",
"hello4" : "world1"
},
{
"_id" : "products/1095444643",
"_key" : "1095444643",
"_rev" : "1095444643",
"hello2" : "world1"
}
],
"hasMore" : true,
"id" : "1096624291",
"count" : 5,
"extra" : {
"stats" : {
"writesExecuted" : 0,
"writesIgnored" : 0,
"scannedFull" : 5,
"scannedIndex" : 0,
"filtered" : 0
}
},
"error" : false,
"code" : 201
}

View File

@ -0,0 +1,36 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor
{"query":"FOR p IN products LIMIT 2 RETURN p","count":true,"batchSize":2}
HTTP/1.1 201 Created
content-type: application/json; charset=utf-8
{
"result" : [
{
"_id" : "products/1094199459",
"_key" : "1094199459",
"_rev" : "1094199459",
"hello1" : "world1"
},
{
"_id" : "products/1094527139",
"_key" : "1094527139",
"_rev" : "1094527139",
"hello2" : "world1"
}
],
"hasMore" : false,
"count" : 2,
"extra" : {
"stats" : {
"writesExecuted" : 0,
"writesIgnored" : 0,
"scannedFull" : 2,
"scannedIndex" : 0,
"filtered" : 0
},
"warnings" : [ ]
},
"error" : false,
"code" : 201
}

View File

@ -0,0 +1,11 @@
shell> curl -X POST --dump - http://localhost:8529/_api/cursor
HTTP/1.1 400 Bad Request
content-type: application/json; charset=utf-8
{
"error" : true,
"code" : 400,
"errorNum" : 1502,
"errorMessage" : "query is empty"
}

View File

@ -0,0 +1,35 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor
{"query":"FOR i IN 1..1000 FILTER i > 500 LIMIT 10 RETURN i","count":true,"options":{"fullCount":true}}
HTTP/1.1 201 Created
content-type: application/json; charset=utf-8
{
"result" : [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510
],
"hasMore" : false,
"count" : 10,
"extra" : {
"stats" : {
"writesExecuted" : 0,
"writesIgnored" : 0,
"scannedFull" : 0,
"scannedIndex" : 0,
"filtered" : 500,
"fullCount" : 500
},
"warnings" : [ ]
},
"error" : false,
"code" : 201
}

View File

@ -0,0 +1,12 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor
{"query":"FOR u IN unknowncoll LIMIT 2 RETURN u","count":true,"batchSize":2}
HTTP/1.1 404 Not Found
content-type: application/json; charset=utf-8
{
"error" : true,
"code" : 404,
"errorNum" : 1203,
"errorMessage" : "collection not found (unknowncoll)"
}

View File

@ -0,0 +1,38 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor
{"query":"FOR p IN products LIMIT 5 RETURN p","count":true,"batchSize":2}
HTTP/1.1 201 Created
content-type: application/json; charset=utf-8
{
"result" : [
{
"_id" : "products/1101801635",
"_key" : "1101801635",
"_rev" : "1101801635",
"hello1" : "world1"
},
{
"_id" : "products/1102129315",
"_key" : "1102129315",
"_rev" : "1102129315",
"hello2" : "world1"
}
],
"hasMore" : true,
"id" : "1103308963",
"count" : 5,
"extra" : {
"stats" : {
"writesExecuted" : 0,
"writesIgnored" : 0,
"scannedFull" : 5,
"scannedIndex" : 0,
"filtered" : 0
}
},
"error" : false,
"code" : 201
}
shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/cursor/1103308963

View File

@ -0,0 +1,22 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor
{"query":"REMOVE 'bar' IN products OPTIONS { ignoreErrors: true }"}
HTTP/1.1 201 Created
content-type: application/json; charset=utf-8
{
"result" : [ ],
"hasMore" : false,
"extra" : {
"stats" : {
"writesExecuted" : 0,
"writesIgnored" : 1,
"scannedFull" : 0,
"scannedIndex" : 0,
"filtered" : 0
},
"warnings" : [ ]
},
"error" : false,
"code" : 201
}

View File

@ -0,0 +1,22 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor
{"query":"FOR p IN products REMOVE p IN products"}
HTTP/1.1 201 Created
content-type: application/json; charset=utf-8
{
"result" : [ ],
"hasMore" : false,
"extra" : {
"stats" : {
"writesExecuted" : 2,
"writesIgnored" : 0,
"scannedFull" : 2,
"scannedIndex" : 0,
"filtered" : 0
},
"warnings" : [ ]
},
"error" : false,
"code" : 201
}

View File

@ -0,0 +1,12 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor
{"query":"REMOVE 'foo' IN products"}
HTTP/1.1 404 Not Found
content-type: application/json; charset=utf-8
{
"error" : true,
"code" : 404,
"errorNum" : 1202,
"errorMessage" : "document not found (while executing)"
}

View File

@ -0,0 +1,38 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor
{"query":"FOR p IN products LIMIT 5 RETURN p","count":true,"batchSize":2}
shell> curl -X PUT --dump - http://localhost:8529/_api/cursor/1101342883
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
{
"result" : [
{
"_id" : "products/1099835555",
"_key" : "1099835555",
"_rev" : "1099835555",
"hello1" : "world1"
},
{
"_id" : "products/1100490915",
"_key" : "1100490915",
"_rev" : "1100490915",
"hello3" : "world1"
}
],
"hasMore" : true,
"id" : "1101342883",
"count" : 5,
"extra" : {
"stats" : {
"writesExecuted" : 0,
"writesIgnored" : 0,
"scannedFull" : 5,
"scannedIndex" : 0,
"filtered" : 0
}
},
"error" : false,
"code" : 200
}

View File

@ -0,0 +1,11 @@
shell> curl -X PUT --dump - http://localhost:8529/_api/cursor/123123
HTTP/1.1 404 Not Found
content-type: application/json; charset=utf-8
{
"error" : true,
"code" : 404,
"errorNum" : 1600,
"errorMessage" : "cursor not found"
}

View File

@ -0,0 +1,11 @@
shell> curl -X PUT --dump - http://localhost:8529/_api/cursor
HTTP/1.1 400 Bad Request
content-type: application/json; charset=utf-8
{
"error" : true,
"code" : 400,
"errorNum" : 400,
"errorMessage" : "bad parameter"
}

View File

@ -0,0 +1,34 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/cursor
{"query":"FOR i IN 1..10 LET a = 1 LET b = 2 FILTER a + b == 3 RETURN i","count":true,"options":{"maxPlans":1,"optimizer":{"rules":["-all","+remove-unnecessary-filters"]}}}
HTTP/1.1 201 Created
content-type: application/json; charset=utf-8
{
"result" : [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10
],
"hasMore" : false,
"count" : 10,
"extra" : {
"stats" : {
"writesExecuted" : 0,
"writesIgnored" : 0,
"scannedFull" : 0,
"scannedIndex" : 0,
"filtered" : 0
},
"warnings" : [ ]
},
"error" : false,
"code" : 201
}

View File

@ -0,0 +1,11 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/database
{"name":"example"}
HTTP/1.1 201 Created
content-type: application/json; charset=utf-8
{
"result" : true,
"error" : false,
"code" : 201
}

View File

@ -0,0 +1,11 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/database
{"name":"mydb","users":[{"username":"admin","passwd":"secret","active":true},{"username":"tester","passwd":"test001","active":false}]}
HTTP/1.1 201 Created
content-type: application/json; charset=utf-8
{
"result" : true,
"error" : false,
"code" : 201
}

View File

@ -0,0 +1,10 @@
shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/database/example
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
{
"result" : true,
"error" : false,
"code" : 200
}

View File

@ -0,0 +1,12 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_api/database
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
{
"result" : [
"_system"
],
"error" : false,
"code" : 200
}

View File

@ -0,0 +1,15 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_api/database/current
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
{
"result" : {
"name" : "_system",
"id" : "75939",
"path" : "/tmp/vocdir.86910/databases/database-75939",
"isSystem" : true
},
"error" : false,
"code" : 200
}

View File

@ -0,0 +1,12 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_api/database/user
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
{
"result" : [
"_system"
],
"error" : false,
"code" : 200
}

View File

@ -0,0 +1,11 @@
shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/document/products/1526474915
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
{
"error" : false,
"_id" : "products/1526474915",
"_rev" : "1526474915",
"_key" : "1526474915"
}

View File

@ -0,0 +1,15 @@
shell> curl -X DELETE --header 'If-Match: "1528375459"' --dump - http://localhost:8529/_api/document/products/1528047779
HTTP/1.1 412 Precondition Failed
content-type: application/json; charset=utf-8
etag: "1528047779"
{
"error" : true,
"code" : 412,
"errorNum" : 1200,
"errorMessage" : "precondition failed",
"_id" : "products/1528047779",
"_rev" : "1528047779",
"_key" : "1528047779"
}

View File

@ -0,0 +1,11 @@
shell> curl -X DELETE --data-binary @- --dump - http://localhost:8529/_api/document/products/1527195811
HTTP/1.1 404 Not Found
content-type: application/json; charset=utf-8
{
"error" : true,
"errorMessage" : "document /_api/document/products/1527195811 not found",
"code" : 404,
"errorNum" : 1202
}

View File

@ -0,0 +1,94 @@
shell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/1522673827
{
"hello" : "world"
}
HTTP/1.1 202 Accepted
content-type: application/json; charset=utf-8
etag: "1523001507"
location: /_db/_system/_api/document/products/1522673827
{
"error" : false,
"_id" : "products/1522673827",
"_rev" : "1523001507",
"_key" : "1522673827"
}
shell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/1522673827
{
"numbers" : {
"one" : 1,
"two" : 2,
"three" : 3,
"empty" : null
}
}
HTTP/1.1 202 Accepted
content-type: application/json; charset=utf-8
etag: "1523591331"
location: /_db/_system/_api/document/products/1522673827
{
"error" : false,
"_id" : "products/1522673827",
"_rev" : "1523591331",
"_key" : "1522673827"
}
shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/1522673827
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
etag: "1523591331"
{
"one" : "world",
"hello" : "world",
"numbers" : {
"empty" : null,
"one" : 1,
"two" : 2,
"three" : 3
},
"_id" : "products/1522673827",
"_rev" : "1523591331",
"_key" : "1522673827"
}
shell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/1522673827?keepNull=false
{
"hello" : null,
"numbers" : {
"four" : 4
}
}
HTTP/1.1 202 Accepted
content-type: application/json; charset=utf-8
etag: "1524050083"
location: /_db/_system/_api/document/products/1522673827
{
"error" : false,
"_id" : "products/1522673827",
"_rev" : "1524050083",
"_key" : "1522673827"
}
shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/1522673827
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
etag: "1524050083"
{
"one" : "world",
"numbers" : {
"empty" : null,
"one" : 1,
"two" : 2,
"three" : 3,
"four" : 4
},
"_id" : "products/1522673827",
"_rev" : "1524050083",
"_key" : "1522673827"
}

View File

@ -0,0 +1,74 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/1524902051
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
etag: "1524902051"
{
"inhabitants" : {
"china" : 1366980000,
"india" : 1263590000,
"usa" : 319220000
},
"_id" : "products/1524902051",
"_rev" : "1524902051",
"_key" : "1524902051"
}
shell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/1524902051?mergeObjects=true
{
"inhabitants" : {
"indonesia" : 252164800,
"brazil" : 203553000
}
}
shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/1524902051
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
etag: "1525426339"
{
"inhabitants" : {
"china" : 1366980000,
"india" : 1263590000,
"usa" : 319220000,
"indonesia" : 252164800,
"brazil" : 203553000
},
"_id" : "products/1524902051",
"_rev" : "1525426339",
"_key" : "1524902051"
}
shell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/1524902051?mergeObjects=false
{
"inhabitants" : {
"pakistan" : 188346000
}
}
HTTP/1.1 202 Accepted
content-type: application/json; charset=utf-8
etag: "1525885091"
location: /_db/_system/_api/document/products/1524902051
{
"error" : false,
"_id" : "products/1524902051",
"_rev" : "1525885091",
"_key" : "1524902051"
}
shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/1524902051
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
etag: "1525885091"
{
"inhabitants" : {
"pakistan" : 188346000
},
"_id" : "products/1524902051",
"_rev" : "1525885091",
"_key" : "1524902051"
}

View File

@ -0,0 +1,14 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products
{ "Hello": "World" }
HTTP/1.1 202 Accepted
content-type: application/json; charset=utf-8
etag: "1511598243"
location: /_db/_system/_api/document/products/1511598243
{
"error" : false,
"_id" : "products/1511598243",
"_rev" : "1511598243",
"_key" : "1511598243"
}

View File

@ -0,0 +1,12 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products
{ 1: "World" }
HTTP/1.1 400 Bad Request
content-type: application/json; charset=utf-8
{
"error" : true,
"errorMessage" : "expecting attribute name",
"code" : 400,
"errorNum" : 600
}

View File

@ -0,0 +1,14 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products
{ "Hello": "World" }
HTTP/1.1 201 Created
content-type: application/json; charset=utf-8
etag: "1511073955"
location: /_db/_system/_api/document/products/1511073955
{
"error" : false,
"_id" : "products/1511073955",
"_rev" : "1511073955",
"_key" : "1511073955"
}

View File

@ -0,0 +1,14 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products&createCollection=true
{ "Hello": "World" }
HTTP/1.1 202 Accepted
content-type: application/json; charset=utf-8
etag: "1512646819"
location: /_db/_system/_api/document/products/1512646819
{
"error" : false,
"_id" : "products/1512646819",
"_rev" : "1512646819",
"_key" : "1512646819"
}

View File

@ -0,0 +1,12 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products
{ "Hello": "World" }
HTTP/1.1 404 Not Found
content-type: application/json; charset=utf-8
{
"error" : true,
"errorMessage" : "collection 'products' not found",
"code" : 404,
"errorNum" : 1203
}

View File

@ -0,0 +1,14 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/document?collection=products&waitForSync=true
{ "Hello": "World" }
HTTP/1.1 201 Created
content-type: application/json; charset=utf-8
etag: "1512122531"
location: /_db/_system/_api/document/products/1512122531
{
"error" : false,
"_id" : "products/1512122531",
"_rev" : "1512122531",
"_key" : "1512122531"
}

View File

@ -0,0 +1,12 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/1513171107
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
etag: "1513171107"
{
"hello" : "world",
"_id" : "products/1513171107",
"_rev" : "1513171107",
"_key" : "1513171107"
}

View File

@ -0,0 +1,11 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/?collection=doesnotexist
HTTP/1.1 404 Not Found
content-type: application/json; charset=utf-8
{
"error" : true,
"errorMessage" : "collection 'doesnotexist' not found",
"code" : 404,
"errorNum" : 1203
}

View File

@ -0,0 +1,12 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/?collection=products&type=key
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
{
"documents" : [
"1516316835",
"1515661475",
"1515989155"
]
}

View File

@ -0,0 +1,12 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/?collection=products
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
{
"documents" : [
"/_api/document/products/1515071651",
"/_api/document/products/1514416291",
"/_api/document/products/1514743971"
]
}

View File

@ -0,0 +1,2 @@
shell> curl -X HEAD --data-binary @- --dump - http://localhost:8529/_api/document/products/1516906659

View File

@ -0,0 +1,2 @@
shell> curl --header 'If-None-Match: "1513760931"' --dump - http://localhost:8529/_api/document/products/1513760931

View File

@ -0,0 +1,11 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_api/document/products/unknownhandle
HTTP/1.1 404 Not Found
content-type: application/json; charset=utf-8
{
"error" : true,
"errorMessage" : "document /_api/document/products/unknownhandle not found",
"code" : 404,
"errorNum" : 1202
}

View File

@ -0,0 +1,14 @@
shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/document/products/1517496483
{"Hello": "you"}
HTTP/1.1 202 Accepted
content-type: application/json; charset=utf-8
etag: "1517824163"
location: /_db/_system/_api/document/products/1517496483
{
"error" : false,
"_id" : "products/1517496483",
"_rev" : "1517824163",
"_key" : "1517496483"
}

View File

@ -0,0 +1,16 @@
shell> curl -X PUT --header 'If-Match: "1519593635"' --data-binary @- --dump - http://localhost:8529/_api/document/products/1519265955
{"other":"content"}
HTTP/1.1 412 Precondition Failed
content-type: application/json; charset=utf-8
etag: "1519265955"
{
"error" : true,
"code" : 412,
"errorNum" : 1200,
"errorMessage" : "precondition failed",
"_id" : "products/1519265955",
"_rev" : "1519265955",
"_key" : "1519265955"
}

View File

@ -0,0 +1,14 @@
shell> curl -X PUT --header 'If-Match: "1520707747"' --data-binary @- --dump - http://localhost:8529/_api/document/products/1520380067?policy=last
{}
HTTP/1.1 202 Accepted
content-type: application/json; charset=utf-8
etag: "1520969891"
location: /_db/_system/_api/document/products/1520380067
{
"error" : false,
"_id" : "products/1520380067",
"_rev" : "1520969891",
"_key" : "1520380067"
}

View File

@ -0,0 +1,16 @@
shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/document/products/1521494179?rev=1521821859
{"other":"content"}
HTTP/1.1 412 Precondition Failed
content-type: application/json; charset=utf-8
etag: "1521494179"
{
"error" : true,
"code" : 412,
"errorNum" : 1200,
"errorMessage" : "precondition failed",
"_id" : "products/1521494179",
"_rev" : "1521494179",
"_key" : "1521494179"
}

View File

@ -0,0 +1,12 @@
shell> curl -X PUT --data-binary @- --dump - http://localhost:8529/_api/document/products/1518348451
{}
HTTP/1.1 404 Not Found
content-type: application/json; charset=utf-8
{
"error" : true,
"errorMessage" : "document /_api/document/products/1518348451 not found",
"code" : 404,
"errorNum" : 1202
}

View File

@ -0,0 +1,30 @@
shell> curl -X POST --data-binary @- --dump - http://localhost:8529/_api/edge/?collection=edges&from=vertices/1&to=vertices/2
{
"name" : "Emil"
}
HTTP/1.1 202 Accepted
content-type: application/json; charset=utf-8
etag: "1530669219"
location: /_db/_system/_api/document/edges/1530669219
{
"error" : false,
"_id" : "edges/1530669219",
"_rev" : "1530669219",
"_key" : "1530669219"
}
shell> curl --data-binary @- --dump - http://localhost:8529/_api/edge/edges/1530669219
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
etag: "1530669219"
{
"name" : "Emil",
"_id" : "edges/1530669219",
"_rev" : "1530669219",
"_key" : "1530669219",
"_from" : "vertices/1",
"_to" : "vertices/2"
}

View File

@ -0,0 +1,35 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
{
"edges" : [
{
"_id" : "edges/6",
"_key" : "6",
"_rev" : "1157834915",
"_from" : "vertices/2",
"_to" : "vertices/1",
"$label" : "v2 -> v1"
},
{
"_id" : "edges/7",
"_key" : "7",
"_rev" : "1158359203",
"_from" : "vertices/4",
"_to" : "vertices/1",
"$label" : "v4 -> v1"
},
{
"_id" : "edges/5",
"_key" : "5",
"_rev" : "1157310627",
"_from" : "vertices/1",
"_to" : "vertices/3",
"$label" : "v1 -> v3"
}
],
"error" : false,
"code" : 200
}

View File

@ -0,0 +1,27 @@
shell> curl --data-binary @- --dump - http://localhost:8529/_api/edges/edges?vertex=vertices/1&direction=in
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
{
"edges" : [
{
"_id" : "edges/6",
"_key" : "6",
"_rev" : "1162619043",
"_from" : "vertices/2",
"_to" : "vertices/1",
"$label" : "v2 -> v1"
},
{
"_id" : "edges/7",
"_key" : "7",
"_rev" : "1163143331",
"_from" : "vertices/4",
"_to" : "vertices/1",
"$label" : "v4 -> v1"
}
],
"error" : false,
"code" : 200
}

Some files were not shown because too many files have changed in this diff Show More