Skip to content

Latest commit

 

History

History
1224 lines (802 loc) · 39.9 KB

IntegrationsApi.md

File metadata and controls

1224 lines (802 loc) · 39.9 KB

\IntegrationsApi

All URIs are relative to https://api.gitbook.com/v1

Method HTTP request Description
CreateIntegrationInstallationToken Post /integrations/{integrationName}/installations/{installationId}/tokens Create an integration installation API token
GetIntegrationByName Get /integrations/{integrationName} Get a specific integration by its name
GetIntegrationEvent Get /integrations/{integrationName}/events/{eventId} Get a specific integration event by its id
GetIntegrationInstallationById Get /integrations/{integrationName}/installations/{installationId} Get a specific integration's installation by its ID
GetIntegrationSpaceInstallation Get /integrations/{integrationName}/installations/{installationId}/spaces/{spaceId} Get a specific integration's space installation
InstallIntegration Post /integrations/{integrationName}/installations Install integration on a target organization
ListIntegrationEvents Get /integrations/{integrationName}/events List all integration events
ListIntegrationInstallations Get /integrations/{integrationName}/installations Fetch a list of installations of an integration
ListIntegrationSpaceInstallations Get /integrations/{integrationName}/spaces Fetch a list of space installations of an integration
ListIntegrations Get /integrations List all public integrations
ListSpaceIntegrationsBlocks Get /spaces/{spaceId}/integration-blocks List integrations blocks for a space
PublishIntegration Post /integrations/{integrationName} Publish an integration
RemoveIntegrationDevSpace Delete /integrations/{integrationName}/spaces/{spaceId}/dev Remove the development space for an integration
UninstallIntegration Delete /integrations/{integrationName}/installations/{installationId} Uninstall the integration from a target organization
UnpublishIntegration Delete /integrations/{integrationName} Unpublish an integration
UpdateIntegrationDevSpace Put /integrations/{integrationName}/spaces/{spaceId}/dev Update the development space for an integration
UpdateIntegrationInstallation Patch /integrations/{integrationName}/installations/{installationId} Update external IDs and configurations of an integration's installation

CreateIntegrationInstallationToken

APITemporaryToken CreateIntegrationInstallationToken(ctx, integrationName, installationId).Execute()

Create an integration installation API token

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/GitbookIO/go-gitbook"
)

func main() {
    integrationName := "integrationName_example" // string | Name of the integration
    installationId := "installationId_example" // string | Identifier of the installation

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.IntegrationsApi.CreateIntegrationInstallationToken(context.Background(), integrationName, installationId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `IntegrationsApi.CreateIntegrationInstallationToken``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CreateIntegrationInstallationToken`: APITemporaryToken
    fmt.Fprintf(os.Stdout, "Response from `IntegrationsApi.CreateIntegrationInstallationToken`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
integrationName string Name of the integration
installationId string Identifier of the installation

Other Parameters

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

Name Type Description Notes

Return type

APITemporaryToken

Authorization

integration

HTTP request headers

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

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

GetIntegrationByName

Integration GetIntegrationByName(ctx, integrationName).Execute()

Get a specific integration by its name

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/GitbookIO/go-gitbook"
)

func main() {
    integrationName := "integrationName_example" // string | Name of the integration

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
integrationName string Name of the integration

Other Parameters

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

Name Type Description Notes

Return type

Integration

Authorization

integration, integration-installation, user-internal, user, user-staff

HTTP request headers

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

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

GetIntegrationEvent

GetIntegrationEvent200Response GetIntegrationEvent(ctx, integrationName, eventId).Execute()

Get a specific integration event by its id

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/GitbookIO/go-gitbook"
)

func main() {
    integrationName := "integrationName_example" // string | Name of the integration
    eventId := "eventId_example" // string | ID of the integration event

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.IntegrationsApi.GetIntegrationEvent(context.Background(), integrationName, eventId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `IntegrationsApi.GetIntegrationEvent``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetIntegrationEvent`: GetIntegrationEvent200Response
    fmt.Fprintf(os.Stdout, "Response from `IntegrationsApi.GetIntegrationEvent`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
integrationName string Name of the integration
eventId string ID of the integration event

Other Parameters

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

Name Type Description Notes

Return type

GetIntegrationEvent200Response

Authorization

integration, integration-installation, user-internal, user, user-staff

HTTP request headers

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

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

GetIntegrationInstallationById

IntegrationInstallation GetIntegrationInstallationById(ctx, integrationName, installationId).Execute()

Get a specific integration's installation by its ID

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/GitbookIO/go-gitbook"
)

func main() {
    integrationName := "integrationName_example" // string | Name of the integration
    installationId := "installationId_example" // string | Identifier of the installation

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.IntegrationsApi.GetIntegrationInstallationById(context.Background(), integrationName, installationId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `IntegrationsApi.GetIntegrationInstallationById``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetIntegrationInstallationById`: IntegrationInstallation
    fmt.Fprintf(os.Stdout, "Response from `IntegrationsApi.GetIntegrationInstallationById`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
integrationName string Name of the integration
installationId string Identifier of the installation

Other Parameters

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

Name Type Description Notes

Return type

IntegrationInstallation

Authorization

user

HTTP request headers

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

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

GetIntegrationSpaceInstallation

IntegrationSpaceInstallation GetIntegrationSpaceInstallation(ctx, integrationName, installationId, spaceId).Execute()

Get a specific integration's space installation

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/GitbookIO/go-gitbook"
)

func main() {
    integrationName := "integrationName_example" // string | Name of the integration
    installationId := "installationId_example" // string | Identifier of the installation
    spaceId := "spaceId_example" // string | The unique id of the space

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.IntegrationsApi.GetIntegrationSpaceInstallation(context.Background(), integrationName, installationId, spaceId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `IntegrationsApi.GetIntegrationSpaceInstallation``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetIntegrationSpaceInstallation`: IntegrationSpaceInstallation
    fmt.Fprintf(os.Stdout, "Response from `IntegrationsApi.GetIntegrationSpaceInstallation`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
integrationName string Name of the integration
installationId string Identifier of the installation
spaceId string The unique id of the space

Other Parameters

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

Name Type Description Notes

Return type

IntegrationSpaceInstallation

Authorization

integration, integration-installation, user-internal, user, user-staff

HTTP request headers

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

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

InstallIntegration

IntegrationInstallation InstallIntegration(ctx, integrationName).OrganizationTarget(organizationTarget).Execute()

Install integration on a target organization

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/GitbookIO/go-gitbook"
)

func main() {
    integrationName := "integrationName_example" // string | Name of the integration
    organizationTarget := *openapiclient.NewOrganizationTarget("Organization_example") // OrganizationTarget | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.IntegrationsApi.InstallIntegration(context.Background(), integrationName).OrganizationTarget(organizationTarget).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `IntegrationsApi.InstallIntegration``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `InstallIntegration`: IntegrationInstallation
    fmt.Fprintf(os.Stdout, "Response from `IntegrationsApi.InstallIntegration`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
integrationName string Name of the integration

Other Parameters

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

Name Type Description Notes

organizationTarget | OrganizationTarget | |

Return type

IntegrationInstallation

Authorization

user

HTTP request headers

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

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

ListIntegrationEvents

ListIntegrationEvents200Response ListIntegrationEvents(ctx, integrationName).Page(page).Limit(limit).Execute()

List all integration events

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/GitbookIO/go-gitbook"
)

func main() {
    integrationName := "integrationName_example" // string | Name of the integration
    page := "page_example" // string | Identifier of the page results to fetch. (optional)
    limit := float32(8.14) // float32 | The number of results per page (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.IntegrationsApi.ListIntegrationEvents(context.Background(), integrationName).Page(page).Limit(limit).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `IntegrationsApi.ListIntegrationEvents``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ListIntegrationEvents`: ListIntegrationEvents200Response
    fmt.Fprintf(os.Stdout, "Response from `IntegrationsApi.ListIntegrationEvents`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
integrationName string Name of the integration

Other Parameters

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

Name Type Description Notes

page | string | Identifier of the page results to fetch. | limit | float32 | The number of results per page |

Return type

ListIntegrationEvents200Response

Authorization

integration, integration-installation, user-internal, user, user-staff

HTTP request headers

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

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

ListIntegrationInstallations

ListIntegrationInstallations200Response ListIntegrationInstallations(ctx, integrationName).Page(page).Limit(limit).ExternalId(externalId).Execute()

Fetch a list of installations of an integration

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/GitbookIO/go-gitbook"
)

func main() {
    integrationName := "integrationName_example" // string | Name of the integration
    page := "page_example" // string | Identifier of the page results to fetch. (optional)
    limit := float32(8.14) // float32 | The number of results per page (optional)
    externalId := "externalId_example" // string | External Id to filter by (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.IntegrationsApi.ListIntegrationInstallations(context.Background(), integrationName).Page(page).Limit(limit).ExternalId(externalId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `IntegrationsApi.ListIntegrationInstallations``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ListIntegrationInstallations`: ListIntegrationInstallations200Response
    fmt.Fprintf(os.Stdout, "Response from `IntegrationsApi.ListIntegrationInstallations`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
integrationName string Name of the integration

Other Parameters

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

Name Type Description Notes

page | string | Identifier of the page results to fetch. | limit | float32 | The number of results per page | externalId | string | External Id to filter by |

Return type

ListIntegrationInstallations200Response

Authorization

integration

HTTP request headers

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

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

ListIntegrationSpaceInstallations

ListIntegrationSpaceInstallations200Response ListIntegrationSpaceInstallations(ctx, integrationName).Page(page).Limit(limit).ExternalId(externalId).Execute()

Fetch a list of space installations of an integration

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/GitbookIO/go-gitbook"
)

func main() {
    integrationName := "integrationName_example" // string | Name of the integration
    page := "page_example" // string | Identifier of the page results to fetch. (optional)
    limit := float32(8.14) // float32 | The number of results per page (optional)
    externalId := "externalId_example" // string | External Id to filter by (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.IntegrationsApi.ListIntegrationSpaceInstallations(context.Background(), integrationName).Page(page).Limit(limit).ExternalId(externalId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `IntegrationsApi.ListIntegrationSpaceInstallations``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ListIntegrationSpaceInstallations`: ListIntegrationSpaceInstallations200Response
    fmt.Fprintf(os.Stdout, "Response from `IntegrationsApi.ListIntegrationSpaceInstallations`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
integrationName string Name of the integration

Other Parameters

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

Name Type Description Notes

page | string | Identifier of the page results to fetch. | limit | float32 | The number of results per page | externalId | string | External Id to filter by |

Return type

ListIntegrationSpaceInstallations200Response

Authorization

integration

HTTP request headers

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

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

ListIntegrations

ListIntegrations200Response ListIntegrations(ctx).Page(page).Limit(limit).Execute()

List all public integrations

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/GitbookIO/go-gitbook"
)

func main() {
    page := "page_example" // string | Identifier of the page results to fetch. (optional)
    limit := float32(8.14) // float32 | The number of results per page (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.IntegrationsApi.ListIntegrations(context.Background()).Page(page).Limit(limit).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `IntegrationsApi.ListIntegrations``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ListIntegrations`: ListIntegrations200Response
    fmt.Fprintf(os.Stdout, "Response from `IntegrationsApi.ListIntegrations`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
page string Identifier of the page results to fetch.
limit float32 The number of results per page

Return type

ListIntegrations200Response

Authorization

integration, integration-installation, user-internal, user, user-staff

HTTP request headers

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

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

ListSpaceIntegrationsBlocks

[]SpaceIntegrationBlocksInner ListSpaceIntegrationsBlocks(ctx, spaceId).Execute()

List integrations blocks for a space

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/GitbookIO/go-gitbook"
)

func main() {
    spaceId := "spaceId_example" // string | The unique id of the space

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.IntegrationsApi.ListSpaceIntegrationsBlocks(context.Background(), spaceId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `IntegrationsApi.ListSpaceIntegrationsBlocks``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ListSpaceIntegrationsBlocks`: []SpaceIntegrationBlocksInner
    fmt.Fprintf(os.Stdout, "Response from `IntegrationsApi.ListSpaceIntegrationsBlocks`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
spaceId string The unique id of the space

Other Parameters

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

Name Type Description Notes

Return type

[]SpaceIntegrationBlocksInner

Authorization

integration, integration-installation, user-internal, user, user-staff

HTTP request headers

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

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

PublishIntegration

Integration PublishIntegration(ctx, integrationName).RequestPublishIntegration(requestPublishIntegration).Execute()

Publish an integration

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/GitbookIO/go-gitbook"
)

func main() {
    integrationName := "integrationName_example" // string | Name of the integration
    requestPublishIntegration := *openapiclient.NewRequestPublishIntegration("Title_example", "Description_example", []openapiclient.IntegrationScope{openapiclient.IntegrationScope("entities:write")}, "Script_example") // RequestPublishIntegration | 

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
integrationName string Name of the integration

Other Parameters

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

Name Type Description Notes

requestPublishIntegration | RequestPublishIntegration | |

Return type

Integration

Authorization

user

HTTP request headers

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

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

RemoveIntegrationDevSpace

RemoveIntegrationDevSpace(ctx, integrationName, spaceId).Execute()

Remove the development space for an integration

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/GitbookIO/go-gitbook"
)

func main() {
    integrationName := "integrationName_example" // string | Name of the integration
    spaceId := "spaceId_example" // string | The unique id of the space

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.IntegrationsApi.RemoveIntegrationDevSpace(context.Background(), integrationName, spaceId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `IntegrationsApi.RemoveIntegrationDevSpace``: %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.
integrationName string Name of the integration
spaceId string The unique id of the space

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

user

HTTP request headers

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

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

UninstallIntegration

UninstallIntegration(ctx, integrationName, installationId).Execute()

Uninstall the integration from a target organization

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/GitbookIO/go-gitbook"
)

func main() {
    integrationName := "integrationName_example" // string | Name of the integration
    installationId := "installationId_example" // string | Identifier of the installation

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.IntegrationsApi.UninstallIntegration(context.Background(), integrationName, installationId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `IntegrationsApi.UninstallIntegration``: %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.
integrationName string Name of the integration
installationId string Identifier of the installation

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

user

HTTP request headers

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

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

UnpublishIntegration

UnpublishIntegration(ctx, integrationName).Execute()

Unpublish an integration

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/GitbookIO/go-gitbook"
)

func main() {
    integrationName := "integrationName_example" // string | Name of the integration

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.IntegrationsApi.UnpublishIntegration(context.Background(), integrationName).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `IntegrationsApi.UnpublishIntegration``: %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.
integrationName string Name of the integration

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

user

HTTP request headers

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

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

UpdateIntegrationDevSpace

UpdateIntegrationDevSpace(ctx, integrationName, spaceId).UpdateIntegrationDevSpaceRequest(updateIntegrationDevSpaceRequest).Execute()

Update the development space for an integration

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/GitbookIO/go-gitbook"
)

func main() {
    integrationName := "integrationName_example" // string | Name of the integration
    spaceId := "spaceId_example" // string | The unique id of the space
    updateIntegrationDevSpaceRequest := *openapiclient.NewUpdateIntegrationDevSpaceRequest("TunnelUrl_example") // UpdateIntegrationDevSpaceRequest | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.IntegrationsApi.UpdateIntegrationDevSpace(context.Background(), integrationName, spaceId).UpdateIntegrationDevSpaceRequest(updateIntegrationDevSpaceRequest).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `IntegrationsApi.UpdateIntegrationDevSpace``: %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.
integrationName string Name of the integration
spaceId string The unique id of the space

Other Parameters

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

Name Type Description Notes

updateIntegrationDevSpaceRequest | UpdateIntegrationDevSpaceRequest | |

Return type

(empty response body)

Authorization

user

HTTP request headers

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

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

UpdateIntegrationInstallation

IntegrationInstallation UpdateIntegrationInstallation(ctx, integrationName, installationId).RequestUpdateIntegrationInstallation(requestUpdateIntegrationInstallation).Execute()

Update external IDs and configurations of an integration's installation

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/GitbookIO/go-gitbook"
)

func main() {
    integrationName := "integrationName_example" // string | Name of the integration
    installationId := "installationId_example" // string | Identifier of the installation
    requestUpdateIntegrationInstallation := *openapiclient.NewRequestUpdateIntegrationInstallation() // RequestUpdateIntegrationInstallation | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.IntegrationsApi.UpdateIntegrationInstallation(context.Background(), integrationName, installationId).RequestUpdateIntegrationInstallation(requestUpdateIntegrationInstallation).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `IntegrationsApi.UpdateIntegrationInstallation``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UpdateIntegrationInstallation`: IntegrationInstallation
    fmt.Fprintf(os.Stdout, "Response from `IntegrationsApi.UpdateIntegrationInstallation`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
integrationName string Name of the integration
installationId string Identifier of the installation

Other Parameters

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

Name Type Description Notes

requestUpdateIntegrationInstallation | RequestUpdateIntegrationInstallation | |

Return type

IntegrationInstallation

Authorization

user

HTTP request headers

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

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