Skip to content

Latest commit

 

History

History
716 lines (454 loc) · 21.4 KB

TenantIntegrations.md

File metadata and controls

716 lines (454 loc) · 21.4 KB

\TenantIntegrations

All URIs are relative to https://pipes.turbot.com/api/v0

Method HTTP request Description
Command Post /integration/{integration_handle}/command Run tenant integration command
Create Post /integration Create tenant integration
Delete Delete /integration/{integration_handle} Delete tenant integration
Get Get /integration/{integration_handle} Get tenant integration
InstallGithubIntegration Get /integration/{integration_handle}/github/install Install GitHub integration on a custom tenant
InstallSlackIntegration Get /integration/{integration_handle}/slack/install Install Slack integration on a custom tenant
List Get /integration List tenant integrations
ListSlackChannels Get /integration/{integration_handle}/slack/channel List tenant integration Slack channels
Test Post /integration/{integration_handle}/test Test custom tenant integration
Update Patch /integration/{integration_handle} Update tenant integration

Command

IntegrationCommandRequest Command(ctx, integrationHandle).Request(request).Execute()

Run tenant integration command

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    integrationHandle := "integrationHandle_example" // string | The handle of the integration for which we want to run the command.
    request := *openapiclient.NewWorkspaceCommandRequest(openapiclient.WorkspaceCommandAction("reboot")) // WorkspaceCommandRequest | The request body for the workspace command.

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.TenantIntegrations.Command(context.Background(), integrationHandle).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TenantIntegrations.Command``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `Command`: IntegrationCommandRequest
    fmt.Fprintf(os.Stdout, "Response from `TenantIntegrations.Command`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
integrationHandle string The handle of the integration for which we want to run the command.

Other Parameters

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

Name Type Description Notes

request | WorkspaceCommandRequest | The request body for the workspace command. |

Return type

IntegrationCommandRequest

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Create

Integration Create(ctx).Request(request).Execute()

Create tenant integration

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    request := *openapiclient.NewCreateIntegrationRequest("Handle_example", map[string][]openapiclient.IntegrationType{"key": "TODO"}) // CreateIntegrationRequest | The request body for the integration to be created.

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.TenantIntegrations.Create(context.Background()).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TenantIntegrations.Create``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `Create`: Integration
    fmt.Fprintf(os.Stdout, "Response from `TenantIntegrations.Create`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
request CreateIntegrationRequest The request body for the integration to be created.

Return type

Integration

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Delete

Integration Delete(ctx, integrationHandle).Execute()

Delete tenant integration

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    integrationHandle := "integrationHandle_example" // string | The handle of the integration which needs to be deleted.

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.TenantIntegrations.Delete(context.Background(), integrationHandle).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TenantIntegrations.Delete``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `Delete`: Integration
    fmt.Fprintf(os.Stdout, "Response from `TenantIntegrations.Delete`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
integrationHandle string The handle of the integration which needs to be deleted.

Other Parameters

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

Name Type Description Notes

Return type

Integration

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Get

Integration Get(ctx, integrationHandle).Execute()

Get tenant integration

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    integrationHandle := "integrationHandle_example" // string | The handle of the integration whose details need to be retrieved.

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.TenantIntegrations.Get(context.Background(), integrationHandle).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TenantIntegrations.Get``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `Get`: Integration
    fmt.Fprintf(os.Stdout, "Response from `TenantIntegrations.Get`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
integrationHandle string The handle of the integration whose details need to be retrieved.

Other Parameters

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

Name Type Description Notes

Return type

Integration

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

InstallGithubIntegration

InstallGithubIntegration(ctx, integrationHandle).Execute()

Install GitHub integration on a custom tenant

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    integrationHandle := "integrationHandle_example" // string | The handle of the GitHub integration which needs to be installed.

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.TenantIntegrations.InstallGithubIntegration(context.Background(), integrationHandle).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TenantIntegrations.InstallGithubIntegration``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
integrationHandle string The handle of the GitHub integration which needs to be installed.

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

InstallSlackIntegration

InstallSlackIntegration(ctx, integrationHandle).Execute()

Install Slack integration on a custom tenant

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    integrationHandle := "integrationHandle_example" // string | The handle of the Slack integration which needs to be installed.

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.TenantIntegrations.InstallSlackIntegration(context.Background(), integrationHandle).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TenantIntegrations.InstallSlackIntegration``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
integrationHandle string The handle of the Slack integration which needs to be installed.

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

List

ListIntegrationsResponse List(ctx).Limit(limit).NextToken(nextToken).Execute()

List tenant integrations

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    limit := int32(56) // int32 | The max number of items to fetch per page of data, subject to a min and max of 1 and 100 respectively. If not specified will default to 25. (optional) (default to 25)
    nextToken := "nextToken_example" // string | When list results are truncated, next_token will be returned, which is a cursor to fetch the next page of data. Pass next_token to the subsequent list request to fetch the next page of data. (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.TenantIntegrations.List(context.Background()).Limit(limit).NextToken(nextToken).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TenantIntegrations.List``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `List`: ListIntegrationsResponse
    fmt.Fprintf(os.Stdout, "Response from `TenantIntegrations.List`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
limit int32 The max number of items to fetch per page of data, subject to a min and max of 1 and 100 respectively. If not specified will default to 25. [default to 25]
nextToken string When list results are truncated, next_token will be returned, which is a cursor to fetch the next page of data. Pass next_token to the subsequent list request to fetch the next page of data.

Return type

ListIntegrationsResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListSlackChannels

ListSlackChannelsResponse ListSlackChannels(ctx, integrationHandle).Limit(limit).NextToken(nextToken).Execute()

List tenant integration Slack channels

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    integrationHandle := "integrationHandle_example" // string | The handle of the integration for which Slack channels will be listed.
    limit := int32(56) // int32 | The max number of items to fetch per page of data, subject to a min and max of 1 and 100 respectively. If not specified will default to 25. (optional) (default to 25)
    nextToken := "nextToken_example" // string | When list results are truncated, next_token will be returned, which is a cursor to fetch the next page of data. Pass next_token to the subsequent list request to fetch the next page of data. (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.TenantIntegrations.ListSlackChannels(context.Background(), integrationHandle).Limit(limit).NextToken(nextToken).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TenantIntegrations.ListSlackChannels``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ListSlackChannels`: ListSlackChannelsResponse
    fmt.Fprintf(os.Stdout, "Response from `TenantIntegrations.ListSlackChannels`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
integrationHandle string The handle of the integration for which Slack channels will be listed.

Other Parameters

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

Name Type Description Notes

limit | int32 | The max number of items to fetch per page of data, subject to a min and max of 1 and 100 respectively. If not specified will default to 25. | [default to 25] nextToken | string | When list results are truncated, next_token will be returned, which is a cursor to fetch the next page of data. Pass next_token to the subsequent list request to fetch the next page of data. |

Return type

ListSlackChannelsResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Test

Integration Test(ctx, integrationHandle).Execute()

Test custom tenant integration

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    integrationHandle := "integrationHandle_example" // string | The handle of the integration to be tested. For integrations that are not yet created, use underscore `_` as the handle, else pass the handle of the existing integration.

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.TenantIntegrations.Test(context.Background(), integrationHandle).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TenantIntegrations.Test``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `Test`: Integration
    fmt.Fprintf(os.Stdout, "Response from `TenantIntegrations.Test`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
integrationHandle string The handle of the integration to be tested. For integrations that are not yet created, use underscore `_` as the handle, else pass the handle of the existing integration.

Other Parameters

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

Name Type Description Notes

Return type

Integration

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Update

Integration Update(ctx, integrationHandle).Request(request).Execute()

Update tenant integration

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    integrationHandle := "integrationHandle_example" // string | The handle of the integration whose details need to be updated.
    request := *openapiclient.NewUpdateIntegrationRequest() // UpdateIntegrationRequest | The request body for the integration update.

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.TenantIntegrations.Update(context.Background(), integrationHandle).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TenantIntegrations.Update``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `Update`: Integration
    fmt.Fprintf(os.Stdout, "Response from `TenantIntegrations.Update`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
integrationHandle string The handle of the integration whose details need to be updated.

Other Parameters

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

Name Type Description Notes

request | UpdateIntegrationRequest | The request body for the integration update. |

Return type

Integration

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]