mirror of https://gitee.com/bigwinds/arangodb
43 lines
3.8 KiB
Plaintext
43 lines
3.8 KiB
Plaintext
<span class="hljs-meta">shell></span><span class="bash"> curl -X POST --header <span class="hljs-string">'Content-Type: multipart/form-data; boundary=SomeBoundaryValue'</span> --header <span class="hljs-string">'accept: application/json'</span> --data-binary @- --dump - http://localhost:8529/_api/batch</span> <<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 undefined
|
|
content-type: application/json
|
|
x-arango-errors: 1
|
|
x-content-type-options: nosniff
|
|
|
|
"--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: 65\r\n\r\n{\"server\":\"arango\",\"version\":\"3.4.0-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: 87\r\n\r\n{\"error\":true,\"errorMessage\":\"collection or view 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: 327\r\n\r\n{\"error\":false,\"code\":200,\"type\":2,\"keyOptions\":{\"allowUserKeys\":true,\"type\":\"traditional\",\"lastValue\":0},\"status\":3,\"name\":\"products\",\"id\":\"102334\",\"journalSize\":33554432,\"isVolatile\":false,\"waitForSync\":false,\"indexBuckets\":8,\"doCompact\":true,\"isSystem\":false,\"statusString\":\"loaded\",\"globallyUniqueId\":\"hD1CC574CBE4/102334\"}\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: 834\r\n\r\n{\"error\":false,\"code\":200,\"type\":2,\"statusString\":\"loaded\",\"name\":\"products\",\"status\":3,\"keyOptions\":{\"allowUserKeys\":true,\"type\":\"traditional\",\"lastValue\":0},\"id\":\"102334\",\"journalSize\":33554432,\"isVolatile\":false,\"waitForSync\":false,\"indexBuckets\":8,\"globallyUniqueId\":\"hD1CC574CBE4/102334\",\"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-08-30T14:27:45Z\",\"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},\"isSystem\":false,\"doCompact\":true,\"count\":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: 40\r\n\r\n{\"error\":false,\"code\":200,\"id\":\"102334\"}\r\n--SomeBoundaryValue--"
|