batch endpoint for guillotina
Project description
# Guillotina Batch Docs
This package simple provides a `@batch` endpoint to Guillotina which
allows you to group multiple requests into one.
## Configuration
Just add a few lines to your config.yml::
{"applications": ["guillotina_batch"]}
## Usage
The `@batch` endpoint takes a array of batch definitions taking the following parameters:
- method:str
- endpoint:str
- headers:object[str, str]
- payload:object
For example::
```
POST /db/container/@batch [{
"method": "POST",
"endpoint": "path/to/object/@sharing",
"payload": {
"prinperm": [{
"principal": "user1",
"permission": "guillotina.AccessContent",
"setting": "AllowSingle"
}]
}
},{
"method": "POST",
"endpoint": "path/to/object2/@sharing",
"payload": {
"prinperm": [{
"principal": "user1",
"permission": "guillotina.AccessContent",
"setting": "AllowSingle"
}]
}
}]
```
1.0.0 (2018-06-11)
- Initial release
[vangheem]
This package simple provides a `@batch` endpoint to Guillotina which
allows you to group multiple requests into one.
## Configuration
Just add a few lines to your config.yml::
{"applications": ["guillotina_batch"]}
## Usage
The `@batch` endpoint takes a array of batch definitions taking the following parameters:
- method:str
- endpoint:str
- headers:object[str, str]
- payload:object
For example::
```
POST /db/container/@batch [{
"method": "POST",
"endpoint": "path/to/object/@sharing",
"payload": {
"prinperm": [{
"principal": "user1",
"permission": "guillotina.AccessContent",
"setting": "AllowSingle"
}]
}
},{
"method": "POST",
"endpoint": "path/to/object2/@sharing",
"payload": {
"prinperm": [{
"principal": "user1",
"permission": "guillotina.AccessContent",
"setting": "AllowSingle"
}]
}
}]
```
1.0.0 (2018-06-11)
- Initial release
[vangheem]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
guillotina_batch-1.0.0.tar.gz
(4.9 kB
view hashes)
Built Distribution
Close
Hashes for guillotina_batch-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c0bf1058473cbfbe47d6f28d8deb0096025cb247bf5082d82afec574666f4c8 |
|
MD5 | 37438ccf5ca9571c21ca3e2b502cfd05 |
|
BLAKE2b-256 | 0ec0c6f04a4fb4b1a4be63483150075d2cf3b623f5b4c64e13c3dfaa15346ce9 |