All URIs are relative to https://test-api.configcat.com
Method | HTTP request | Description |
---|---|---|
CreateIntegration | Post /v1/products/{productId}/integrations | Create Integration |
DeleteIntegration | Delete /v1/integrations/{integrationId} | Delete Integration |
GetIntegration | Get /v1/integrations/{integrationId} | Get Integration |
GetIntegrations | Get /v1/products/{productId}/integrations | List Integrations |
UpdateIntegration | Put /v1/integrations/{integrationId} | Update Integration |
IntegrationModel CreateIntegration(ctx, productId).CreateIntegrationModel(createIntegrationModel).Execute()
Create Integration
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/configcat/configcat-publicapi-go-client/v2"
)
func main() {
productId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The identifier of the Product.
createIntegrationModel := *openapiclient.NewCreateIntegrationModel(openapiclient.IntegrationType("dataDog"), "Name_example", map[string]string{"key": "Inner_example"}, []string{"EnvironmentIds_example"}, []string{"ConfigIds_example"}) // CreateIntegrationModel |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.IntegrationsAPI.CreateIntegration(context.Background(), productId).CreateIntegrationModel(createIntegrationModel).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IntegrationsAPI.CreateIntegration``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateIntegration`: IntegrationModel
fmt.Fprintf(os.Stdout, "Response from `IntegrationsAPI.CreateIntegration`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
productId | string | The identifier of the Product. |
Other parameters are passed through a pointer to a apiCreateIntegrationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
createIntegrationModel | CreateIntegrationModel | |
- Content-Type: application/json, text/json, application/*+json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteIntegration(ctx, integrationId).Execute()
Delete Integration
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/configcat/configcat-publicapi-go-client/v2"
)
func main() {
integrationId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The identifier of the Integration.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.IntegrationsAPI.DeleteIntegration(context.Background(), integrationId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IntegrationsAPI.DeleteIntegration``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
integrationId | string | The identifier of the Integration. |
Other parameters are passed through a pointer to a apiDeleteIntegrationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
IntegrationModel GetIntegration(ctx, integrationId).Execute()
Get Integration
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/configcat/configcat-publicapi-go-client/v2"
)
func main() {
integrationId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The identifier of the Integration.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.IntegrationsAPI.GetIntegration(context.Background(), integrationId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IntegrationsAPI.GetIntegration``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetIntegration`: IntegrationModel
fmt.Fprintf(os.Stdout, "Response from `IntegrationsAPI.GetIntegration`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
integrationId | string | The identifier of the Integration. |
Other parameters are passed through a pointer to a apiGetIntegrationRequest 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]
IntegrationsModel GetIntegrations(ctx, productId).Execute()
List Integrations
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/configcat/configcat-publicapi-go-client/v2"
)
func main() {
productId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The identifier of the Product.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.IntegrationsAPI.GetIntegrations(context.Background(), productId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IntegrationsAPI.GetIntegrations``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetIntegrations`: IntegrationsModel
fmt.Fprintf(os.Stdout, "Response from `IntegrationsAPI.GetIntegrations`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
productId | string | The identifier of the Product. |
Other parameters are passed through a pointer to a apiGetIntegrationsRequest 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]
IntegrationModel UpdateIntegration(ctx, integrationId).ModifyIntegrationRequest(modifyIntegrationRequest).Execute()
Update Integration
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/configcat/configcat-publicapi-go-client/v2"
)
func main() {
integrationId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The identifier of the Integration.
modifyIntegrationRequest := *openapiclient.NewModifyIntegrationRequest("Name_example", map[string]string{"key": "Inner_example"}, []string{"EnvironmentIds_example"}, []string{"ConfigIds_example"}) // ModifyIntegrationRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.IntegrationsAPI.UpdateIntegration(context.Background(), integrationId).ModifyIntegrationRequest(modifyIntegrationRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `IntegrationsAPI.UpdateIntegration``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateIntegration`: IntegrationModel
fmt.Fprintf(os.Stdout, "Response from `IntegrationsAPI.UpdateIntegration`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
integrationId | string | The identifier of the Integration. |
Other parameters are passed through a pointer to a apiUpdateIntegrationRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
modifyIntegrationRequest | ModifyIntegrationRequest | |
- Content-Type: application/json, text/json, application/*+json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]