Skip to content

Latest commit

 

History

History
83 lines (54 loc) · 2.58 KB

DbtAPI.md

File metadata and controls

83 lines (54 loc) · 2.58 KB

\DbtAPI

All URIs are relative to https://api.segmentapis.com

Method HTTP request Description
CreateDbtModelSyncTrigger Post /dbt-model-syncs/trigger Create Dbt Model Sync Trigger

Operation: CreateDbtModelSyncTrigger

CreateDbtModelSyncTrigger200Response CreateDbtModelSyncTrigger(ctx).CreateDbtModelSyncTriggerInput(createDbtModelSyncTriggerInput).Execute()

Create Dbt Model Sync Trigger

Example

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())
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCreateDbtModelSyncTriggerRequest struct via the builder pattern

Name Type Description Notes
createDbtModelSyncTriggerInput CreateDbtModelSyncTriggerInput

Return type

CreateDbtModelSyncTrigger200Response

Authorization

token

HTTP request headers

  • 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]