shell> curl -X POST --header 'Content-Type: multipart/form-data; boundary=SomeBoundaryValue' --header 'accept: application/json' --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 OK
content-type: application/json
x-arango-errors: 1
x-content-type-options: nosniff
--SomeBoundaryValue
Content-Type: application/x-arango-batchpart
Content-Id: myId1
HTTP/1.1 200 OK
Server:
Connection:
Content-Type: application/json; charset=utf-8
Content-Length: 65
{
"server" : "arango",
"license" : "community",
"version" : "3.6.0-devel"
}↩
--SomeBoundaryValue
Content-Type: application/x-arango-batchpart
Content-Id: myId2
HTTP/1.1 404 Not Found
Server:
Connection:
Content-Type: application/json; charset=utf-8
Content-Length: 87
{
"code" : 404,
"error" : true,
"errorMessage" : "collection or view not found",
"errorNum" : 1203
}↩
--SomeBoundaryValue
Content-Type: application/x-arango-batchpart
Content-Id: someId
HTTP/1.1 200 OK
Server:
Connection:
Content-Type: application/json; charset=utf-8
Content-Length: 322
{
"error" : false,
"code" : 200,
"waitForSync" : false,
"type" : 2,
"status" : 3,
"journalSize" : 33554432,
"keyOptions" : {
"allowUserKeys" : true,
"type" : "traditional",
"lastValue" : 0
},
"globallyUniqueId" : "h5E72DF2A848A/111",
"statusString" : "loaded",
"id" : "111",
"name" : "products",
"doCompact" : true,
"isSystem" : false,
"indexBuckets" : 8,
"isVolatile" : false
}↩
--SomeBoundaryValue
Content-Type: application/x-arango-batchpart
Content-Id: nextId
HTTP/1.1 200 OK
Server:
Location: /_api/collection/products/figures
Connection:
Content-Type: application/json; charset=utf-8
Content-Length: 829
{
"error" : false,
"code" : 200,
"type" : 2,
"status" : 3,
"journalSize" : 33554432,
"isVolatile" : false,
"name" : "products",
"doCompact" : true,
"isSystem" : false,
"count" : 0,
"waitForSync" : false,
"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" : "2019-07-17T12:01:44Z",
"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
},
"keyOptions" : {
"allowUserKeys" : true,
"type" : "traditional",
"lastValue" : 0
},
"globallyUniqueId" : "h5E72DF2A848A/111",
"statusString" : "loaded",
"id" : "111",
"indexBuckets" : 8
}↩
--SomeBoundaryValue
Content-Type: application/x-arango-batchpart
Content-Id: otherId
HTTP/1.1 200 OK
Server:
Connection:
Content-Type: application/json; charset=utf-8
Content-Length: 37
{
"error" : false,
"code" : 200,
"id" : "111"
}↩
--SomeBoundaryValue--