All URIs are relative to https://api.segmentapis.com
Method | HTTP request | Description |
---|---|---|
CreateDbtModelSyncTrigger | Post /dbt-model-syncs/trigger | Create Dbt Model Sync Trigger |
CreateDbtModelSyncTrigger200Response CreateDbtModelSyncTrigger(ctx).CreateDbtModelSyncTriggerInput(createDbtModelSyncTriggerInput).Execute()
Create Dbt Model Sync Trigger
package main
import (
"context"
"fmt"
"os"
api "github.com/segmentio/public-api-sdk-go"
)
func main() {
createDbtModelSyncTriggerInput := *api.NewCreateDbtModelSyncTriggerInput("SourceId_example") // CreateDbtModelSyncTriggerInput |
configuration := api.NewConfiguration()
apiClient := api.NewAPIClient(configuration)
token := "<BEARER_TOKEN>"
ctx := context.WithValue(context.Background(), api.ContextAccessToken, token)
resp, r, err := apiClient.DbtAPI.CreateDbtModelSyncTrigger(ctx).CreateDbtModelSyncTriggerInput(createDbtModelSyncTriggerInput).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DbtAPI.CreateDbtModelSyncTrigger``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
responseErrors := api.UnwrapFullErrors(err)
if responseErrors != nil {
for _, responseError := range responseErrors.Errors {
fmt.Fprintf(os.Stderr, "Full error message: %v\n", *responseError.Message)
}
}
}
// response from `CreateDbtModelSyncTrigger`: CreateDbtModelSyncTrigger200Response
fmt.Fprintf(os.Stdout, "Response from `DbtAPI.CreateDbtModelSyncTrigger`: %v\n", resp.GetData())
}
Other parameters are passed through a pointer to a apiCreateDbtModelSyncTriggerRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
createDbtModelSyncTriggerInput | CreateDbtModelSyncTriggerInput |
CreateDbtModelSyncTrigger200Response
- Content-Type: application/vnd.segment.v1beta+json
- Accept: application/vnd.segment.v1beta+json, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]