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: 60
{
"server" : "arango",
"license" : "enterprise",
"version" : "3.5.1"
}↩
--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: 290
{
"error" : false,
"code" : 200,
"type" : 2,
"status" : 3,
"statusString" : "loaded",
"id" : "69088",
"waitForSync" : false,
"objectId" : "69087",
"cacheEnabled" : false,
"isSystem" : false,
"globallyUniqueId" : "h34D5FCD00B2F/69088",
"keyOptions" : {
"allowUserKeys" : true,
"type" : "traditional",
"lastValue" : 0
},
"name" : "products"
}↩
--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: 409
{
"error" : false,
"code" : 200,
"type" : 2,
"status" : 3,
"name" : "products",
"waitForSync" : false,
"objectId" : "69087",
"cacheEnabled" : false,
"figures" : {
"indexes" : {
"count" : 1,
"size" : 0
},
"documentsSize" : 0,
"cacheInUse" : false,
"cacheSize" : 0,
"cacheUsage" : 0
},
"keyOptions" : {
"allowUserKeys" : true,
"type" : "traditional",
"lastValue" : 0
},
"globallyUniqueId" : "h34D5FCD00B2F/69088",
"statusString" : "loaded",
"id" : "69088",
"count" : 0,
"isSystem" : false
}↩
--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: 39
{
"error" : false,
"code" : 200,
"id" : "69088"
}↩
--SomeBoundaryValue--