You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+86Lines changed: 86 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -170,6 +170,92 @@ Response:
170
170
}
171
171
```
172
172
173
+
### `/batch/bake`
174
+
175
+
`/batch/bake` allows a user to POST multiple input values and a configuration for a CyberChef Recipe. The application will run each elemnt of the input through the recipe and return the results as an array of output objects.
176
+
177
+
This endpoint accepts a POST request with the following body:
178
+
179
+
|Parameter|Type|Description|
180
+
|---|---|---|
181
+
input|Array|The input data for the recipe. Currently accepts an array of Strings.
182
+
recipe|String or Object or Array|One or more operations, with optional arguments. Uses default arguments if they're not defined here.
183
+
outputType (optional)|String|The [Data Type](https://github.com/gchq/CyberChef/wiki/Adding-a-new-operation#data-types) that you would like the result of the bakes to be returned as. This will not work with `File` or `List<File>` at the moment.
184
+
185
+
#### Example: one operation, default arguments
186
+
```javascript
187
+
{
188
+
"input": ["One", "two", "three", "four"],
189
+
"recipe":"to decimal"
190
+
}
191
+
```
192
+
193
+
Response:
194
+
```javascript
195
+
[
196
+
{
197
+
"success":true,
198
+
"value":"79 110 101",
199
+
"type":"string"
200
+
},
201
+
{
202
+
"success":true,
203
+
"value":"116 119 111",
204
+
"type":"string"
205
+
},
206
+
{
207
+
"success":true,
208
+
"value":"116 104 114 101 101",
209
+
"type":"string"
210
+
},
211
+
{
212
+
"success":true,
213
+
"value":"102 111 117 114",
214
+
"type":"string"
215
+
}
216
+
]
217
+
218
+
```
219
+
> For more information on how operation names are handled, see the [Node API docs](https://github.com/gchq/CyberChef/wiki/Node-API#operation-names)
220
+
221
+
#### Example: one operation, non-default arguments by name
222
+
```javascript
223
+
{
224
+
"input": ["One", "two", "three", "four"],
225
+
"recipe": {
226
+
"op":"to decimal",
227
+
"args": {
228
+
"delimiter":"Colon"
229
+
}
230
+
}
231
+
}
232
+
```
233
+
Response:
234
+
```javascript
235
+
[
236
+
{
237
+
"success":true,
238
+
"value":"79:110:101",
239
+
"type":"string"
240
+
},
241
+
{
242
+
"success":true,
243
+
"value":"116:119:111",
244
+
"type":"string"
245
+
},
246
+
{
247
+
"success":true,
248
+
"value":"116:104:114:101:101",
249
+
"type":"string"
250
+
},
251
+
{
252
+
"success":true,
253
+
"value":"102:111:117:114",
254
+
"type":"string"
255
+
}
256
+
]
257
+
```
258
+
173
259
### `/magic`
174
260
175
261
[Find more information about what the Magic operation does here](https://github.com/gchq/CyberChef/wiki/Automatic-detection-of-encoded-data-using-CyberChef-Magic)
0 commit comments