appwrite_openapi 1.0.0

AUTO-GENERATED client for Appwrite. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
# \FunctionsApi

All URIs are relative to *https://HOSTNAME/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
[**functions_create**](FunctionsApi.md#functions_create) | **POST** /functions | Create function
[**functions_create_build**](FunctionsApi.md#functions_create_build) | **POST** /functions/{functionId}/deployments/{deploymentId}/builds/{buildId} | Create build
[**functions_create_deployment**](FunctionsApi.md#functions_create_deployment) | **POST** /functions/{functionId}/deployments | Create deployment
[**functions_create_execution**](FunctionsApi.md#functions_create_execution) | **POST** /functions/{functionId}/executions | Create execution
[**functions_create_variable**](FunctionsApi.md#functions_create_variable) | **POST** /functions/{functionId}/variables | Create variable
[**functions_delete**](FunctionsApi.md#functions_delete) | **DELETE** /functions/{functionId} | Delete function
[**functions_delete_deployment**](FunctionsApi.md#functions_delete_deployment) | **DELETE** /functions/{functionId}/deployments/{deploymentId} | Delete deployment
[**functions_delete_variable**](FunctionsApi.md#functions_delete_variable) | **DELETE** /functions/{functionId}/variables/{variableId} | Delete variable
[**functions_download_deployment**](FunctionsApi.md#functions_download_deployment) | **GET** /functions/{functionId}/deployments/{deploymentId}/download | Download Deployment
[**functions_get**](FunctionsApi.md#functions_get) | **GET** /functions/{functionId} | Get function
[**functions_get_deployment**](FunctionsApi.md#functions_get_deployment) | **GET** /functions/{functionId}/deployments/{deploymentId} | Get deployment
[**functions_get_execution**](FunctionsApi.md#functions_get_execution) | **GET** /functions/{functionId}/executions/{executionId} | Get execution
[**functions_get_variable**](FunctionsApi.md#functions_get_variable) | **GET** /functions/{functionId}/variables/{variableId} | Get variable
[**functions_list**](FunctionsApi.md#functions_list) | **GET** /functions | List functions
[**functions_list_deployments**](FunctionsApi.md#functions_list_deployments) | **GET** /functions/{functionId}/deployments | List deployments
[**functions_list_executions**](FunctionsApi.md#functions_list_executions) | **GET** /functions/{functionId}/executions | List executions
[**functions_list_runtimes**](FunctionsApi.md#functions_list_runtimes) | **GET** /functions/runtimes | List runtimes
[**functions_list_variables**](FunctionsApi.md#functions_list_variables) | **GET** /functions/{functionId}/variables | List variables
[**functions_update**](FunctionsApi.md#functions_update) | **PUT** /functions/{functionId} | Update function
[**functions_update_deployment**](FunctionsApi.md#functions_update_deployment) | **PATCH** /functions/{functionId}/deployments/{deploymentId} | Update function deployment
[**functions_update_variable**](FunctionsApi.md#functions_update_variable) | **PUT** /functions/{functionId}/variables/{variableId} | Update variable



## functions_create

> crate::models::Function functions_create(payload)
Create function

Create a new function. You can pass a list of [permissions](https://appwrite.io/docs/permissions) to allow different project users or team with access to execute the function using the client API.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**payload** | Option<[**FunctionsCreateRequest**](FunctionsCreateRequest.md)> |  |  |

### Return type

[**crate::models::Function**](function.md)

### Authorization

[Project](../README.md#Project), [Key](../README.md#Key)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## functions_create_build

> functions_create_build(function_id, deployment_id, build_id)
Create build

Create a new build for an Appwrite Function deployment. This endpoint can be used to retry a failed build.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**function_id** | **String** | Function ID. | [required] |
**deployment_id** | **String** | Deployment ID. | [required] |
**build_id** | **String** | Build unique ID. | [required] |

### Return type

 (empty response body)

### Authorization

[Project](../README.md#Project), [Key](../README.md#Key)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## functions_create_deployment

> crate::models::Deployment functions_create_deployment(function_id, code, activate, entrypoint, commands)
Create deployment

Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.  This endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https://appwrite.io/docs/functions).  Use the \"command\" param to set the entrypoint used to execute your code.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**function_id** | **String** | Function ID. | [required] |
**code** | **std::path::PathBuf** | Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory. | [required] |
**activate** | **bool** | Automatically activate the deployment when it is finished building. | [required] |
**entrypoint** | Option<**String**> | Entrypoint File. |  |
**commands** | Option<**String**> | Build Commands. |  |

### Return type

[**crate::models::Deployment**](deployment.md)

### Authorization

[Project](../README.md#Project), [Key](../README.md#Key)

### HTTP request headers

- **Content-Type**: multipart/form-data
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## functions_create_execution

> crate::models::Execution functions_create_execution(function_id, payload)
Create execution

Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**function_id** | **String** | Function ID. | [required] |
**payload** | Option<[**FunctionsCreateExecutionRequest**](FunctionsCreateExecutionRequest.md)> |  |  |

### Return type

[**crate::models::Execution**](execution.md)

### Authorization

[Project](../README.md#Project), [JWT](../README.md#JWT), [Key](../README.md#Key)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## functions_create_variable

> crate::models::Variable functions_create_variable(function_id, payload)
Create variable

Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**function_id** | **String** | Function unique ID. | [required] |
**payload** | Option<[**FunctionsCreateVariableRequest**](FunctionsCreateVariableRequest.md)> |  |  |

### Return type

[**crate::models::Variable**](variable.md)

### Authorization

[Project](../README.md#Project), [Key](../README.md#Key)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## functions_delete

> functions_delete(function_id)
Delete function

Delete a function by its unique ID.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**function_id** | **String** | Function ID. | [required] |

### Return type

 (empty response body)

### Authorization

[Project](../README.md#Project), [Key](../README.md#Key)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## functions_delete_deployment

> functions_delete_deployment(function_id, deployment_id)
Delete deployment

Delete a code deployment by its unique ID.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**function_id** | **String** | Function ID. | [required] |
**deployment_id** | **String** | Deployment ID. | [required] |

### Return type

 (empty response body)

### Authorization

[Project](../README.md#Project), [Key](../README.md#Key)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## functions_delete_variable

> functions_delete_variable(function_id, variable_id)
Delete variable

Delete a variable by its unique ID.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**function_id** | **String** | Function unique ID. | [required] |
**variable_id** | **String** | Variable unique ID. | [required] |

### Return type

 (empty response body)

### Authorization

[Project](../README.md#Project), [Key](../README.md#Key)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## functions_download_deployment

> std::path::PathBuf functions_download_deployment(function_id, deployment_id)
Download Deployment

Get a Deployment's contents by its unique ID. This endpoint supports range requests for partial or streaming file download.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**function_id** | **String** | Function ID. | [required] |
**deployment_id** | **String** | Deployment ID. | [required] |

### Return type

[**std::path::PathBuf**](std::path::PathBuf.md)

### Authorization

[Project](../README.md#Project), [Key](../README.md#Key)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: */*

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## functions_get

> crate::models::Function functions_get(function_id)
Get function

Get a function by its unique ID.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**function_id** | **String** | Function ID. | [required] |

### Return type

[**crate::models::Function**](function.md)

### Authorization

[Project](../README.md#Project), [Key](../README.md#Key)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## functions_get_deployment

> crate::models::Deployment functions_get_deployment(function_id, deployment_id)
Get deployment

Get a code deployment by its unique ID.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**function_id** | **String** | Function ID. | [required] |
**deployment_id** | **String** | Deployment ID. | [required] |

### Return type

[**crate::models::Deployment**](deployment.md)

### Authorization

[Project](../README.md#Project), [Key](../README.md#Key)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## functions_get_execution

> crate::models::Execution functions_get_execution(function_id, execution_id)
Get execution

Get a function execution log by its unique ID.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**function_id** | **String** | Function ID. | [required] |
**execution_id** | **String** | Execution ID. | [required] |

### Return type

[**crate::models::Execution**](execution.md)

### Authorization

[Project](../README.md#Project), [JWT](../README.md#JWT), [Key](../README.md#Key)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## functions_get_variable

> crate::models::Variable functions_get_variable(function_id, variable_id)
Get variable

Get a variable by its unique ID.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**function_id** | **String** | Function unique ID. | [required] |
**variable_id** | **String** | Variable unique ID. | [required] |

### Return type

[**crate::models::Variable**](variable.md)

### Authorization

[Project](../README.md#Project), [Key](../README.md#Key)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## functions_list

> crate::models::FunctionList functions_list(queries, search)
List functions

Get a list of all the project's functions. You can use the query params to filter your results.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**queries** | Option<[**Vec<String>**](String.md)> | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deployment, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId |  |[default to []]
**search** | Option<**String**> | Search term to filter your list results. Max length: 256 chars. |  |

### Return type

[**crate::models::FunctionList**](functionList.md)

### Authorization

[Project](../README.md#Project), [Key](../README.md#Key)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## functions_list_deployments

> crate::models::DeploymentList functions_list_deployments(function_id, queries, search)
List deployments

Get a list of all the project's code deployments. You can use the query params to filter your results.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**function_id** | **String** | Function ID. | [required] |
**queries** | Option<[**Vec<String>**](String.md)> | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: size, buildId, activate, entrypoint, commands |  |[default to []]
**search** | Option<**String**> | Search term to filter your list results. Max length: 256 chars. |  |

### Return type

[**crate::models::DeploymentList**](deploymentList.md)

### Authorization

[Project](../README.md#Project), [Key](../README.md#Key)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## functions_list_executions

> crate::models::ExecutionList functions_list_executions(function_id, queries, search)
List executions

Get a list of all the current user function execution logs. You can use the query params to filter your results.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**function_id** | **String** | Function ID. | [required] |
**queries** | Option<[**Vec<String>**](String.md)> | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration |  |[default to []]
**search** | Option<**String**> | Search term to filter your list results. Max length: 256 chars. |  |

### Return type

[**crate::models::ExecutionList**](executionList.md)

### Authorization

[Project](../README.md#Project), [JWT](../README.md#JWT), [Key](../README.md#Key)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## functions_list_runtimes

> crate::models::RuntimeList functions_list_runtimes()
List runtimes

Get a list of all runtimes that are currently active on your instance.

### Parameters

This endpoint does not need any parameter.

### Return type

[**crate::models::RuntimeList**](runtimeList.md)

### Authorization

[Project](../README.md#Project), [Key](../README.md#Key)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## functions_list_variables

> crate::models::VariableList functions_list_variables(function_id)
List variables

Get a list of all variables of a specific function.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**function_id** | **String** | Function unique ID. | [required] |

### Return type

[**crate::models::VariableList**](variableList.md)

### Authorization

[Project](../README.md#Project), [Key](../README.md#Key)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## functions_update

> crate::models::Function functions_update(function_id, payload)
Update function

Update function by its unique ID.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**function_id** | **String** | Function ID. | [required] |
**payload** | Option<[**FunctionsUpdateRequest**](FunctionsUpdateRequest.md)> |  |  |

### Return type

[**crate::models::Function**](function.md)

### Authorization

[Project](../README.md#Project), [Key](../README.md#Key)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## functions_update_deployment

> crate::models::Function functions_update_deployment(function_id, deployment_id)
Update function deployment

Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**function_id** | **String** | Function ID. | [required] |
**deployment_id** | **String** | Deployment ID. | [required] |

### Return type

[**crate::models::Function**](function.md)

### Authorization

[Project](../README.md#Project), [Key](../README.md#Key)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## functions_update_variable

> crate::models::Variable functions_update_variable(function_id, variable_id, payload)
Update variable

Update variable by its unique ID.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**function_id** | **String** | Function unique ID. | [required] |
**variable_id** | **String** | Variable unique ID. | [required] |
**payload** | Option<[**FunctionsUpdateVariableRequest**](FunctionsUpdateVariableRequest.md)> |  |  |

### Return type

[**crate::models::Variable**](variable.md)

### Authorization

[Project](../README.md#Project), [Key](../README.md#Key)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)