(Integration)
- GetUnifiedIntegrationAuth - Create connection indirectly
- ListUnifiedIntegrationWorkspaces - Returns all activated integrations in a workspace
- ListUnifiedIntegrations - Returns all integrations
Returns an authorization URL for the specified integration. Once a successful authorization occurs, a new connection is created.
package main
import(
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"context"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"log"
)
func main() {
s := unifiedgosdk.New()
ctx := context.Background()
res, err := s.Integration.GetUnifiedIntegrationAuth(ctx, operations.GetUnifiedIntegrationAuthRequest{
IntegrationType: "<value>",
WorkspaceID: "<value>",
})
if err != nil {
log.Fatal(err)
}
if res.Res != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetUnifiedIntegrationAuthRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetUnifiedIntegrationAuthResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4XX, 5XX | */* |
No authentication required as this is to be used by front-end interface
package main
import(
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"context"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"log"
)
func main() {
s := unifiedgosdk.New()
ctx := context.Background()
res, err := s.Integration.ListUnifiedIntegrationWorkspaces(ctx, operations.ListUnifiedIntegrationWorkspacesRequest{
WorkspaceID: "<value>",
})
if err != nil {
log.Fatal(err)
}
if res.Integrations != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.ListUnifiedIntegrationWorkspacesRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ListUnifiedIntegrationWorkspacesResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4XX, 5XX | */* |
Returns all integrations
package main
import(
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"context"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"log"
)
func main() {
s := unifiedgosdk.New()
ctx := context.Background()
res, err := s.Integration.ListUnifiedIntegrations(ctx, operations.ListUnifiedIntegrationsRequest{})
if err != nil {
log.Fatal(err)
}
if res.Integrations != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.ListUnifiedIntegrationsRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ListUnifiedIntegrationsResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4XX, 5XX | */* |