All URIs are relative to https://api.segmentapis.com
Method | HTTP request | Description |
---|---|---|
CreateTransformation | Post /transformations | Create Transformation |
DeleteTransformation | Delete /transformations/{transformationId} | Delete Transformation |
GetTransformation | Get /transformations/{transformationId} | Get Transformation |
ListTransformations | Get /transformations | List Transformations |
UpdateTransformation | Patch /transformations/{transformationId} | Update Transformation |
CreateTransformation200Response CreateTransformation(ctx).CreateTransformationV1Input(createTransformationV1Input).Execute()
Create Transformation
package main
import (
"context"
"fmt"
"os"
api "github.com/segmentio/public-api-sdk-go"
)
func main() {
createTransformationV1Input := *api.NewCreateTransformationV1Input("Name_example", "SourceId_example", false, "If_example") // CreateTransformationV1Input |
configuration := api.NewConfiguration()
apiClient := api.NewAPIClient(configuration)
token := "<BEARER_TOKEN>"
ctx := context.WithValue(context.Background(), api.ContextAccessToken, token)
resp, r, err := apiClient.TransformationsAPI.CreateTransformation(ctx).CreateTransformationV1Input(createTransformationV1Input).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransformationsAPI.CreateTransformation``: %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 `CreateTransformation`: CreateTransformation200Response
fmt.Fprintf(os.Stdout, "Response from `TransformationsAPI.CreateTransformation`: %v\n", resp.GetData())
}
Other parameters are passed through a pointer to a apiCreateTransformationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
createTransformationV1Input | CreateTransformationV1Input |
CreateTransformation200Response
- Content-Type: application/json, application/vnd.segment.v1+json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
- Accept: application/vnd.segment.v1+json, application/json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteTransformation200Response DeleteTransformation(ctx, transformationId).Execute()
Delete Transformation
package main
import (
"context"
"fmt"
"os"
api "github.com/segmentio/public-api-sdk-go"
)
func main() {
transformationId := "2c0vVuRdDmJ3UQkVjd5WxaA3dar" // string |
configuration := api.NewConfiguration()
apiClient := api.NewAPIClient(configuration)
token := "<BEARER_TOKEN>"
ctx := context.WithValue(context.Background(), api.ContextAccessToken, token)
resp, r, err := apiClient.TransformationsAPI.DeleteTransformation(ctx, transformationId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransformationsAPI.DeleteTransformation``: %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 `DeleteTransformation`: DeleteTransformation200Response
fmt.Fprintf(os.Stdout, "Response from `TransformationsAPI.DeleteTransformation`: %v\n", resp.GetData())
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
transformationId | string |
Other parameters are passed through a pointer to a apiDeleteTransformationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
DeleteTransformation200Response
- Content-Type: Not defined
- Accept: application/vnd.segment.v1+json, application/json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetTransformation200Response GetTransformation(ctx, transformationId).Execute()
Get Transformation
package main
import (
"context"
"fmt"
"os"
api "github.com/segmentio/public-api-sdk-go"
)
func main() {
transformationId := "pHrD51Ds35Zjfka84yXQE6" // string |
configuration := api.NewConfiguration()
apiClient := api.NewAPIClient(configuration)
token := "<BEARER_TOKEN>"
ctx := context.WithValue(context.Background(), api.ContextAccessToken, token)
resp, r, err := apiClient.TransformationsAPI.GetTransformation(ctx, transformationId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransformationsAPI.GetTransformation``: %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 `GetTransformation`: GetTransformation200Response
fmt.Fprintf(os.Stdout, "Response from `TransformationsAPI.GetTransformation`: %v\n", resp.GetData())
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
transformationId | string |
Other parameters are passed through a pointer to a apiGetTransformationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/vnd.segment.v1+json, application/json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListTransformations200Response ListTransformations(ctx).Pagination(pagination).Execute()
List Transformations
package main
import (
"context"
"fmt"
"os"
api "github.com/segmentio/public-api-sdk-go"
)
func main() {
pagination := *api.NewPaginationInput(10) // PaginationInput | Pagination options. This parameter exists in v1. (optional)
configuration := api.NewConfiguration()
apiClient := api.NewAPIClient(configuration)
token := "<BEARER_TOKEN>"
ctx := context.WithValue(context.Background(), api.ContextAccessToken, token)
resp, r, err := apiClient.TransformationsAPI.ListTransformations(ctx).Pagination(pagination).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransformationsAPI.ListTransformations``: %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 `ListTransformations`: ListTransformations200Response
fmt.Fprintf(os.Stdout, "Response from `TransformationsAPI.ListTransformations`: %v\n", resp.GetData())
}
Other parameters are passed through a pointer to a apiListTransformationsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
pagination | PaginationInput | Pagination options. This parameter exists in v1. |
ListTransformations200Response
- Content-Type: Not defined
- Accept: application/vnd.segment.v1+json, application/json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateTransformation200Response UpdateTransformation(ctx, transformationId).UpdateTransformationV1Input(updateTransformationV1Input).Execute()
Update Transformation
package main
import (
"context"
"fmt"
"os"
api "github.com/segmentio/public-api-sdk-go"
)
func main() {
transformationId := "pHrD51Ds35Zjfka84yXQE6" // string |
updateTransformationV1Input := *api.NewUpdateTransformationV1Input() // UpdateTransformationV1Input |
configuration := api.NewConfiguration()
apiClient := api.NewAPIClient(configuration)
token := "<BEARER_TOKEN>"
ctx := context.WithValue(context.Background(), api.ContextAccessToken, token)
resp, r, err := apiClient.TransformationsAPI.UpdateTransformation(ctx, transformationId).UpdateTransformationV1Input(updateTransformationV1Input).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransformationsAPI.UpdateTransformation``: %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 `UpdateTransformation`: UpdateTransformation200Response
fmt.Fprintf(os.Stdout, "Response from `TransformationsAPI.UpdateTransformation`: %v\n", resp.GetData())
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
transformationId | string |
Other parameters are passed through a pointer to a apiUpdateTransformationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
updateTransformationV1Input | UpdateTransformationV1Input | |
UpdateTransformation200Response
- Content-Type: application/json, application/vnd.segment.v1+json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
- Accept: application/vnd.segment.v1+json, application/json, application/vnd.segment.v1beta+json, application/vnd.segment.v1alpha+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]