# \NativeTriggerApi

All URIs are relative to */api*

Method | HTTP request | Description
------------- | ------------- | -------------
[**create_native_trigger**](NativeTriggerApi.md#create_native_trigger) | **POST** /w/{workspace}/native_triggers/{service_name}/create | create native trigger
[**delete_native_trigger**](NativeTriggerApi.md#delete_native_trigger) | **DELETE** /w/{workspace}/native_triggers/{service_name}/delete/{external_id} | delete native trigger
[**exists_native_trigger**](NativeTriggerApi.md#exists_native_trigger) | **GET** /w/{workspace}/native_triggers/{service_name}/exists/{external_id} | check if native trigger exists
[**get_native_trigger**](NativeTriggerApi.md#get_native_trigger) | **GET** /w/{workspace}/native_triggers/{service_name}/get/{external_id} | get native trigger
[**list_github_repos**](NativeTriggerApi.md#list_github_repos) | **GET** /w/{workspace}/native_triggers/github/repos | list GitHub repositories accessible to the user
[**list_google_calendars**](NativeTriggerApi.md#list_google_calendars) | **GET** /w/{workspace}/native_triggers/google/calendars | list Google Calendars for the authenticated user
[**list_google_drive_files**](NativeTriggerApi.md#list_google_drive_files) | **GET** /w/{workspace}/native_triggers/google/drive/files | list or search Google Drive files
[**list_google_shared_drives**](NativeTriggerApi.md#list_google_shared_drives) | **GET** /w/{workspace}/native_triggers/google/drive/shared_drives | list shared drives accessible to the user
[**list_native_triggers**](NativeTriggerApi.md#list_native_triggers) | **GET** /w/{workspace}/native_triggers/{service_name}/list | list native triggers
[**list_next_cloud_events**](NativeTriggerApi.md#list_next_cloud_events) | **GET** /w/{workspace}/native_triggers/nextcloud/events | list available NextCloud events
[**native_trigger_webhook**](NativeTriggerApi.md#native_trigger_webhook) | **POST** /native_triggers/{service_name}/w/{workspace_id}/webhook/{internal_id} | receive webhook from external native trigger service
[**sync_native_triggers**](NativeTriggerApi.md#sync_native_triggers) | **POST** /w/{workspace}/native_triggers/{service_name}/sync | sync native triggers with external service
[**update_native_trigger**](NativeTriggerApi.md#update_native_trigger) | **POST** /w/{workspace}/native_triggers/{service_name}/update/{external_id} | update native trigger



## create_native_trigger

> models::CreateTriggerResponse create_native_trigger(workspace, service_name, native_trigger_data)
create native trigger

Creates a new native trigger for the specified service. Requires write access to the script or flow that the trigger will be associated with. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**workspace** | **String** |  | [required] |
**service_name** | [**NativeServiceName**](.md) |  | [required] |
**native_trigger_data** | [**NativeTriggerData**](NativeTriggerData.md) | new native trigger configuration | [required] |

### Return type

[**models::CreateTriggerResponse**](CreateTriggerResponse.md)

### Authorization

[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)

### 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)


## delete_native_trigger

> String delete_native_trigger(workspace, service_name, external_id)
delete native trigger

Deletes a native trigger by its external ID. Requires write access to the script or flow that the trigger is associated with. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**workspace** | **String** |  | [required] |
**service_name** | [**NativeServiceName**](.md) |  | [required] |
**external_id** | **String** | The external ID of the trigger from the external service | [required] |

### Return type

**String**

### Authorization

[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

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

[[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)


## exists_native_trigger

> bool exists_native_trigger(workspace, service_name, external_id)
check if native trigger exists

Checks if a native trigger with the given external ID exists.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**workspace** | **String** |  | [required] |
**service_name** | [**NativeServiceName**](.md) |  | [required] |
**external_id** | **String** | The external ID of the trigger from the external service | [required] |

### Return type

**bool**

### Authorization

[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)

### 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)


## get_native_trigger

> models::NativeTriggerWithExternal get_native_trigger(workspace, service_name, external_id)
get native trigger

Retrieves a native trigger by its external ID. Requires write access to the script or flow that the trigger is associated with. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**workspace** | **String** |  | [required] |
**service_name** | [**NativeServiceName**](.md) |  | [required] |
**external_id** | **String** | The external ID of the trigger from the external service | [required] |

### Return type

[**models::NativeTriggerWithExternal**](NativeTriggerWithExternal.md)

### Authorization

[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)

### 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)


## list_github_repos

> Vec<models::GithubRepoEntry> list_github_repos(workspace)
list GitHub repositories accessible to the user

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**workspace** | **String** |  | [required] |

### Return type

[**Vec<models::GithubRepoEntry>**](GithubRepoEntry.md)

### Authorization

[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)

### 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)


## list_google_calendars

> Vec<models::GoogleCalendarEntry> list_google_calendars(workspace)
list Google Calendars for the authenticated user

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**workspace** | **String** |  | [required] |

### Return type

[**Vec<models::GoogleCalendarEntry>**](GoogleCalendarEntry.md)

### Authorization

[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)

### 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)


## list_google_drive_files

> models::GoogleDriveFilesResponse list_google_drive_files(workspace, q, parent_id, page_token, shared_with_me)
list or search Google Drive files

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**workspace** | **String** |  | [required] |
**q** | Option<**String**> | search query to filter files by name |  |
**parent_id** | Option<**String**> | folder ID to list children of |  |
**page_token** | Option<**String**> | token for next page of results |  |
**shared_with_me** | Option<**bool**> | if true, list files shared with the user |  |[default to false]

### Return type

[**models::GoogleDriveFilesResponse**](GoogleDriveFilesResponse.md)

### Authorization

[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)

### 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)


## list_google_shared_drives

> Vec<models::SharedDriveEntry> list_google_shared_drives(workspace)
list shared drives accessible to the user

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**workspace** | **String** |  | [required] |

### Return type

[**Vec<models::SharedDriveEntry>**](SharedDriveEntry.md)

### Authorization

[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)

### 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)


## list_native_triggers

> Vec<models::NativeTrigger> list_native_triggers(workspace, service_name, page, per_page, path, is_flow, label)
list native triggers

Lists all native triggers for the specified service in the workspace.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**workspace** | **String** |  | [required] |
**service_name** | [**NativeServiceName**](.md) |  | [required] |
**page** | Option<**i32**> | which page to return (start at 1, default 1) |  |
**per_page** | Option<**i32**> | number of items to return for a given page (default 30, max 100) |  |
**path** | Option<**String**> | filter by script path |  |
**is_flow** | Option<**bool**> | filter by is_flow |  |
**label** | Option<**String**> | Filter by label |  |

### Return type

[**Vec<models::NativeTrigger>**](NativeTrigger.md)

### Authorization

[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)

### 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)


## list_next_cloud_events

> Vec<models::NextCloudEventType> list_next_cloud_events(workspace)
list available NextCloud events

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**workspace** | **String** |  | [required] |

### Return type

[**Vec<models::NextCloudEventType>**](NextCloudEventType.md)

### Authorization

[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)

### 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)


## native_trigger_webhook

> String native_trigger_webhook(service_name, workspace_id, internal_id, request_body)
receive webhook from external native trigger service

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**service_name** | [**NativeServiceName**](.md) |  | [required] |
**workspace_id** | **String** |  | [required] |
**internal_id** | **i64** | The internal database ID of the trigger | [required] |
**request_body** | Option<[**std::collections::HashMap<String, serde_json::Value>**](serde_json::Value.md)> | webhook payload from external service |  |

### Return type

**String**

### Authorization

[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: application/json, text/plain
- **Accept**: text/plain

[[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)


## sync_native_triggers

> sync_native_triggers(workspace, service_name)
sync native triggers with external service

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**workspace** | **String** |  | [required] |
**service_name** | [**NativeServiceName**](.md) |  | [required] |

### Return type

 (empty response body)

### Authorization

[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)

### 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)


## update_native_trigger

> String update_native_trigger(workspace, service_name, external_id, native_trigger_data)
update native trigger

Updates an existing native trigger. Requires write access to the script or flow that the trigger is associated with. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**workspace** | **String** |  | [required] |
**service_name** | [**NativeServiceName**](.md) |  | [required] |
**external_id** | **String** | The external ID of the trigger from the external service | [required] |
**native_trigger_data** | [**NativeTriggerData**](NativeTriggerData.md) | updated native trigger configuration | [required] |

### Return type

**String**

### Authorization

[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

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

[[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)

