Skip to content

GitbookIO/go-gitbook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Class Method HTTP request Description
AnalyticsApi GetContentAnalyticsForSpaceById Get /spaces/{spaceId}/insights/content Get content analytics for a given space.
AnalyticsApi GetSearchAnalyticsForSpaceById Get /spaces/{spaceId}/insights/search Get an overview of the top search queries in a space.
AnalyticsApi GetTrafficAnalyticsForSpaceById Get /spaces/{spaceId}/insights/traffic Get traffic page views for a given space
AnalyticsApi TrackViewInSpaceById Post /spaces/{spaceId}/insights/track_view
ApiApi GetApiInformation Get / Get information about the state of the GitBook API
CollectionsApi GetCollectionById Get /collections/{collectionId} Get the details about a collection using its ID
CollectionsApi GetCollectionPublishingAuthById Get /collections/{collectionId}/publishing/auth Get the publishing authentication configuration for a collection.
CollectionsApi ListSpacesInCollectionById Get /collections/{collectionId}/spaces List all the spaces in a collection by its ID.
CollectionsApi UpdateCollectionById Patch /collections/{collectionId} Update the details of a collection
CollectionsApi UpdateCollectionPublishingAuthById Post /collections/{collectionId}/publishing/auth Update the publishing authentication configuration for a collection.
DefaultApi AskQuery Post /search/ask Ask a question to an AI across spaces that is accessible by the currently authenticated target.
DefaultApi AskQueryInSpace Post /spaces/{spaceId}/search/ask Ask a question to an AI within the context of the space.
DefaultApi AskQueryInSpaceWithGet Get /spaces/{spaceId}/search/ask Ask a question to an AI within the context of the space.
DefaultApi AskQueryWithGet Get /search/ask Ask a question to an AI across spaces that is accessible by the currently authenticated target.
DefaultApi GetCurrentRevision Get /spaces/{spaceId}/content Get the current primary content revision for a space
DefaultApi GetPageById Get /spaces/{spaceId}/content/page/{pageId} Get a page by its ID in the primary content.
DefaultApi GetPageByPath Get /spaces/{spaceId}/content/path/{pagePath} Get a page by its path in the primary content.
DefaultApi GetPageInChangeRequestById Get /spaces/{spaceId}/change-requests/{changeRequestId}/content/page/{pageId} Get a page by its ID in a change request.
DefaultApi GetPageInChangeRequestByPath Get /spaces/{spaceId}/change-requests/{changeRequestId}/content/path/{pagePath} Get a page by its path in a change request.
DefaultApi GetPageInRevisionById Get /spaces/{spaceId}/revisions/{revisionId}/page/{pageId} Get a page by its ID in a revision.
DefaultApi GetPageInRevisionByPath Get /spaces/{spaceId}/revisions/{revisionId}/path/{pagePath} Get a page by its path in a revision.
DefaultApi GetRecommendedQuestions Post /search/questions Get a list of questions recommended by AI for a list of content.
DefaultApi GetRecommendedQuestionsInSpace Get /spaces/{spaceId}/search/questions Get a list of questions that can be asked in a space.
DefaultApi GetRevisionById Get /spaces/{spaceId}/revisions/{revisionId} Get a specific revision in a space
DefaultApi GetRevisionOfChangeRequestById Get /spaces/{spaceId}/change-requests/{changeRequestId}/content Get the latest content revision for a change request.
DefaultApi ImportContent Post /spaces/{spaceId}/content/import Import content in a space.
DefaultApi ImportContentInChangeRequest Post /spaces/{spaceId}/change-requests/{changeRequestId}/content/import Import content in a change request.
DefaultApi ImportContentInChangeRequestPageById Post /spaces/{spaceId}/change-requests/{changeRequestId}/content/page/{pageId}/import Import external content into a page of a change-request by its ID.
DefaultApi ImportContentInPageById Post /spaces/{spaceId}/content/page/{pageId}/import Import external content into a page by its ID.
DefaultApi InstallIntegrationOnSpace Post /integrations/{integrationName}/installations/{installationId}/spaces Install integration on a space using an existing installation
DefaultApi ListFiles Get /spaces/{spaceId}/content/files List all files for the latest primary revision content for a space
DefaultApi ListFilesInChangeRequestById Get /spaces/{spaceId}/change-requests/{changeRequestId}/content/files List all files in the latest content of the change-request
DefaultApi ListFilesInRevisionById Get /spaces/{spaceId}/revisions/{revisionId}/files List all files in a revision
DefaultApi RenderIntegrationUIWithGet Get /integrations/{integrationName}/render Render an integration UI in the context of an installation.
DefaultApi RenderIntegrationUIWithPost Post /integrations/{integrationName}/render Render an integration UI in the context of an installation.
DefaultApi SearchSpaceContent Get /spaces/{spaceId}/search Search content in a space
DefaultApi UninstallIntegrationFromSpace Delete /integrations/{integrationName}/installations/{installationId}/spaces/{spaceId} Uninstall the integration from a space
DefaultApi UpdateIntegrationSpaceInstallation Patch /integrations/{integrationName}/installations/{installationId}/spaces/{spaceId} Update external IDs and configurations of an integration's installation for a space
DsyncApi ListDirectorySyncGroups Get /orgs/{organizationId}/dsync/groups Lists the groups exposed to the synced Directory on an organization.
DsyncApi SetupDirectorySync Post /orgs/{organizationId}/dsync Set up Directory Sync in an organization.
DsyncApi SyncDirectorySyncGroupsToTeams Post /orgs/{organizationId}/dsync/teams Syncs a list of group/team unique identifiers pairs together.
EnvironmentsApi CreateEnvironment Post /orgs/{organizationId}/environments Create a new environment within an organization
EnvironmentsApi DeleteEnvironment Delete /orgs/{organizationId}/environments/{environmentName} Delete an environment in an organization
EnvironmentsApi GetEnvironmentByName Get /orgs/{organizationId}/environments/{environmentName} Get an environment by its name
EnvironmentsApi ListEnvironments Get /orgs/{organizationId}/environments Get the environments in an organization
EnvironmentsApi UpdateEnvironment Patch /orgs/{organizationId}/environments/{environmentName} Update an existing environment within an organization
HiveApi GenerateHiveAccessToken Post /internal/hive/token Returns a token to authenticate with Hive.
HiveApi GenerateSpaceHiveReadAccessToken Post /spaces/{spaceId}/hive/token Returns a token to authenticate with Hive to read content from a given space.
IntegrationsApi CreateIntegrationInstallationToken Post /integrations/{integrationName}/installations/{installationId}/tokens Create an integration installation API token
IntegrationsApi GetIntegrationByName Get /integrations/{integrationName} Get a specific integration by its name
IntegrationsApi GetIntegrationEvent Get /integrations/{integrationName}/events/{eventId} Get a specific integration event by its id
IntegrationsApi GetIntegrationInstallationById Get /integrations/{integrationName}/installations/{installationId} Get a specific integration's installation by its ID
IntegrationsApi GetIntegrationSpaceInstallation Get /integrations/{integrationName}/installations/{installationId}/spaces/{spaceId} Get a specific integration's space installation
IntegrationsApi InstallIntegration Post /integrations/{integrationName}/installations Install integration on a target organization
IntegrationsApi ListIntegrationEvents Get /integrations/{integrationName}/events List all integration events
IntegrationsApi ListIntegrationInstallations Get /integrations/{integrationName}/installations Fetch a list of installations of an integration
IntegrationsApi ListIntegrationSpaceInstallations Get /integrations/{integrationName}/spaces Fetch a list of space installations of an integration
IntegrationsApi ListIntegrations Get /integrations List all public integrations
IntegrationsApi ListSpaceIntegrationsBlocks Get /spaces/{spaceId}/integration-blocks List integrations blocks for a space
IntegrationsApi PublishIntegration Post /integrations/{integrationName} Publish an integration
IntegrationsApi RemoveIntegrationDevSpace Delete /integrations/{integrationName}/spaces/{spaceId}/dev Remove the development space for an integration
IntegrationsApi UninstallIntegration Delete /integrations/{integrationName}/installations/{installationId} Uninstall the integration from a target organization
IntegrationsApi UnpublishIntegration Delete /integrations/{integrationName} Unpublish an integration
IntegrationsApi UpdateIntegrationDevSpace Put /integrations/{integrationName}/spaces/{spaceId}/dev Update the development space for an integration
IntegrationsApi UpdateIntegrationInstallation Patch /integrations/{integrationName}/installations/{installationId} Update external IDs and configurations of an integration's installation
OrganizationsApi AddEventsToRecording Post /orgs/{organizationId}/recordings/{recordingId}/events Add events to a running recording
OrganizationsApi AddMemberToOrganizationTeamById Put /orgs/{organizationId}/teams/{teamId}/members/{userId} Add or update a team membership
OrganizationsApi CreateEnvironment Post /orgs/{organizationId}/environments Create a new environment within an organization
OrganizationsApi CreateOrganization Post /orgs Create an organization
OrganizationsApi CreateOrganizationCustomField Post /orgs/{organizationId}/custom-fields Create a new custom field in an orgamization
OrganizationsApi CreateOrganizationTeam Put /orgs/{organizationId}/teams Create organization team
OrganizationsApi DeleteEntitySchema Delete /orgs/{organizationId}/schemas/{entityType} Delete an entity schema.
OrganizationsApi DeleteEnvironment Delete /orgs/{organizationId}/environments/{environmentName} Delete an environment in an organization
OrganizationsApi DeleteMemberFromOrganizationTeamById Delete /orgs/{organizationId}/teams/{teamId}/members/{userId} Delete members from a team
OrganizationsApi DeleteOrganizationCustomField Delete /orgs/{organizationId}/custom-fields/{fieldName} Delete a custom field in an organization
OrganizationsApi GetEntity Get /orgs/{organizationId}/schemas/{entityType}/entities/{entityId} Get an entity using its ID.
OrganizationsApi GetEntitySchema Get /orgs/{organizationId}/schemas/{entityType} Get an entity schema by its type.
OrganizationsApi GetEnvironmentByName Get /orgs/{organizationId}/environments/{environmentName} Get an environment by its name
OrganizationsApi GetMemberInOrganizationById Get /orgs/{organizationId}/members/{userId} Get specified organization member
OrganizationsApi GetOrganizationBillingPortal Get /orgs/{organizationId}/billing Get the billing portal for an organization
OrganizationsApi GetOrganizationById Get /orgs/{organizationId} Get an organization by its ID
OrganizationsApi GetOrganizationCustomFieldByName Get /orgs/{organizationId}/custom-fields/{fieldName} Get a custom field by its name
OrganizationsApi GetRecording Get /orgs/{organizationId}/recordings/{recordingId} Get a recording by its ID
OrganizationsApi GetTeamInOrganizationById Get /orgs/{organizationId}/teams/{teamId} Get specified organization team
OrganizationsApi InviteUsersToOrganization Post /orgs/{organizationId}/invites Invite users to a given organization based on a list of emails
OrganizationsApi JoinOrganizationWithInvite Post /orgs/{organizationId}/invites/{inviteId} Use an invite to join an organization.
OrganizationsApi ListCollectionsInOrganizationById Get /orgs/{organizationId}/collections List organization collections
OrganizationsApi ListDirectorySyncGroups Get /orgs/{organizationId}/dsync/groups Lists the groups exposed to the synced Directory on an organization.
OrganizationsApi ListEntitySchemas Get /orgs/{organizationId}/schemas List the entity schemas in an organization.
OrganizationsApi ListEnvironments Get /orgs/{organizationId}/environments Get the environments in an organization
OrganizationsApi ListMembersInOrganizationById Get /orgs/{organizationId}/members List organization members
OrganizationsApi ListOrganizationCustomFields Get /orgs/{organizationId}/custom-fields Get the custom fields for spaces in an organization
OrganizationsApi ListOrganizationsForAuthenticatedUser Get /orgs Get the list of organizations for the currently authenticated user
OrganizationsApi ListRecordings Get /orgs/{organizationId}/recordings List recordings
OrganizationsApi ListSchemaEntities Get /orgs/{organizationId}/schemas/{entityType}/entities List entities in an organization for a given type.
OrganizationsApi ListSpacesInOrganizationById Get /orgs/{organizationId}/spaces List organization spaces
OrganizationsApi ListSpacesWithGitSyncInOrganizationById Get /orgs/{organizationId}/spaces/gitsync List organization spaces including Git sync metadata
OrganizationsApi ListTeamMembersInOrganizationById Get /orgs/{organizationId}/teams/{teamId}/members List team members
OrganizationsApi ListTeamsInOrganizationById Get /orgs/{organizationId}/teams List organization teams
OrganizationsApi RemoveMemberFromOrganizationById Delete /orgs/{organizationId}/members/{userId} Delete a member from an organization
OrganizationsApi RemoveTeamFromOrganizationById Delete /orgs/{organizationId}/teams/{teamId} Delete a team in an organization
OrganizationsApi RequestOrganizationUpgrade Post /orgs/{organizationId}/request_upgrade Send a request to ask the organization's admin to upgrade it.
OrganizationsApi SearchOrganizationContent Get /orgs/{organizationId}/search Search content in an organization
OrganizationsApi SetEntitySchema Put /orgs/{organizationId}/schemas/{entityType} Create or update an entity schema.
OrganizationsApi SetUserAsSSOMemberForOrganization Post /orgs/{organizationId}/members/{userId}/sso Set a user as an SSO member of an organization
OrganizationsApi SetupDirectorySync Post /orgs/{organizationId}/dsync Set up Directory Sync in an organization.
OrganizationsApi StartRecording Post /orgs/{organizationId}/recordings Start a recording
OrganizationsApi StopRecording Post /orgs/{organizationId}/recordings/{recordingId}/stop Stop a recording
OrganizationsApi SyncDirectorySyncGroupsToTeams Post /orgs/{organizationId}/dsync/teams Syncs a list of group/team unique identifiers pairs together.
OrganizationsApi TransferOrganization Post /orgs/{organizationId}/transfer Transfer one organization (source) into another organization (target).
OrganizationsApi UpdateEnvironment Patch /orgs/{organizationId}/environments/{environmentName} Update an existing environment within an organization
OrganizationsApi UpdateMemberInOrganizationById Patch /orgs/{organizationId}/members/{userId} Update specified organization member
OrganizationsApi UpdateMembersInOrganizationTeam Put /orgs/{organizationId}/teams/{teamId}/members Updates members of an organization team
OrganizationsApi UpdateOrganizationCustomField Patch /orgs/{organizationId}/custom-fields/{fieldName} Update a custom field in an organization
OrganizationsApi UpdateOrganizationMemberLastSeenAt Post /orgs/{organizationId}/ping Update organization member's "last seen at" timestamp.
OrganizationsApi UpdateTeamInOrganizationById Patch /orgs/{organizationId}/teams/{teamId} Update specified organization team
OrganizationsApi UpgradeOrganizationPlan Post /orgs/{organizationId}/billing Upgrade an organization's billing plan
OrganizationsApi UpsertSchemaEntities Put /orgs/{organizationId}/schemas/{entityType}/entities Update/Create/Delete entities in a schema.
PermissionsApi ListPermissionsAggregateInCollection Get /collections/{collectionId}/permissions/aggregate List permissions for all users in a collection.
PermissionsApi ListPermissionsAggregateInSpace Get /spaces/{spaceId}/permissions/aggregate List permissions for all users in a space.
PermissionsApi ListSpacesForOrganizationMember Get /orgs/{organizationId}/members/{userId}/spaces List permissions accross all spaces for a member of an organization
SearchApi SearchContent Get /search Search content across spaces that is accessible by the currently authenticated target
SpacesApi CreateChangeRequest Post /spaces/{spaceId}/change-requests Create a new change request for a space.
SpacesApi CreateSpace Post /orgs/{organizationId}/spaces Create an organization space
SpacesApi CreateSpaceRelation Post /spaces/{spaceId}/relations Create a new relation between a source space and a target space
SpacesApi DeleteCommentInChangeRequest Delete /spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId} Delete a comment in a change request.
SpacesApi DeleteCommentInSpace Delete /spaces/{spaceId}/comments/{commentId} Delete a comment in a space.
SpacesApi DeleteCommentReplyInChangeRequest Delete /spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}/replies/{commentReplyId} Delete a comment reply in a change request.
SpacesApi DeleteCommentReplyInSpace Delete /spaces/{spaceId}/comments/{commentId}/replies/{commentReplyId} Delete a comment reply in a space.
SpacesApi DeleteSpaceRelation Delete /spaces/{spaceId}/relations/{targetSpaceId} Delete a relation between spaces
SpacesApi DuplicateSpace Post /spaces/{spaceId}/duplicate Create a duplicate of the space.
SpacesApi ExportToGitRepository Post /spaces/{spaceId}/git/export Export the space content to a Git repository.
SpacesApi GetChangeRequestById Get /spaces/{spaceId}/change-requests/{changeRequestId} Get the change request with the given id.
SpacesApi GetCommentInChangeRequest Get /spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId} Get a comment in a change request.
SpacesApi GetCommentInSpace Get /spaces/{spaceId}/comments/{commentId} Get a comment in a space.
SpacesApi GetCommentReplyInChangeRequest Get /spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}/replies/{commentReplyId} Get a comment reply in a change request.
SpacesApi GetCommentReplyInSpace Get /spaces/{spaceId}/comments/{commentId}/replies/{commentReplyId} Get a comment reply in a space.
SpacesApi GetContentAnalyticsForSpaceById Get /spaces/{spaceId}/insights/content Get content analytics for a given space.
SpacesApi GetContributorsByChangeRequestId Get /spaces/{spaceId}/change-requests/{changeRequestId}/contributors Get all contributors for the change request with the given id.
SpacesApi GetRequestedReviewersByChangeRequestId Get /spaces/{spaceId}/change-requests/{changeRequestId}/requested-reviewers Get all requested reviewers for a change request.
SpacesApi GetReviewsByChangeRequestId Get /spaces/{spaceId}/change-requests/{changeRequestId}/reviews Get all reviews for a change request.
SpacesApi GetSearchAnalyticsForSpaceById Get /spaces/{spaceId}/insights/search Get an overview of the top search queries in a space.
SpacesApi GetSpaceById Get /spaces/{spaceId} Get the details about a space.
SpacesApi GetSpaceCustomFields Get /spaces/{spaceId}/custom-fields Get the values of the custom fields set on a space
SpacesApi GetSpaceGitInfo Get /spaces/{spaceId}/git/info Get metadata about the Git Sync provider currently set up on the space
SpacesApi GetSpacePublishingAuthById Get /spaces/{spaceId}/publishing/auth Get the publishing authentication configuration for a space.
SpacesApi GetSpaceRelation Get /spaces/{spaceId}/relations/{targetSpaceId} Get the relation between 2 spaces.
SpacesApi GetTrafficAnalyticsForSpaceById Get /spaces/{spaceId}/insights/traffic Get traffic page views for a given space
SpacesApi ImportGitRepository Post /spaces/{spaceId}/git/import Import a Git repository
SpacesApi ListChangeRequestsForSpace Get /spaces/{spaceId}/change-requests List change requests for a space.
SpacesApi ListCommentRepliesInChangeRequest Get /spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}/replies List all the replies to a comment in a change request.
SpacesApi ListCommentRepliesInSpace Get /spaces/{spaceId}/comments/{commentId}/replies List all the replies to a comment in a space.
SpacesApi ListCommentsInChangeRequest Get /spaces/{spaceId}/change-requests/{changeRequestId}/comments List all the comments in a change request.
SpacesApi ListCommentsInSpace Get /spaces/{spaceId}/comments List all the comments in a space.
SpacesApi ListPermissionsAggregateInCollection Get /collections/{collectionId}/permissions/aggregate List permissions for all users in a collection.
SpacesApi ListPermissionsAggregateInSpace Get /spaces/{spaceId}/permissions/aggregate List permissions for all users in a space.
SpacesApi ListSpaceRelations Get /spaces/{spaceId}/relations List all relations for a space
SpacesApi ListSpaceRelationsInOrganization Get /orgs/{organizationId}/space-relations List all relations between spaces in an organization
SpacesApi ListSpacesForOrganizationMember Get /orgs/{organizationId}/members/{userId}/spaces List permissions accross all spaces for a member of an organization
SpacesApi MergeChangeRequest Post /spaces/{spaceId}/change-requests/{changeRequestId}/merge Merge a change request in the primary content of a space.
SpacesApi PostCommentInChangeRequest Post /spaces/{spaceId}/change-requests/{changeRequestId}/comments Post a new comment in a change request.
SpacesApi PostCommentInSpace Post /spaces/{spaceId}/comments Post a new comment in a space.
SpacesApi PostCommentReplyInChangeRequest Post /spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}/replies Post a new reply to a comment in a change request.
SpacesApi PostCommentReplyInSpace Post /spaces/{spaceId}/comments/{commentId}/replies Post a new reply to a comment in a space.
SpacesApi RequestReviewersForChangeRequest Post /spaces/{spaceId}/change-requests/{changeRequestId}/requested-reviewers Request reviewers on a change request. Note that requesting a review from teams is not yet supported.
SpacesApi SubmitChangeRequestReview Post /spaces/{spaceId}/change-requests/{changeRequestId}/reviews Submit a review for a change request.
SpacesApi TrackViewInSpaceById Post /spaces/{spaceId}/insights/track_view
SpacesApi UpdateChangeRequest Post /spaces/{spaceId}/change-requests/{changeRequestId}/update Update a change-request with changes from primary content.
SpacesApi UpdateCommentInChangeRequest Put /spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId} Update a comment in a change request.
SpacesApi UpdateCommentInSpace Put /spaces/{spaceId}/comments/{commentId} Update a comment in a space.
SpacesApi UpdateCommentReplyInChangeRequest Put /spaces/{spaceId}/change-requests/{changeRequestId}/comments/{commentId}/replies/{commentReplyId} Update a comment reply in a change request.
SpacesApi UpdateCommentReplyInSpace Put /spaces/{spaceId}/comments/{commentId}/replies/{commentReplyId} Update a comment reply in a space.
SpacesApi UpdateSpaceById Patch /spaces/{spaceId} Update the details of a space
SpacesApi UpdateSpaceCustomFields Patch /spaces/{spaceId}/custom-fields Update the custom fields in a space
SpacesApi UpdateSpacePublishingAuthById Post /spaces/{spaceId}/publishing/auth Update the publishing authentication configuration for a space.
TeamsApi ListTeamsForOrganizationMember Get /orgs/{organizationId}/members/{userId}/teams List all teams an organization member is part of
UrlsApi GetContentByUrl Get /urls/content Resolve a URL to a content (space, collection, page)
UsersApi GetAuthenticatedUser Get /user Get profile of authenticated user
UsersApi GetUserById Get /users/{userId} Get a user by its ID
UsersApi ListSpacesForAuthenticatedUser Get /user/spaces List 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.