mirror of https://gitee.com/bigwinds/arangodb
43 lines
3.4 KiB
Plaintext
43 lines
3.4 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: 68\r\n\r\n{\"server\":\"arango\",\"version\":\"3.3.milestone1\",\"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: 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\nServer: \r\nLocation: /_db/_system/_api/collection/products\r\nConnection: \r\nContent-Type: application/json; charset=utf-8\r\nContent-Length: 132\r\n\r\n{\"id\":\"9785\",\"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\nServer: \r\nLocation: /_db/_system/_api/collection/products/figures\r\nConnection: \r\nContent-Type: application/json; charset=utf-8\r\nContent-Length: 767\r\n\r\n{\"id\":\"9785\",\"name\":\"products\",\"isSystem\":false,\"doCompact\":true,\"isVolatile\":false,\"journalSize\":33554432,\"keyOptions\":{\"type\":\"traditional\",\"allowUserKeys\":true,\"lastValue\":0},\"waitForSync\":false,\"indexBuckets\":8,\"count\":0,\"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\":\"2017-10-13T10:41:58Z\",\"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},\"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\nServer: \r\nConnection: \r\nContent-Type: application/json; charset=utf-8\r\nContent-Length: 38\r\n\r\n{\"id\":\"9785\",\"error\":false,\"code\":200}\r\n--SomeBoundaryValue--"
|