Skip to content

Latest commit

 

History

History
3864 lines (2522 loc) · 125 KB

OrganizationsApi.md

File metadata and controls

3864 lines (2522 loc) · 125 KB

\OrganizationsApi

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

Method HTTP request Description
AddEventsToRecording Post /orgs/{organizationId}/recordings/{recordingId}/events Add events to a running recording
AddMemberToOrganizationTeamById Put /orgs/{organizationId}/teams/{teamId}/members/{userId} Add or update a team membership
CreateEnvironment Post /orgs/{organizationId}/environments Create a new environment within an organization
CreateOrganization Post /orgs Create an organization
CreateOrganizationCustomField Post /orgs/{organizationId}/custom-fields Create a new custom field in an orgamization
CreateOrganizationTeam Put /orgs/{organizationId}/teams Create organization team
DeleteEntitySchema Delete /orgs/{organizationId}/schemas/{entityType} Delete an entity schema.
DeleteEnvironment Delete /orgs/{organizationId}/environments/{environmentName} Delete an environment in an organization
DeleteMemberFromOrganizationTeamById Delete /orgs/{organizationId}/teams/{teamId}/members/{userId} Delete members from a team
DeleteOrganizationCustomField Delete /orgs/{organizationId}/custom-fields/{fieldName} Delete a custom field in an organization
GetEntity Get /orgs/{organizationId}/schemas/{entityType}/entities/{entityId} Get an entity using its ID.
GetEntitySchema Get /orgs/{organizationId}/schemas/{entityType} Get an entity schema by its type.
GetEnvironmentByName Get /orgs/{organizationId}/environments/{environmentName} Get an environment by its name
GetMemberInOrganizationById Get /orgs/{organizationId}/members/{userId} Get specified organization member
GetOrganizationBillingPortal Get /orgs/{organizationId}/billing Get the billing portal for an organization
GetOrganizationById Get /orgs/{organizationId} Get an organization by its ID
GetOrganizationCustomFieldByName Get /orgs/{organizationId}/custom-fields/{fieldName} Get a custom field by its name
GetRecording Get /orgs/{organizationId}/recordings/{recordingId} Get a recording by its ID
GetTeamInOrganizationById Get /orgs/{organizationId}/teams/{teamId} Get specified organization team
InviteUsersToOrganization Post /orgs/{organizationId}/invites Invite users to a given organization based on a list of emails
JoinOrganizationWithInvite Post /orgs/{organizationId}/invites/{inviteId} Use an invite to join an organization.
ListCollectionsInOrganizationById Get /orgs/{organizationId}/collections List organization collections
ListDirectorySyncGroups Get /orgs/{organizationId}/dsync/groups Lists the groups exposed to the synced Directory on an organization.
ListEntitySchemas Get /orgs/{organizationId}/schemas List the entity schemas in an organization.
ListEnvironments Get /orgs/{organizationId}/environments Get the environments in an organization
ListMembersInOrganizationById Get /orgs/{organizationId}/members List organization members
ListOrganizationCustomFields Get /orgs/{organizationId}/custom-fields Get the custom fields for spaces in an organization
ListOrganizationsForAuthenticatedUser Get /orgs Get the list of organizations for the currently authenticated user
ListRecordings Get /orgs/{organizationId}/recordings List recordings
ListSchemaEntities Get /orgs/{organizationId}/schemas/{entityType}/entities List entities in an organization for a given type.
ListSpacesInOrganizationById Get /orgs/{organizationId}/spaces List organization spaces
ListSpacesWithGitSyncInOrganizationById Get /orgs/{organizationId}/spaces/gitsync List organization spaces including Git sync metadata
ListTeamMembersInOrganizationById Get /orgs/{organizationId}/teams/{teamId}/members List team members
ListTeamsInOrganizationById Get /orgs/{organizationId}/teams List organization teams
RemoveMemberFromOrganizationById Delete /orgs/{organizationId}/members/{userId} Delete a member from an organization
RemoveTeamFromOrganizationById Delete /orgs/{organizationId}/teams/{teamId} Delete a team in an organization
RequestOrganizationUpgrade Post /orgs/{organizationId}/request_upgrade Send a request to ask the organization's admin to upgrade it.
SearchOrganizationContent Get /orgs/{organizationId}/search Search content in an organization
SetEntitySchema Put /orgs/{organizationId}/schemas/{entityType} Create or update an entity schema.
SetUserAsSSOMemberForOrganization Post /orgs/{organizationId}/members/{userId}/sso Set a user as an SSO member of an organization
SetupDirectorySync Post /orgs/{organizationId}/dsync Set up Directory Sync in an organization.
StartRecording Post /orgs/{organizationId}/recordings Start a recording
StopRecording Post /orgs/{organizationId}/recordings/{recordingId}/stop Stop a recording
SyncDirectorySyncGroupsToTeams Post /orgs/{organizationId}/dsync/teams Syncs a list of group/team unique identifiers pairs together.
TransferOrganization Post /orgs/{organizationId}/transfer Transfer one organization (source) into another organization (target).
UpdateEnvironment Patch /orgs/{organizationId}/environments/{environmentName} Update an existing environment within an organization
UpdateMemberInOrganizationById Patch /orgs/{organizationId}/members/{userId} Update specified organization member
UpdateMembersInOrganizationTeam Put /orgs/{organizationId}/teams/{teamId}/members Updates members of an organization team
UpdateOrganizationCustomField Patch /orgs/{organizationId}/custom-fields/{fieldName} Update a custom field in an organization
UpdateOrganizationMemberLastSeenAt Post /orgs/{organizationId}/ping Update organization member's "last seen at" timestamp.
UpdateTeamInOrganizationById Patch /orgs/{organizationId}/teams/{teamId} Update specified organization team
UpgradeOrganizationPlan Post /orgs/{organizationId}/billing Upgrade an organization's billing plan
UpsertSchemaEntities Put /orgs/{organizationId}/schemas/{entityType}/entities Update/Create/Delete entities in a schema.

AddEventsToRecording

AddEventsToRecording(ctx, organizationId, recordingId).AddEventsToRecordingRequest(addEventsToRecordingRequest).Execute()

Add events to a running recording

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    recordingId := "recordingId_example" // string | The unique id of a recording
    addEventsToRecordingRequest := *openapiclient.NewAddEventsToRecordingRequest([]openapiclient.RecordingEvent{openapiclient.RecordingEvent{RecordingFileAddedEvent: openapiclient.NewRecordingFileAddedEvent("Type_example", time.Now(), "Filename_example", "FileSnapshot_example")}}) // AddEventsToRecordingRequest |  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.OrganizationsApi.AddEventsToRecording(context.Background(), organizationId, recordingId).AddEventsToRecordingRequest(addEventsToRecordingRequest).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.AddEventsToRecording``: %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.
organizationId string The unique id of the organization
recordingId string The unique id of a recording

Other Parameters

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

Name Type Description Notes

addEventsToRecordingRequest | AddEventsToRecordingRequest | |

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]

AddMemberToOrganizationTeamById

AddMemberToOrganizationTeamById(ctx, organizationId, teamId, userId).AddMemberToOrganizationTeamByIdRequest(addMemberToOrganizationTeamByIdRequest).Execute()

Add or update a team membership

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    teamId := "teamId_example" // string | The unique ID of the Team
    userId := "userId_example" // string | The unique ID of the User
    addMemberToOrganizationTeamByIdRequest := *openapiclient.NewAddMemberToOrganizationTeamByIdRequest() // AddMemberToOrganizationTeamByIdRequest |  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.OrganizationsApi.AddMemberToOrganizationTeamById(context.Background(), organizationId, teamId, userId).AddMemberToOrganizationTeamByIdRequest(addMemberToOrganizationTeamByIdRequest).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.AddMemberToOrganizationTeamById``: %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.
organizationId string The unique id of the organization
teamId string The unique ID of the Team
userId string The unique ID of the User

Other Parameters

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

Name Type Description Notes

addMemberToOrganizationTeamByIdRequest | AddMemberToOrganizationTeamByIdRequest | |

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]

CreateEnvironment

Environment CreateEnvironment(ctx, organizationId).CreateEnvironment(createEnvironment).Execute()

Create a new environment within an organization

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    createEnvironment := *openapiclient.NewCreateEnvironment("Name_example", "Title_example") // CreateEnvironment | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

createEnvironment | CreateEnvironment | |

Return type

Environment

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]

CreateOrganization

Organization CreateOrganization(ctx).RequestCreateOrganization(requestCreateOrganization).Execute()

Create an organization

Example

package main

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

func main() {
    requestCreateOrganization := *openapiclient.NewRequestCreateOrganization("Title_example") // RequestCreateOrganization |  (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
requestCreateOrganization RequestCreateOrganization

Return type

Organization

Authorization

user-internal

HTTP request headers

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

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

CreateOrganizationCustomField

CustomField CreateOrganizationCustomField(ctx, organizationId).CreateOrganizationCustomFieldRequest(createOrganizationCustomFieldRequest).Execute()

Create a new custom field in an orgamization

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    createOrganizationCustomFieldRequest := *openapiclient.NewCreateOrganizationCustomFieldRequest("Name_example", openapiclient.CustomFieldType("text")) // CreateOrganizationCustomFieldRequest | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

createOrganizationCustomFieldRequest | CreateOrganizationCustomFieldRequest | |

Return type

CustomField

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]

CreateOrganizationTeam

OrganizationTeam CreateOrganizationTeam(ctx, organizationId).CreateOrganizationTeamRequest(createOrganizationTeamRequest).Execute()

Create organization team

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    createOrganizationTeamRequest := *openapiclient.NewCreateOrganizationTeamRequest("Title_example") // CreateOrganizationTeamRequest | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

createOrganizationTeamRequest | CreateOrganizationTeamRequest | |

Return type

OrganizationTeam

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]

DeleteEntitySchema

DeleteEntitySchema(ctx, organizationId, entityType).Execute()

Delete an entity schema.

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    entityType := "entityType_example" // string | Type of the entity

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.OrganizationsApi.DeleteEntitySchema(context.Background(), organizationId, entityType).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.DeleteEntitySchema``: %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.
organizationId string The unique id of the organization
entityType string Type of the entity

Other Parameters

Other parameters are passed through a pointer to a apiDeleteEntitySchemaRequest 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]

DeleteEnvironment

DeleteEnvironment(ctx, organizationId, environmentName).Execute()

Delete an environment in an organization

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    environmentName := "environmentName_example" // string | The unique name of the environment within the organization

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.OrganizationsApi.DeleteEnvironment(context.Background(), organizationId, environmentName).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.DeleteEnvironment``: %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.
organizationId string The unique id of the organization
environmentName string The unique name of the environment within the organization

Other Parameters

Other parameters are passed through a pointer to a apiDeleteEnvironmentRequest 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]

DeleteMemberFromOrganizationTeamById

DeleteMemberFromOrganizationTeamById(ctx, organizationId, teamId, userId).Execute()

Delete members from a team

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    teamId := "teamId_example" // string | The unique ID of the Team
    userId := "userId_example" // string | The unique ID of the User

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.OrganizationsApi.DeleteMemberFromOrganizationTeamById(context.Background(), organizationId, teamId, userId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.DeleteMemberFromOrganizationTeamById``: %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.
organizationId string The unique id of the organization
teamId string The unique ID of the Team
userId string The unique ID of the User

Other Parameters

Other parameters are passed through a pointer to a apiDeleteMemberFromOrganizationTeamByIdRequest 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]

DeleteOrganizationCustomField

DeleteOrganizationCustomField(ctx, organizationId, fieldName).Execute()

Delete a custom field in an organization

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    fieldName := "fieldName_example" // string | The name of the custom field

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.OrganizationsApi.DeleteOrganizationCustomField(context.Background(), organizationId, fieldName).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.DeleteOrganizationCustomField``: %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.
organizationId string The unique id of the organization
fieldName string The name of the custom field

Other Parameters

Other parameters are passed through a pointer to a apiDeleteOrganizationCustomFieldRequest 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]

GetEntity

Entity GetEntity(ctx, organizationId, entityType, entityId).Execute()

Get an entity using its ID.

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    entityType := "entityType_example" // string | Type of the entity
    entityId := "entityId_example" // string | ID of the entity in the space

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
organizationId string The unique id of the organization
entityType string Type of the entity
entityId string ID of the entity in the space

Other Parameters

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

Name Type Description Notes

Return type

Entity

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]

GetEntitySchema

EntitySchema GetEntitySchema(ctx, organizationId, entityType).Execute()

Get an entity schema by its type.

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    entityType := "entityType_example" // string | Type of the entity

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
organizationId string The unique id of the organization
entityType string Type of the entity

Other Parameters

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

Name Type Description Notes

Return type

EntitySchema

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]

GetEnvironmentByName

Environment GetEnvironmentByName(ctx, organizationId, environmentName).Execute()

Get an environment by its name

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    environmentName := "environmentName_example" // string | The unique name of the environment within the organization

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
organizationId string The unique id of the organization
environmentName string The unique name of the environment within the organization

Other Parameters

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

Name Type Description Notes

Return type

Environment

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]

GetMemberInOrganizationById

OrganizationMember GetMemberInOrganizationById(ctx, organizationId, userId).Execute()

Get specified organization member

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    userId := "userId_example" // string | The unique ID of the User

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
organizationId string The unique id of the organization
userId string The unique ID of the User

Other Parameters

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

Name Type Description Notes

Return type

OrganizationMember

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]

GetOrganizationBillingPortal

BillingPortal GetOrganizationBillingPortal(ctx, organizationId).Execute()

Get the billing portal for an organization

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

BillingPortal

Authorization

user-internal

HTTP request headers

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

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

GetOrganizationById

Organization GetOrganizationById(ctx, organizationId).Execute()

Get an organization by its ID

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

Organization

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]

GetOrganizationCustomFieldByName

CustomField GetOrganizationCustomFieldByName(ctx, organizationId, fieldName).Execute()

Get a custom field by its name

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    fieldName := "fieldName_example" // string | The name of the custom field

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
organizationId string The unique id of the organization
fieldName string The name of the custom field

Other Parameters

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

Name Type Description Notes

Return type

CustomField

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]

GetRecording

Recording GetRecording(ctx, organizationId, recordingId).Execute()

Get a recording by its ID

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    recordingId := "recordingId_example" // string | The unique id of a recording

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
organizationId string The unique id of the organization
recordingId string The unique id of a recording

Other Parameters

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

Name Type Description Notes

Return type

Recording

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]

GetTeamInOrganizationById

OrganizationTeam GetTeamInOrganizationById(ctx, organizationId, teamId).Execute()

Get specified organization team

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    teamId := "teamId_example" // string | The unique ID of the Team

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
organizationId string The unique id of the organization
teamId string The unique ID of the Team

Other Parameters

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

Name Type Description Notes

Return type

OrganizationTeam

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]

InviteUsersToOrganization

InviteUsersToOrganization200Response InviteUsersToOrganization(ctx, organizationId).RequestInviteUsersToOrganization(requestInviteUsersToOrganization).Execute()

Invite users to a given organization based on a list of emails

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    requestInviteUsersToOrganization := *openapiclient.NewRequestInviteUsersToOrganization([]openapiclient.RequestInviteUsersToOrganizationEmailsInner{openapiclient.RequestInviteUsersToOrganization_emails_inner{RequestInviteUsersToOrganizationEmailsInnerOneOf: openapiclient.NewRequestInviteUsersToOrganizationEmailsInnerOneOf("Email_example", openapiclient.MemberRoleOrGuest{MemberRole: penapiclient.MemberRole("admin")})}}) // RequestInviteUsersToOrganization | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

requestInviteUsersToOrganization | RequestInviteUsersToOrganization | |

Return type

InviteUsersToOrganization200Response

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]

JoinOrganizationWithInvite

map[string]interface{} JoinOrganizationWithInvite(ctx, organizationId, inviteId).Execute()

Use an invite to join an organization.

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    inviteId := "inviteId_example" // string | The unique id of the invite

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
organizationId string The unique id of the organization
inviteId string The unique id of the invite

Other Parameters

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

Name Type Description Notes

Return type

map[string]interface{}

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]

ListCollectionsInOrganizationById

ListCollectionsInOrganizationById200Response ListCollectionsInOrganizationById(ctx, organizationId).Page(page).Limit(limit).Nested(nested).Execute()

List organization collections

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    page := "page_example" // string | Identifier of the page results to fetch. (optional)
    limit := float32(8.14) // float32 | The number of results per page (optional)
    nested := true // bool | If true, all nested collections will be listed (optional) (default to true)

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

Path Parameters

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

Other Parameters

Other parameters are passed through a pointer to a apiListCollectionsInOrganizationByIdRequest 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 | nested | bool | If true, all nested collections will be listed | [default to true]

Return type

ListCollectionsInOrganizationById200Response

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]

ListDirectorySyncGroups

ListDirectorySyncGroups200Response ListDirectorySyncGroups(ctx, organizationId).Execute()

Lists the groups exposed to the synced Directory on an organization.

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

ListDirectorySyncGroups200Response

Authorization

user-internal

HTTP request headers

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

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

ListEntitySchemas

ListEntitySchemas200Response ListEntitySchemas(ctx, organizationId).Page(page).Limit(limit).Execute()

List the entity schemas in an organization.

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    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.OrganizationsApi.ListEntitySchemas(context.Background(), organizationId).Page(page).Limit(limit).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.ListEntitySchemas``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ListEntitySchemas`: ListEntitySchemas200Response
    fmt.Fprintf(os.Stdout, "Response from `OrganizationsApi.ListEntitySchemas`: %v\n", resp)
}

Path Parameters

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

Other Parameters

Other parameters are passed through a pointer to a apiListEntitySchemasRequest 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

ListEntitySchemas200Response

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]

ListEnvironments

ListEnvironments200Response ListEnvironments(ctx, organizationId).Page(page).Limit(limit).Execute()

Get the environments in an organization

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    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.OrganizationsApi.ListEnvironments(context.Background(), organizationId).Page(page).Limit(limit).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.ListEnvironments``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ListEnvironments`: ListEnvironments200Response
    fmt.Fprintf(os.Stdout, "Response from `OrganizationsApi.ListEnvironments`: %v\n", resp)
}

Path Parameters

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

Other Parameters

Other parameters are passed through a pointer to a apiListEnvironmentsRequest 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

ListEnvironments200Response

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]

ListMembersInOrganizationById

ListMembersInOrganizationById200Response ListMembersInOrganizationById(ctx, organizationId).Page(page).Limit(limit).Role(role).Search(search).Execute()

List organization members

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    page := "page_example" // string | Identifier of the page results to fetch. (optional)
    limit := float32(8.14) // float32 | The number of results per page (optional)
    role := openapiclient.listMembersInOrganizationById_role_parameter{MemberRole: penapiclient.MemberRole("admin")} // ListMembersInOrganizationByIdRoleParameter | The Role to filter the member list by (optional)
    search := "search_example" // string | A query to filter the member list (displayName and email) (optional)

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

Path Parameters

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

Other Parameters

Other parameters are passed through a pointer to a apiListMembersInOrganizationByIdRequest 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 | role | ListMembersInOrganizationByIdRoleParameter | The Role to filter the member list by | search | string | A query to filter the member list (displayName and email) |

Return type

ListMembersInOrganizationById200Response

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]

ListOrganizationCustomFields

ListOrganizationCustomFields200Response ListOrganizationCustomFields(ctx, organizationId).Page(page).Limit(limit).Execute()

Get the custom fields for spaces in an organization

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    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.OrganizationsApi.ListOrganizationCustomFields(context.Background(), organizationId).Page(page).Limit(limit).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.ListOrganizationCustomFields``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ListOrganizationCustomFields`: ListOrganizationCustomFields200Response
    fmt.Fprintf(os.Stdout, "Response from `OrganizationsApi.ListOrganizationCustomFields`: %v\n", resp)
}

Path Parameters

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

Other Parameters

Other parameters are passed through a pointer to a apiListOrganizationCustomFieldsRequest 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

ListOrganizationCustomFields200Response

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]

ListOrganizationsForAuthenticatedUser

ListOrganizationsForAuthenticatedUser200Response ListOrganizationsForAuthenticatedUser(ctx).Page(page).Limit(limit).Execute()

Get the list of organizations for the currently authenticated user

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.OrganizationsApi.ListOrganizationsForAuthenticatedUser(context.Background()).Page(page).Limit(limit).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.ListOrganizationsForAuthenticatedUser``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ListOrganizationsForAuthenticatedUser`: ListOrganizationsForAuthenticatedUser200Response
    fmt.Fprintf(os.Stdout, "Response from `OrganizationsApi.ListOrganizationsForAuthenticatedUser`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiListOrganizationsForAuthenticatedUserRequest 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

ListOrganizationsForAuthenticatedUser200Response

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]

ListRecordings

ListRecordings200Response ListRecordings(ctx, organizationId).Page(page).Limit(limit).Execute()

List recordings

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    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.OrganizationsApi.ListRecordings(context.Background(), organizationId).Page(page).Limit(limit).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.ListRecordings``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ListRecordings`: ListRecordings200Response
    fmt.Fprintf(os.Stdout, "Response from `OrganizationsApi.ListRecordings`: %v\n", resp)
}

Path Parameters

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

Other Parameters

Other parameters are passed through a pointer to a apiListRecordingsRequest 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

ListRecordings200Response

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]

ListSchemaEntities

ListSchemaEntities200Response ListSchemaEntities(ctx, organizationId, entityType).Page(page).Limit(limit).Query(query).Execute()

List entities in an organization for a given type.

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    entityType := "entityType_example" // string | Type of the entity
    page := "page_example" // string | Identifier of the page results to fetch. (optional)
    limit := float32(8.14) // float32 | The number of results per page (optional)
    query := "query_example" // string | Query to filter entities with, ex: a == 'something' && b >= 10 (optional)

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
organizationId string The unique id of the organization
entityType string Type of the entity

Other Parameters

Other parameters are passed through a pointer to a apiListSchemaEntitiesRequest 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 | query | string | Query to filter entities with, ex: a == 'something' && b >= 10 |

Return type

ListSchemaEntities200Response

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]

ListSpacesInOrganizationById

ListSpacesForAuthenticatedUser200Response ListSpacesInOrganizationById(ctx, organizationId).Page(page).Limit(limit).Visibility(visibility).Execute()

List organization spaces

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    page := "page_example" // string | Identifier of the page results to fetch. (optional)
    limit := float32(8.14) // float32 | The number of results per page (optional)
    visibility := openapiclient.ContentVisibility("public") // ContentVisibility | If defined, only content with this visibility will be returned. (optional)

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

Path Parameters

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

Other Parameters

Other parameters are passed through a pointer to a apiListSpacesInOrganizationByIdRequest 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 | visibility | ContentVisibility | If defined, only content with this visibility will be returned. |

Return type

ListSpacesForAuthenticatedUser200Response

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]

ListSpacesWithGitSyncInOrganizationById

ListSpacesWithGitSyncInOrganizationById200Response ListSpacesWithGitSyncInOrganizationById(ctx, organizationId).Page(page).Limit(limit).Status(status).Execute()

List organization spaces including Git sync metadata

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    page := "page_example" // string | Identifier of the page results to fetch. (optional)
    limit := float32(8.14) // float32 | The number of results per page (optional)
    status := openapiclient.GitSyncOperationState("running") // GitSyncOperationState | If defined, only spaces with matching Git sync status are returned (optional)

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

Path Parameters

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

Other Parameters

Other parameters are passed through a pointer to a apiListSpacesWithGitSyncInOrganizationByIdRequest 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 | status | GitSyncOperationState | If defined, only spaces with matching Git sync status are returned |

Return type

ListSpacesWithGitSyncInOrganizationById200Response

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]

ListTeamMembersInOrganizationById

ListMembersInOrganizationById200Response ListTeamMembersInOrganizationById(ctx, organizationId, teamId).Page(page).Limit(limit).Execute()

List team members

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    teamId := "teamId_example" // string | The unique ID of the Team
    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.OrganizationsApi.ListTeamMembersInOrganizationById(context.Background(), organizationId, teamId).Page(page).Limit(limit).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.ListTeamMembersInOrganizationById``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ListTeamMembersInOrganizationById`: ListMembersInOrganizationById200Response
    fmt.Fprintf(os.Stdout, "Response from `OrganizationsApi.ListTeamMembersInOrganizationById`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
organizationId string The unique id of the organization
teamId string The unique ID of the Team

Other Parameters

Other parameters are passed through a pointer to a apiListTeamMembersInOrganizationByIdRequest 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

ListMembersInOrganizationById200Response

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]

ListTeamsInOrganizationById

ListTeamsInOrganizationById200Response ListTeamsInOrganizationById(ctx, organizationId).Page(page).Limit(limit).Title(title).Execute()

List organization teams

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    page := "page_example" // string | Identifier of the page results to fetch. (optional)
    limit := float32(8.14) // float32 | The number of results per page (optional)
    title := "title_example" // string | If provided, only teams whose name contains the given parameter will be returned. Case insensitive. (optional)

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

Path Parameters

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

Other Parameters

Other parameters are passed through a pointer to a apiListTeamsInOrganizationByIdRequest 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 | title | string | If provided, only teams whose name contains the given parameter will be returned. Case insensitive. |

Return type

ListTeamsInOrganizationById200Response

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]

RemoveMemberFromOrganizationById

RemoveMemberFromOrganizationById(ctx, organizationId, userId).Execute()

Delete a member from an organization

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    userId := "userId_example" // string | The unique ID of the User

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.OrganizationsApi.RemoveMemberFromOrganizationById(context.Background(), organizationId, userId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.RemoveMemberFromOrganizationById``: %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.
organizationId string The unique id of the organization
userId string The unique ID of the User

Other Parameters

Other parameters are passed through a pointer to a apiRemoveMemberFromOrganizationByIdRequest 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]

RemoveTeamFromOrganizationById

RemoveTeamFromOrganizationById(ctx, organizationId, teamId).Execute()

Delete a team in an organization

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    teamId := "teamId_example" // string | The unique ID of the Team

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.OrganizationsApi.RemoveTeamFromOrganizationById(context.Background(), organizationId, teamId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.RemoveTeamFromOrganizationById``: %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.
organizationId string The unique id of the organization
teamId string The unique ID of the Team

Other Parameters

Other parameters are passed through a pointer to a apiRemoveTeamFromOrganizationByIdRequest 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]

RequestOrganizationUpgrade

map[string]interface{} RequestOrganizationUpgrade(ctx, organizationId).Execute()

Send a request to ask the organization's admin to upgrade it.

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

map[string]interface{}

Authorization

user-internal

HTTP request headers

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

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

SearchOrganizationContent

SearchContent200Response SearchOrganizationContent(ctx, organizationId).Query(query).Page(page).Limit(limit).Execute()

Search content in an organization

Example

package main

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

func main() {
    query := "query_example" // string | 
    organizationId := "organizationId_example" // string | The unique id of the organization
    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.OrganizationsApi.SearchOrganizationContent(context.Background(), organizationId).Query(query).Page(page).Limit(limit).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.SearchOrganizationContent``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `SearchOrganizationContent`: SearchContent200Response
    fmt.Fprintf(os.Stdout, "Response from `OrganizationsApi.SearchOrganizationContent`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes
query string

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

Return type

SearchContent200Response

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]

SetEntitySchema

SetEntitySchema(ctx, organizationId, entityType).EntityRawSchema(entityRawSchema).Execute()

Create or update an entity schema.

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    entityType := "entityType_example" // string | Type of the entity
    entityRawSchema := *openapiclient.NewEntityRawSchema("Type_example", *openapiclient.NewEntityRawSchemaTitle("Singular_example", "Plural_example"), []openapiclient.EntityPropertySchema{*openapiclient.NewEntityPropertySchema("Name_example", "Title_example", "Type_example", []map[string]interface{}{map[string]interface{}{ ... }}, map[string]interface{}{ ... })}) // EntityRawSchema | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.OrganizationsApi.SetEntitySchema(context.Background(), organizationId, entityType).EntityRawSchema(entityRawSchema).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.SetEntitySchema``: %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.
organizationId string The unique id of the organization
entityType string Type of the entity

Other Parameters

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

Name Type Description Notes

entityRawSchema | EntityRawSchema | |

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]

SetUserAsSSOMemberForOrganization

OrganizationMember SetUserAsSSOMemberForOrganization(ctx, organizationId, userId).Execute()

Set a user as an SSO member of an organization

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    userId := "userId_example" // string | The unique ID of the User

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
organizationId string The unique id of the organization
userId string The unique ID of the User

Other Parameters

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

Name Type Description Notes

Return type

OrganizationMember

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]

SetupDirectorySync

SetupDirectorySync200Response SetupDirectorySync(ctx, organizationId).Execute()

Set up Directory Sync in an organization.

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

SetupDirectorySync200Response

Authorization

user-internal

HTTP request headers

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

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

StartRecording

Recording StartRecording(ctx, organizationId).StartRecordingRequest(startRecordingRequest).Execute()

Start a recording

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    startRecordingRequest := *openapiclient.NewStartRecordingRequest(openapiclient.RecordingContext{String: new(string)}) // StartRecordingRequest |  (optional)

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

startRecordingRequest | StartRecordingRequest | |

Return type

Recording

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]

StopRecording

StopRecording200Response StopRecording(ctx, organizationId, recordingId).StopRecordingRequest(stopRecordingRequest).Execute()

Stop a recording

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    recordingId := "recordingId_example" // string | The unique id of a recording
    stopRecordingRequest := *openapiclient.NewStopRecordingRequest("Space_example") // StopRecordingRequest |  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.OrganizationsApi.StopRecording(context.Background(), organizationId, recordingId).StopRecordingRequest(stopRecordingRequest).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.StopRecording``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `StopRecording`: StopRecording200Response
    fmt.Fprintf(os.Stdout, "Response from `OrganizationsApi.StopRecording`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
organizationId string The unique id of the organization
recordingId string The unique id of a recording

Other Parameters

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

Name Type Description Notes

stopRecordingRequest | StopRecordingRequest | |

Return type

StopRecording200Response

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]

SyncDirectorySyncGroupsToTeams

SyncDirectorySyncGroupsToTeams200Response SyncDirectorySyncGroupsToTeams(ctx, organizationId).SyncDirectorySyncGroupsToTeamsRequest(syncDirectorySyncGroupsToTeamsRequest).Execute()

Syncs a list of group/team unique identifiers pairs together.

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    syncDirectorySyncGroupsToTeamsRequest := *openapiclient.NewSyncDirectorySyncGroupsToTeamsRequest([]openapiclient.SyncDirectorySyncGroupsToTeamsRequestToSyncInner{*openapiclient.NewSyncDirectorySyncGroupsToTeamsRequestToSyncInner("GroupId_example")}) // SyncDirectorySyncGroupsToTeamsRequest | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

syncDirectorySyncGroupsToTeamsRequest | SyncDirectorySyncGroupsToTeamsRequest | |

Return type

SyncDirectorySyncGroupsToTeams200Response

Authorization

user-internal

HTTP request headers

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

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

TransferOrganization

TransferOrganization200Response TransferOrganization(ctx, organizationId).TransferOrganizationRequest(transferOrganizationRequest).Execute()

Transfer one organization (source) into another organization (target).

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    transferOrganizationRequest := *openapiclient.NewTransferOrganizationRequest("Source_example") // TransferOrganizationRequest | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

transferOrganizationRequest | TransferOrganizationRequest | |

Return type

TransferOrganization200Response

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]

UpdateEnvironment

Environment UpdateEnvironment(ctx, organizationId, environmentName).UpdateEnvironment(updateEnvironment).Execute()

Update an existing environment within an organization

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    environmentName := "environmentName_example" // string | The unique name of the environment within the organization
    updateEnvironment := *openapiclient.NewUpdateEnvironment() // UpdateEnvironment | 

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
organizationId string The unique id of the organization
environmentName string The unique name of the environment within the organization

Other Parameters

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

Name Type Description Notes

updateEnvironment | UpdateEnvironment | |

Return type

Environment

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]

UpdateMemberInOrganizationById

OrganizationMember UpdateMemberInOrganizationById(ctx, organizationId, userId).UpdateMemberInOrganizationByIdRequest(updateMemberInOrganizationByIdRequest).Execute()

Update specified organization member

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    userId := "userId_example" // string | The unique ID of the User
    updateMemberInOrganizationByIdRequest := *openapiclient.NewUpdateMemberInOrganizationByIdRequest() // UpdateMemberInOrganizationByIdRequest | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.OrganizationsApi.UpdateMemberInOrganizationById(context.Background(), organizationId, userId).UpdateMemberInOrganizationByIdRequest(updateMemberInOrganizationByIdRequest).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.UpdateMemberInOrganizationById``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UpdateMemberInOrganizationById`: OrganizationMember
    fmt.Fprintf(os.Stdout, "Response from `OrganizationsApi.UpdateMemberInOrganizationById`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
organizationId string The unique id of the organization
userId string The unique ID of the User

Other Parameters

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

Name Type Description Notes

updateMemberInOrganizationByIdRequest | UpdateMemberInOrganizationByIdRequest | |

Return type

OrganizationMember

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]

UpdateMembersInOrganizationTeam

UpdateMembersInOrganizationTeam(ctx, organizationId, teamId).UpdateMembersInOrganizationTeamRequest(updateMembersInOrganizationTeamRequest).Execute()

Updates members of an organization team

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    teamId := "teamId_example" // string | The unique ID of the Team
    updateMembersInOrganizationTeamRequest := *openapiclient.NewUpdateMembersInOrganizationTeamRequest() // UpdateMembersInOrganizationTeamRequest | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.OrganizationsApi.UpdateMembersInOrganizationTeam(context.Background(), organizationId, teamId).UpdateMembersInOrganizationTeamRequest(updateMembersInOrganizationTeamRequest).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.UpdateMembersInOrganizationTeam``: %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.
organizationId string The unique id of the organization
teamId string The unique ID of the Team

Other Parameters

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

Name Type Description Notes

updateMembersInOrganizationTeamRequest | UpdateMembersInOrganizationTeamRequest | |

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]

UpdateOrganizationCustomField

CustomField UpdateOrganizationCustomField(ctx, organizationId, fieldName).UpdateOrganizationCustomFieldRequest(updateOrganizationCustomFieldRequest).Execute()

Update a custom field in an organization

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    fieldName := "fieldName_example" // string | The name of the custom field
    updateOrganizationCustomFieldRequest := *openapiclient.NewUpdateOrganizationCustomFieldRequest() // UpdateOrganizationCustomFieldRequest | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.OrganizationsApi.UpdateOrganizationCustomField(context.Background(), organizationId, fieldName).UpdateOrganizationCustomFieldRequest(updateOrganizationCustomFieldRequest).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.UpdateOrganizationCustomField``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UpdateOrganizationCustomField`: CustomField
    fmt.Fprintf(os.Stdout, "Response from `OrganizationsApi.UpdateOrganizationCustomField`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
organizationId string The unique id of the organization
fieldName string The name of the custom field

Other Parameters

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

Name Type Description Notes

updateOrganizationCustomFieldRequest | UpdateOrganizationCustomFieldRequest | |

Return type

CustomField

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]

UpdateOrganizationMemberLastSeenAt

UpdateOrganizationMemberLastSeenAt(ctx, organizationId).Execute()

Update organization member's "last seen at" timestamp.

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization

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

Other Parameters

Other parameters are passed through a pointer to a apiUpdateOrganizationMemberLastSeenAtRequest 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]

UpdateTeamInOrganizationById

OrganizationTeam UpdateTeamInOrganizationById(ctx, organizationId, teamId).UpdateTeamInOrganizationByIdRequest(updateTeamInOrganizationByIdRequest).Execute()

Update specified organization team

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    teamId := "teamId_example" // string | The unique ID of the Team
    updateTeamInOrganizationByIdRequest := *openapiclient.NewUpdateTeamInOrganizationByIdRequest("Title_example") // UpdateTeamInOrganizationByIdRequest | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.OrganizationsApi.UpdateTeamInOrganizationById(context.Background(), organizationId, teamId).UpdateTeamInOrganizationByIdRequest(updateTeamInOrganizationByIdRequest).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.UpdateTeamInOrganizationById``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UpdateTeamInOrganizationById`: OrganizationTeam
    fmt.Fprintf(os.Stdout, "Response from `OrganizationsApi.UpdateTeamInOrganizationById`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
organizationId string The unique id of the organization
teamId string The unique ID of the Team

Other Parameters

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

Name Type Description Notes

updateTeamInOrganizationByIdRequest | UpdateTeamInOrganizationByIdRequest | |

Return type

OrganizationTeam

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]

UpgradeOrganizationPlan

BillingUpgrade UpgradeOrganizationPlan(ctx, organizationId).RequestUpgradeOrganizationBilling(requestUpgradeOrganizationBilling).Execute()

Upgrade an organization's billing plan

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    requestUpgradeOrganizationBilling := *openapiclient.NewRequestUpgradeOrganizationBilling(openapiclient.BillingProduct("free"), openapiclient.BillingInterval("monthly")) // RequestUpgradeOrganizationBilling | 

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

requestUpgradeOrganizationBilling | RequestUpgradeOrganizationBilling | |

Return type

BillingUpgrade

Authorization

user-internal

HTTP request headers

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

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

UpsertSchemaEntities

UpsertSchemaEntities(ctx, organizationId, entityType).UpsertSchemaEntitiesRequest(upsertSchemaEntitiesRequest).Execute()

Update/Create/Delete entities in a schema.

Example

package main

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

func main() {
    organizationId := "organizationId_example" // string | The unique id of the organization
    entityType := "entityType_example" // string | Type of the entity
    upsertSchemaEntitiesRequest := *openapiclient.NewUpsertSchemaEntitiesRequest([]openapiclient.UpsertEntity{*openapiclient.NewUpsertEntity("EntityId_example", map[string]UpsertEntityPropertiesValue{"key": openapiclient.UpsertEntity_properties_value{UpsertEntityPropertiesValueOneOf: openapiclient.NewUpsertEntityPropertiesValueOneOf("EntityId_example")}})}) // UpsertSchemaEntitiesRequest | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.OrganizationsApi.UpsertSchemaEntities(context.Background(), organizationId, entityType).UpsertSchemaEntitiesRequest(upsertSchemaEntitiesRequest).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `OrganizationsApi.UpsertSchemaEntities``: %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.
organizationId string The unique id of the organization
entityType string Type of the entity

Other Parameters

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

Name Type Description Notes

upsertSchemaEntitiesRequest | UpsertSchemaEntitiesRequest | |

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]