All URIs are relative to https://rudder.example.local/rudder/api/latest
Method | HTTP request | Description |
---|---|---|
CheckDirective | Post /directives/{directiveId}/check | Check that update on a directive is valid |
CreateDirective | Put /directives | Create a directive |
DeleteDirective | Delete /directives/{directiveId} | Delete a directive |
DirectiveDetails | Get /directives/{directiveId} | Get directive details |
ListDirectives | Get /directives | List all directives |
UpdateDirective | Post /directives/{directiveId} | Update a directive details |
CheckDirective200Response CheckDirective(ctx, directiveId).Directive(directive).Execute()
Check that update on a directive is valid
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/juhnny5/rudder-golang"
)
func main() {
directiveId := "9a1773c9-0889-40b6-be89-f6504443ac1b" // string | Id of the directive
directive := *openapiclient.NewDirective() // Directive |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DirectivesAPI.CheckDirective(context.Background(), directiveId).Directive(directive).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DirectivesAPI.CheckDirective``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CheckDirective`: CheckDirective200Response
fmt.Fprintf(os.Stdout, "Response from `DirectivesAPI.CheckDirective`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
directiveId | string | Id of the directive |
Other parameters are passed through a pointer to a apiCheckDirectiveRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
directive | Directive | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateDirective200Response CreateDirective(ctx).DirectiveNew(directiveNew).Execute()
Create a directive
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/juhnny5/rudder-golang"
)
func main() {
directiveNew := *openapiclient.NewDirectiveNew() // DirectiveNew | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DirectivesAPI.CreateDirective(context.Background()).DirectiveNew(directiveNew).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DirectivesAPI.CreateDirective``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateDirective`: CreateDirective200Response
fmt.Fprintf(os.Stdout, "Response from `DirectivesAPI.CreateDirective`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateDirectiveRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
directiveNew | DirectiveNew |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteDirective200Response DeleteDirective(ctx, directiveId).Execute()
Delete a directive
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/juhnny5/rudder-golang"
)
func main() {
directiveId := "9a1773c9-0889-40b6-be89-f6504443ac1b" // string | Id of the directive
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DirectivesAPI.DeleteDirective(context.Background(), directiveId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DirectivesAPI.DeleteDirective``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteDirective`: DeleteDirective200Response
fmt.Fprintf(os.Stdout, "Response from `DirectivesAPI.DeleteDirective`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
directiveId | string | Id of the directive |
Other parameters are passed through a pointer to a apiDeleteDirectiveRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DirectiveDetails200Response DirectiveDetails(ctx, directiveId).Execute()
Get directive details
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/juhnny5/rudder-golang"
)
func main() {
directiveId := "9a1773c9-0889-40b6-be89-f6504443ac1b" // string | Id of the directive
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DirectivesAPI.DirectiveDetails(context.Background(), directiveId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DirectivesAPI.DirectiveDetails``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DirectiveDetails`: DirectiveDetails200Response
fmt.Fprintf(os.Stdout, "Response from `DirectivesAPI.DirectiveDetails`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
directiveId | string | Id of the directive |
Other parameters are passed through a pointer to a apiDirectiveDetailsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListDirectives200Response ListDirectives(ctx).Execute()
List all directives
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/juhnny5/rudder-golang"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DirectivesAPI.ListDirectives(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DirectivesAPI.ListDirectives``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListDirectives`: ListDirectives200Response
fmt.Fprintf(os.Stdout, "Response from `DirectivesAPI.ListDirectives`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListDirectivesRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateDirective200Response UpdateDirective(ctx, directiveId).Directive(directive).Execute()
Update a directive details
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/juhnny5/rudder-golang"
)
func main() {
directiveId := "9a1773c9-0889-40b6-be89-f6504443ac1b" // string | Id of the directive
directive := *openapiclient.NewDirective() // Directive |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DirectivesAPI.UpdateDirective(context.Background(), directiveId).Directive(directive).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DirectivesAPI.UpdateDirective``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateDirective`: UpdateDirective200Response
fmt.Fprintf(os.Stdout, "Response from `DirectivesAPI.UpdateDirective`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
directiveId | string | Id of the directive |
Other parameters are passed through a pointer to a apiUpdateDirectiveRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
directive | Directive | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]