Categorygithub.com/GitbookIO/go-gitbook
module
0.2.0
Repository: https://github.com/gitbookio/go-gitbook.git
Documentation: pkg.go.dev

# README

go-gitbook

Go client for the GitBook API.

Installation

go get github.com/GitbookIO/go-gitbook

Usage

Import the package:

import gitbook "github.com/GitbookIO/go-gitbook/api"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value sw.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), gitbook.ContextServerIndex, 1)

Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), gitbook.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), gitbook.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), gitbook.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

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

ClassMethodHTTP requestDescription
AnalyticsApiGetContentAnalyticsForSpaceByIdGet /spaces/{spaceId}/insights/contentGet content analytics for a given space.
AnalyticsApiGetSearchAnalyticsForSpaceByIdGet /spaces/{spaceId}/insights/searchGet an overview of the top search queries in a space.
AnalyticsApiGetTrafficAnalyticsForSpaceByIdGet /spaces/{spaceId}/insights/trafficGet traffic page views for a given space
AnalyticsApiTrackViewInSpaceByIdPost /spaces/{spaceId}/insights/track_view
ApiApiGetApiInformationGet /Get information about the state of the GitBook API
CollectionsApiGetCollectionByIdGet /collections/{collectionId}Get the details about a collection using its ID
CollectionsApiGetCollectionPublishingAuthByIdGet /collections/{collectionId}/publishing/authGet the publishing authentication configuration for a collection.
CollectionsApiListSpacesInCollectionByIdGet /collections/{collectionId}/spacesList all the spaces in a collection by its ID.
CollectionsApiUpdateCollectionByIdPatch /collections/{collectionId}Update the details of a collection
CollectionsApiUpdateCollectionPublishingAuthByIdPost /collections/{collectionId}/publishing/authUpdate the publishing authentication configuration for a collection.
DefaultApiAskQueryPost /search/askAsk a question to an AI across spaces that is accessible by the currently authenticated target.
DefaultApiAskQueryInSpacePost /spaces/{spaceId}/search/askAsk a question to an AI within the context of the space.
DefaultApiAskQueryInSpaceWithGetGet /spaces/{spaceId}/search/askAsk a question to an AI within the context of the space.
DefaultApiAskQueryWithGetGet /search/askAsk a question to an AI across spaces that is accessible by the currently authenticated target.
DefaultApiGetCurrentRevisionGet /spaces/{spaceId}/contentGet the current primary content revision for a space
DefaultApiGetPageByIdGet /spaces/{spaceId}/content/page/{pageId}Get a page by its ID in the primary content.
DefaultApiGetPageByPathGet /spaces/{spaceId}/content/path/{pagePath}Get a page by its path in the primary content.
DefaultApiGetPageInChangeRequestByIdGet /spaces/{spaceId}/change-requests/{changeRequestId}/content/page/{pageId}Get a page by its ID in a change request.
DefaultApiGetPageInChangeRequestByPathGet /spaces/{spaceId}/change-requests/{changeRequestId}/content/path/{pagePath}Get a page by its path in a change request.
DefaultApiGetPageInRevisionByIdGet /spaces/{spaceId}/revisions/{revisionId}/page/{pageId}Get a page by its ID in a revision.
DefaultApiGetPageInRevisionByPathGet /spaces/{spaceId}/revisions/{revisionId}/path/{pagePath}Get a page by its path in a revision.
DefaultApiGetRecommendedQuestionsPost /search/questionsGet a list of questions recommended by AI for a list of content.
DefaultApiGetRecommendedQuestionsInSpaceGet /spaces/{spaceId}/search/questionsGet a list of questions that can be asked in a space.
DefaultApiGetRevisionByIdGet /spaces/{spaceId}/revisions/{revisionId}Get a specific revision in a space
DefaultApiGetRevisionOfChangeRequestByIdGet /spaces/{spaceId}/change-requests/{changeRequestId}/contentGet the latest content revision for a change request.
DefaultApiImportContentPost /spaces/{spaceId}/content/importImport content in a space.
DefaultApiImportContentInChangeRequestPost /spaces/{spaceId}/change-requests/{changeRequestId}/content/importImport content in a change request.
DefaultApiImportContentInChangeRequestPageByIdPost /spaces/{spaceId}/change-requests/{changeRequestId}/content/page/{pageId}/importImport external content into a page of a change-request by its ID.
DefaultApiImportContentInPageByIdPost /spaces/{spaceId}/content/page/{pageId}/importImport external content into a page by its ID.
DefaultApiInstallIntegrationOnSpacePost /integrations/{integrationName}/installations/{installationId}/spacesInstall integration on a space using an existing installation
DefaultApiListFilesGet /spaces/{spaceId}/content/filesList all files for the latest primary revision content for a space
DefaultApiListFilesInChangeRequestByIdGet /spaces/{spaceId}/change-requests/{changeRequestId}/content/filesList all files in the latest content of the change-request
DefaultApiListFilesInRevisionByIdGet /spaces/{spaceId}/revisions/{revisionId}/filesList all files in a revision
DefaultApiRenderIntegrationUIWithGetGet /integrations/{integrationName}/renderRender an integration UI in the context of an installation.
DefaultApiRenderIntegrationUIWithPostPost /integrations/{integrationName}/renderRender an integration UI in the context of an installation.
DefaultApiSearchSpaceContentGet /spaces/{spaceId}/searchSearch content in a space
DefaultApiUninstallIntegrationFromSpaceDelete /integrations/{integrationName}/installations/{installationId}/spaces/{spaceId}Uninstall the integration from a space
DefaultApiUpdateIntegrationSpaceInstallationPatch /integrations/{integrationName}/installations/{installationId}/spaces/{spaceId}Update external IDs and configurations of an integration's installation for a space
DsyncApiListDirectorySyncGroupsGet /orgs/{organizationId}/dsync/groupsLists the groups exposed to the synced Directory on an organization.
DsyncApiSetupDirectorySyncPost /orgs/{organizationId}/dsyncSet up Directory Sync in an organization.
DsyncApiSyncDirectorySyncGroupsToTeamsPost /orgs/{organizationId}/dsync/teamsSyncs a list of group/team unique identifiers pairs together.
EnvironmentsApiCreateEnvironmentPost /orgs/{organizationId}/environmentsCreate a new environment within an organization
EnvironmentsApiDeleteEnvironmentDelete /orgs/{organizationId}/environments/{environmentName}Delete an environment in an organization
EnvironmentsApiGetEnvironmentByNameGet /orgs/{organizationId}/environments/{environmentName}Get an environment by its name
EnvironmentsApiListEnvironmentsGet /orgs/{organizationId}/environmentsGet the environments in an organization
EnvironmentsApiUpdateEnvironmentPatch /orgs/{organizationId}/environments/{environmentName}Update an existing environment within an organization
HiveApiGenerateHiveAccessTokenPost /internal/hive/tokenReturns a token to authenticate with Hive.
HiveApiGenerateSpaceHiveReadAccessTokenPost /spaces/{spaceId}/hive/tokenReturns a token to authenticate with Hive to read content from a given space.
IntegrationsApiCreateIntegrationInstallationTokenPost /integrations/{integrationName}/installations/{installationId}/tokensCreate an integration installation API token
IntegrationsApiGetIntegrationByNameGet /integrations/{integrationName}Get a specific integration by its name
IntegrationsApiGetIntegrationEventGet /integrations/{integrationName}/events/{eventId}Get a specific integration event by its id
IntegrationsApiGetIntegrationInstallationByIdGet /integrations/{integrationName}/installations/{installationId}Get a specific integration's installation by its ID
IntegrationsApiGetIntegrationSpaceInstallationGet /integrations/{integrationName}/installations/{installationId}/spaces/{spaceId}Get a specific integration's space installation
IntegrationsApiInstallIntegrationPost /integrations/{integrationName}/installationsInstall integration on a target organization
IntegrationsApiListIntegrationEventsGet /integrations/{integrationName}/eventsList all integration events
IntegrationsApiListIntegrationInstallationsGet /integrations/{integrationName}/installationsFetch a list of installations of an integration
IntegrationsApiListIntegrationSpaceInstallationsGet /integrations/{integrationName}/spacesFetch a list of space installations of an integration
IntegrationsApiListIntegrationsGet /integrationsList all public integrations
IntegrationsApiListSpaceIntegrationsBlocksGet /spaces/{spaceId}/integration-blocksList integrations blocks for a space
IntegrationsApiPublishIntegrationPost /integrations/{integrationName}Publish an integration
IntegrationsApiRemoveIntegrationDevSpaceDelete /integrations/{integrationName}/spaces/{spaceId}/devRemove the development space for an integration
IntegrationsApiUninstallIntegrationDelete /integrations/{integrationName}/installations/{installationId}Uninstall the integration from a target organization
IntegrationsApiUnpublishIntegrationDelete /integrations/{integrationName}Unpublish an integration
IntegrationsApiUpdateIntegrationDevSpacePut /integrations/{integrationName}/spaces/{spaceId}/devUpdate the development space for an integration
IntegrationsApiUpdateIntegrationInstallationPatch /integrations/{integrationName}/installations/{installationId}Update external IDs and configurations of an integration's installation
OrganizationsApiAddEventsToRecordingPost /orgs/{organizationId}/recordings/{recordingId}/eventsAdd events to a running recording
OrganizationsApiAddMemberToOrganizationTeamByIdPut /orgs/{organizationId}/teams/{teamId}/members/{userId}Add or update a team membership
OrganizationsApiCreateEnvironmentPost /orgs/{organizationId}/environmentsCreate a new environment within an organization
OrganizationsApiCreateOrganizationPost /orgsCreate an organization
OrganizationsApiCreateOrganizationCustomFieldPost /orgs/{organizationId}/custom-fieldsCreate a new custom field in an orgamization
OrganizationsApiCreateOrganizationTeamPut /orgs/{organizationId}/teamsCreate organization team
OrganizationsApiDeleteEntitySchemaDelete /orgs/{organizationId}/schemas/{entityType}Delete an entity schema.
OrganizationsApiDeleteEnvironmentDelete /orgs/{organizationId}/environments/{environmentName}Delete an environment in an organization
OrganizationsApiDeleteMemberFromOrganizationTeamByIdDelete /orgs/{organizationId}/teams/{teamId}/members/{userId}Delete members from a team
OrganizationsApiDeleteOrganizationCustomFieldDelete /orgs/{organizationId}/custom-fields/{fieldName}Delete a custom field in an organization
OrganizationsApiGetEntityGet /orgs/{organizationId}/schemas/{entityType}/entities/{entityId}Get an entity using its ID.
OrganizationsApiGetEntitySchemaGet /orgs/{organizationId}/schemas/{entityType}Get an entity schema by its type.
OrganizationsApiGetEnvironmentByNameGet /orgs/{organizationId}/environments/{environmentName}Get an environment by its name
OrganizationsApiGetMemberInOrganizationByIdGet /orgs/{organizationId}/members/{userId}Get specified organization member
OrganizationsApiGetOrganizationBillingPortalGet /orgs/{organizationId}/billingGet the billing portal for an organization
OrganizationsApiGetOrganizationByIdGet /orgs/{organizationId}Get an organization by its ID
OrganizationsApiGetOrganizationCustomFieldByNameGet /orgs/{organizationId}/custom-fields/{fieldName}Get a custom field by its name
OrganizationsApiGetRecordingGet /orgs/{organizationId}/recordings/{recordingId}Get a recording by its ID
OrganizationsApiGetTeamInOrganizationByIdGet /orgs/{organizationId}/teams/{teamId}Get specified organization team
OrganizationsApiInviteUsersToOrganizationPost /orgs/{organizationId}/invitesInvite users to a given organization based on a list of emails
OrganizationsApiJoinOrganizationWithInvitePost /orgs/{organizationId}/invites/{inviteId}Use an invite to join an organization.
OrganizationsApiListCollectionsInOrganizationByIdGet /orgs/{organizationId}/collectionsList organization collections
OrganizationsApiListDirectorySyncGroupsGet /orgs/{organizationId}/dsync/groupsLists the groups exposed to the synced Directory on an organization.
OrganizationsApiListEntitySchemasGet /orgs/{organizationId}/schemasList the entity schemas in an organization.
OrganizationsApiListEnvironmentsGet /orgs/{organizationId}/environmentsGet the environments in an organization
OrganizationsApiListMembersInOrganizationByIdGet /orgs/{organizationId}/membersList organization members
OrganizationsApiListOrganizationCustomFieldsGet /orgs/{organizationId}/custom-fieldsGet the custom fields for spaces in an organization
OrganizationsApiListOrganizationsForAuthenticatedUserGet /orgsGet the list of organizations for the currently authenticated user
OrganizationsApiListRecordingsGet /orgs/{organizationId}/recordingsList recordings
OrganizationsApiListSchemaEntitiesGet /orgs/{organizationId}/schemas/{entityType}/entitiesList entities in an organization for a given type.
OrganizationsApiListSpacesInOrganizationByIdGet /orgs/{organizationId}/spacesList organization spaces
OrganizationsApiListSpacesWithGitSyncInOrganizationByIdGet /orgs/{organizationId}/spaces/gitsyncList organization spaces including Git sync metadata
OrganizationsApiListTeamMembersInOrganizationByIdGet /orgs/{organizationId}/teams/{teamId}/membersList team members
OrganizationsApiListTeamsInOrganizationByIdGet /orgs/{organizationId}/teamsList organization teams
OrganizationsApiRemoveMemberFromOrganizationByIdDelete /orgs/{organizationId}/members/{userId}Delete a member from an organization
OrganizationsApiRemoveTeamFromOrganizationByIdDelete /orgs/{organizationId}/teams/{teamId}Delete a team in an organization
OrganizationsApiRequestOrganizationUpgradePost /orgs/{organizationId}/request_upgradeSend a request to ask the organization's admin to upgrade it.
OrganizationsApiSearchOrganizationContentGet /orgs/{organizationId}/searchSearch content in an organization
OrganizationsApiSetEntitySchemaPut /orgs/{organizationId}/schemas/{entityType}Create or update an entity schema.
OrganizationsApiSetUserAsSSOMemberForOrganizationPost /orgs/{organizationId}/members/{userId}/ssoSet a user as an SSO member of an organization
OrganizationsApiSetupDirectorySyncPost /orgs/{organizationId}/dsyncSet up Directory Sync in an organization.
OrganizationsApiStartRecordingPost /orgs/{organizationId}/recordingsStart a recording
OrganizationsApiStopRecordingPost /orgs/{organizationId}/recordings/{recordingId}/stopStop a recording
OrganizationsApiSyncDirectorySyncGroupsToTeamsPost /orgs/{organizationId}/dsync/teamsSyncs a list of group/team unique identifiers pairs together.
OrganizationsApiTransferOrganizationPost /orgs/{organizationId}/transferTransfer one organization (source) into another organization (target).
OrganizationsApiUpdateEnvironmentPatch /orgs/{organizationId}/environments/{environmentName}Update an existing environment within an organization
OrganizationsApiUpdateMemberInOrganizationByIdPatch /orgs/{organizationId}/members/{userId}Update specified organization member
OrganizationsApiUpdateMembersInOrganizationTeamPut /orgs/{organizationId}/teams/{teamId}/membersUpdates members of an organization team
OrganizationsApiUpdateOrganizationCustomFieldPatch /orgs/{organizationId}/custom-fields/{fieldName}Update a custom field in an organization
OrganizationsApiUpdateOrganizationMemberLastSeenAtPost /orgs/{organizationId}/pingUpdate organization member's "last seen at" timestamp.
OrganizationsApiUpdateTeamInOrganizationByIdPatch /orgs/{organizationId}/teams/{teamId}Update specified organization team
OrganizationsApiUpgradeOrganizationPlanPost /orgs/{organizationId}/billingUpgrade an organization's billing plan
OrganizationsApiUpsertSchemaEntitiesPut /orgs/{organizationId}/schemas/{entityType}/entitiesUpdate/Create/Delete entities in a schema.
PermissionsApiListPermissionsAggregateInCollectionGet /collections/{collectionId}/permissions/aggregateList permissions for all users in a collection.
PermissionsApiListPermissionsAggregateInSpaceGet /spaces/{spaceId}/permissions/aggregateList permissions for all users in a space.
PermissionsApiListSpacesForOrganizationMemberGet /orgs/{organizationId}/members/{userId}/spacesList permissions accross all spaces for a member of an organization
SearchApiSearchContentGet /searchSearch content across spaces that is accessible by the currently authenticated target
SpacesApiCreateChangeRequestPost /spaces/{spaceId}/change-requestsCreate a new change request for a space.
SpacesApiCreateSpacePost /orgs/{organizationId}/spacesCreate an organization space
SpacesApiCreateSpaceRelationPost /spaces/{spaceId}/relationsCreate a new relation between a source space and a target space
SpacesApiDeleteCommentInChangeRequestDelete /spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}Delete a comment in a change request.
SpacesApiDeleteCommentInSpaceDelete /spaces/{spaceId}/comments/{commentId}Delete a comment in a space.
SpacesApiDeleteCommentReplyInChangeRequestDelete /spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}/replies/{commentReplyId}Delete a comment reply in a change request.
SpacesApiDeleteCommentReplyInSpaceDelete /spaces/{spaceId}/comments/{commentId}/replies/{commentReplyId}Delete a comment reply in a space.
SpacesApiDeleteSpaceRelationDelete /spaces/{spaceId}/relations/{targetSpaceId}Delete a relation between spaces
SpacesApiDuplicateSpacePost /spaces/{spaceId}/duplicateCreate a duplicate of the space.
SpacesApiExportToGitRepositoryPost /spaces/{spaceId}/git/exportExport the space content to a Git repository.
SpacesApiGetChangeRequestByIdGet /spaces/{spaceId}/change-requests/{changeRequestId}Get the change request with the given id.
SpacesApiGetCommentInChangeRequestGet /spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}Get a comment in a change request.
SpacesApiGetCommentInSpaceGet /spaces/{spaceId}/comments/{commentId}Get a comment in a space.
SpacesApiGetCommentReplyInChangeRequestGet /spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}/replies/{commentReplyId}Get a comment reply in a change request.
SpacesApiGetCommentReplyInSpaceGet /spaces/{spaceId}/comments/{commentId}/replies/{commentReplyId}Get a comment reply in a space.
SpacesApiGetContentAnalyticsForSpaceByIdGet /spaces/{spaceId}/insights/contentGet content analytics for a given space.
SpacesApiGetContributorsByChangeRequestIdGet /spaces/{spaceId}/change-requests/{changeRequestId}/contributorsGet all contributors for the change request with the given id.
SpacesApiGetRequestedReviewersByChangeRequestIdGet /spaces/{spaceId}/change-requests/{changeRequestId}/requested-reviewersGet all requested reviewers for a change request.
SpacesApiGetReviewsByChangeRequestIdGet /spaces/{spaceId}/change-requests/{changeRequestId}/reviewsGet all reviews for a change request.
SpacesApiGetSearchAnalyticsForSpaceByIdGet /spaces/{spaceId}/insights/searchGet an overview of the top search queries in a space.
SpacesApiGetSpaceByIdGet /spaces/{spaceId}Get the details about a space.
SpacesApiGetSpaceCustomFieldsGet /spaces/{spaceId}/custom-fieldsGet the values of the custom fields set on a space
SpacesApiGetSpaceGitInfoGet /spaces/{spaceId}/git/infoGet metadata about the Git Sync provider currently set up on the space
SpacesApiGetSpacePublishingAuthByIdGet /spaces/{spaceId}/publishing/authGet the publishing authentication configuration for a space.
SpacesApiGetSpaceRelationGet /spaces/{spaceId}/relations/{targetSpaceId}Get the relation between 2 spaces.
SpacesApiGetTrafficAnalyticsForSpaceByIdGet /spaces/{spaceId}/insights/trafficGet traffic page views for a given space
SpacesApiImportGitRepositoryPost /spaces/{spaceId}/git/importImport a Git repository
SpacesApiListChangeRequestsForSpaceGet /spaces/{spaceId}/change-requestsList change requests for a space.
SpacesApiListCommentRepliesInChangeRequestGet /spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}/repliesList all the replies to a comment in a change request.
SpacesApiListCommentRepliesInSpaceGet /spaces/{spaceId}/comments/{commentId}/repliesList all the replies to a comment in a space.
SpacesApiListCommentsInChangeRequestGet /spaces/{spaceId}/change-requests/{changeRequestId}/commentsList all the comments in a change request.
SpacesApiListCommentsInSpaceGet /spaces/{spaceId}/commentsList all the comments in a space.
SpacesApiListPermissionsAggregateInCollectionGet /collections/{collectionId}/permissions/aggregateList permissions for all users in a collection.
SpacesApiListPermissionsAggregateInSpaceGet /spaces/{spaceId}/permissions/aggregateList permissions for all users in a space.
SpacesApiListSpaceRelationsGet /spaces/{spaceId}/relationsList all relations for a space
SpacesApiListSpaceRelationsInOrganizationGet /orgs/{organizationId}/space-relationsList all relations between spaces in an organization
SpacesApiListSpacesForOrganizationMemberGet /orgs/{organizationId}/members/{userId}/spacesList permissions accross all spaces for a member of an organization
SpacesApiMergeChangeRequestPost /spaces/{spaceId}/change-requests/{changeRequestId}/mergeMerge a change request in the primary content of a space.
SpacesApiPostCommentInChangeRequestPost /spaces/{spaceId}/change-requests/{changeRequestId}/commentsPost a new comment in a change request.
SpacesApiPostCommentInSpacePost /spaces/{spaceId}/commentsPost a new comment in a space.
SpacesApiPostCommentReplyInChangeRequestPost /spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}/repliesPost a new reply to a comment in a change request.
SpacesApiPostCommentReplyInSpacePost /spaces/{spaceId}/comments/{commentId}/repliesPost a new reply to a comment in a space.
SpacesApiRequestReviewersForChangeRequestPost /spaces/{spaceId}/change-requests/{changeRequestId}/requested-reviewersRequest reviewers on a change request. Note that requesting a review from teams is not yet supported.
SpacesApiSubmitChangeRequestReviewPost /spaces/{spaceId}/change-requests/{changeRequestId}/reviewsSubmit a review for a change request.
SpacesApiTrackViewInSpaceByIdPost /spaces/{spaceId}/insights/track_view
SpacesApiUpdateChangeRequestPost /spaces/{spaceId}/change-requests/{changeRequestId}/updateUpdate a change-request with changes from primary content.
SpacesApiUpdateCommentInChangeRequestPut /spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}Update a comment in a change request.
SpacesApiUpdateCommentInSpacePut /spaces/{spaceId}/comments/{commentId}Update a comment in a space.
SpacesApiUpdateCommentReplyInChangeRequestPut /spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}/replies/{commentReplyId}Update a comment reply in a change request.
SpacesApiUpdateCommentReplyInSpacePut /spaces/{spaceId}/comments/{commentId}/replies/{commentReplyId}Update a comment reply in a space.
SpacesApiUpdateSpaceByIdPatch /spaces/{spaceId}Update the details of a space
SpacesApiUpdateSpaceCustomFieldsPatch /spaces/{spaceId}/custom-fieldsUpdate the custom fields in a space
SpacesApiUpdateSpacePublishingAuthByIdPost /spaces/{spaceId}/publishing/authUpdate the publishing authentication configuration for a space.
TeamsApiListTeamsForOrganizationMemberGet /orgs/{organizationId}/members/{userId}/teamsList all teams an organization member is part of
UrlsApiGetContentByUrlGet /urls/contentResolve a URL to a content (space, collection, page)
UsersApiGetAuthenticatedUserGet /userGet profile of authenticated user
UsersApiGetUserByIdGet /users/{userId}Get a user by its ID
UsersApiListSpacesForAuthenticatedUserGet /user/spacesList spaces for the authenticated user

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

user

  • Type: HTTP Bearer token authentication

Example

auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)

user-internal

  • Type: HTTP Bearer token authentication

Example

auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)

user-staff

  • Type: HTTP Bearer token authentication

Example

auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)

integration

  • Type: HTTP Bearer token authentication

Example

auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)

integration-installation

  • Type: HTTP Bearer token authentication

Example

auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

© 2023 GitBook, Inc.

# Packages

No description provided by the author