|
| 1 | +# segment_public_api.DBTApi |
| 2 | + |
| 3 | +All URIs are relative to *https://api.segmentapis.com* |
| 4 | + |
| 5 | +Method | HTTP request | Description |
| 6 | +------------- | ------------- | ------------- |
| 7 | +[**create_dbt_model_sync_trigger**](DBTApi.md#create_dbt_model_sync_trigger) | **POST** /dbt-model-syncs/trigger | Create Dbt Model Sync Trigger |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | +## Operation: create_dbt_model_sync_trigger |
| 12 | + |
| 13 | +> CreateDbtModelSyncTrigger200Response create_dbt_model_sync_trigger(create_dbt_model_sync_trigger_input) |
| 14 | +
|
| 15 | +Create Dbt Model Sync Trigger |
| 16 | + |
| 17 | +Creates a trigger for a new dbt model sync for a Source. The rate limit for this endpoint is 10 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information. |
| 18 | + |
| 19 | +### Example |
| 20 | + |
| 21 | +* Bearer Authentication (token): |
| 22 | +```python |
| 23 | +import time |
| 24 | +import os |
| 25 | +import segment_public_api |
| 26 | +from segment_public_api.models.create_dbt_model_sync_trigger200_response import CreateDbtModelSyncTrigger200Response |
| 27 | +from segment_public_api.models.create_dbt_model_sync_trigger_input import CreateDbtModelSyncTriggerInput |
| 28 | +from segment_public_api.rest import ApiException |
| 29 | +from pprint import pprint |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | +# Configure Bearer authorization: token |
| 34 | +configuration = segment_public_api.Configuration( |
| 35 | + access_token = os.environ["BEARER_TOKEN"] |
| 36 | +) |
| 37 | + |
| 38 | +# Enter a context with an instance of the API client |
| 39 | +with segment_public_api.ApiClient(configuration) as api_client: |
| 40 | + # Create an instance of the API class |
| 41 | + api_instance = segment_public_api.DBTApi(api_client) |
| 42 | + create_dbt_model_sync_trigger_input = {"sourceId":"source-id"} # CreateDbtModelSyncTriggerInput | |
| 43 | + |
| 44 | + try: |
| 45 | + # Create Dbt Model Sync Trigger |
| 46 | + api_response = api_instance.create_dbt_model_sync_trigger(create_dbt_model_sync_trigger_input) |
| 47 | + print("The response of DBTApi->create_dbt_model_sync_trigger:\n") |
| 48 | + pprint(api_response) |
| 49 | + except Exception as e: |
| 50 | + print("Exception when calling DBTApi->create_dbt_model_sync_trigger: %s\n" % e) |
| 51 | +``` |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | +### Parameters |
| 56 | + |
| 57 | +Name | Type | Description | Notes |
| 58 | +------------- | ------------- | ------------- | ------------- |
| 59 | + **create_dbt_model_sync_trigger_input** | [**CreateDbtModelSyncTriggerInput**](CreateDbtModelSyncTriggerInput.md)| | |
| 60 | + |
| 61 | +### Return type |
| 62 | + |
| 63 | +[**CreateDbtModelSyncTrigger200Response**](CreateDbtModelSyncTrigger200Response.md) |
| 64 | + |
| 65 | +### Authorization |
| 66 | + |
| 67 | +[token](../README.md#token) |
| 68 | + |
| 69 | +### HTTP request headers |
| 70 | + |
| 71 | + - **Content-Type**: application/vnd.segment.v1beta+json |
| 72 | + - **Accept**: application/vnd.segment.v1beta+json, application/json |
| 73 | + |
| 74 | +### HTTP response details |
| 75 | +| Status code | Description | Response headers | |
| 76 | +|-------------|-------------|------------------| |
| 77 | +**200** | OK | - | |
| 78 | +**404** | Resource not found | - | |
| 79 | +**422** | Validation failure | - | |
| 80 | +**429** | Too many requests | - | |
| 81 | + |
| 82 | +[[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) |
| 83 | + |
0 commit comments