nicolaiarocci/eve — pull request #373 by rs (2014-06-12 07:12:15+00:00)
Title: Standardize insert (bulk or not) to comply with RESTful status behavior

For bulk and non-bulk inserts, response status now always either 201
when everything was ok or 400 when something went wrong. For bulk
inserts, if at least one document doesn't validate, the whole request
is rejected, and none of the documents are inserted into the database.

Additionnaly, this commit adopts the same response format as collections:
responses are always a dict with a `_status` field at its root and an
eventual `_error` object if `_status` is `ERR` to comply with #366.
Documents status are stored in the `_items` field.

Example:

```json
{
"_status": "ERR",
"_error": {
"code": 400,
"message": "Insertion failure: 1 document(s) contain(s) error(s)"
},
"_items": [
{
"_status": "OK"
},
{
"_issues": {
"email": "required field"
},
"_status": "ERR"
}
]
}
```

This unified response format will ease client implementation.