mirror of https://gitee.com/bigwinds/arangodb
43 lines
3.6 KiB
Plaintext
43 lines
3.6 KiB
Plaintext
shell> curl -X POST --header 'Content-Type: multipart/form-data; boundary=SomeBoundaryValue' --data-binary @- --dump - http://localhost:8529/_api/batch <<EOF
|
|
--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--
|
|
|
|
EOF
|
|
|
|
HTTP/1.1 200 OK
|
|
content-type: multipart/form-data; boundary=SomeBoundaryValue
|
|
x-content-type-options: nosniff
|
|
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\nServer: \r\nConnection: \r\nContent-Type: application/json; charset=utf-8\r\nContent-Length: 63\r\n\r\n{\"server\":\"arango\",\"version\":\"3.4.devel\",\"license\":\"community\"}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: myId2\r\n\r\nHTTP/1.1 404 Not Found\r\nServer: \r\nConnection: \r\nContent-Type: application/json; charset=utf-8\r\nContent-Length: 79\r\n\r\n{\"error\":true,\"errorMessage\":\"collection not found\",\"code\":404,\"errorNum\":1203}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: someId\r\n\r\nHTTP/1.1 200 OK\r\nServer: \r\nConnection: \r\nContent-Type: application/json; charset=utf-8\r\nContent-Length: 326\r\n\r\n{\"error\":false,\"code\":200,\"waitForSync\":false,\"type\":2,\"statusString\":\"loaded\",\"indexBuckets\":8,\"globallyUniqueId\":\"h4B150768F36C/11505\",\"doCompact\":true,\"isSystem\":false,\"journalSize\":33554432,\"id\":\"11505\",\"isVolatile\":false,\"keyOptions\":{\"type\":\"traditional\",\"allowUserKeys\":true,\"lastValue\":0},\"name\":\"products\",\"status\":3}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: nextId\r\n\r\nHTTP/1.1 200 OK\r\nServer: \r\nLocation: /_api/collection/products/figures\r\nConnection: \r\nContent-Type: application/json; charset=utf-8\r\nContent-Length: 833\r\n\r\n{\"error\":false,\"code\":200,\"waitForSync\":false,\"type\":2,\"statusString\":\"loaded\",\"status\":3,\"name\":\"products\",\"figures\":{\"indexes\":{\"count\":1,\"size\":32128},\"documentReferences\":0,\"waitingFor\":\"-\",\"alive\":{\"count\":0,\"size\":0},\"dead\":{\"count\":0,\"size\":0,\"deletion\":0},\"compactionStatus\":{\"message\":\"compaction not yet started\",\"time\":\"2018-03-13T23:40:47Z\",\"count\":0,\"filesCombined\":0,\"bytesRead\":0,\"bytesWritten\":0},\"datafiles\":{\"count\":0,\"fileSize\":0},\"journals\":{\"count\":0,\"fileSize\":0},\"compactors\":{\"count\":0,\"fileSize\":0},\"revisions\":{\"count\":0,\"size\":48192},\"lastTick\":0,\"uncollectedLogfileEntries\":0},\"doCompact\":true,\"globallyUniqueId\":\"h4B150768F36C/11505\",\"count\":0,\"indexBuckets\":8,\"isSystem\":false,\"journalSize\":33554432,\"id\":\"11505\",\"isVolatile\":false,\"keyOptions\":{\"type\":\"traditional\",\"allowUserKeys\":true,\"lastValue\":0}}\r\n--SomeBoundaryValue\r\nContent-Type: application/x-arango-batchpart\r\nContent-Id: otherId\r\n\r\nHTTP/1.1 200 OK\r\nServer: \r\nConnection: \r\nContent-Type: application/json; charset=utf-8\r\nContent-Length: 39\r\n\r\n{\"error\":false,\"code\":200,\"id\":\"11505\"}\r\n--SomeBoundaryValue--"
|