Client library
GitBook's official Node.js client library.
Last updated
Was this helpful?
GitBook's official Node.js client library.
Last updated
Was this helpful?
Was this helpful?
GitBook provides an official TypeScript/JavaScript client for the HTTP API. This client can be used in a browser or Node.js environment.
You can install the GitBook Node.js library through npm
.
When using the @gitbook/api
module with Node.js < v18, you should pass a custom fetch
function.
You can install one using the node-fetch
module.
The following methods can be found on the client.search
object.
The following methods can be found on the client.user
object.
The following methods can be found on the client.users
object.
The following methods can be found on the client.spaces
object.
The following methods can be found on the client.collections
object.
The following methods can be found on the client.integrations
object.
The following methods can be found on the client.orgs
object.
The following methods can be found on the client.urls
object.
searchContent()
askQuery()
getAuthenticatedUser()
listSpacesForAuthenticatedUser()
getUserById()
getSpaceById()
searchSpaceContent()
askQueryInSpace()
importGitRepository()
exportToGitRepository()
getContentAnalyticsForSpaceById()
getSearchAnalyticsForSpaceById()
getTrafficAnalyticsForSpaceById()
trackViewInSpaceById()
getCurrentRevision()
importContent()
listFiles()
getPageById()
importContentInPageById()
getPageByPath()
createChangeRequest()
mergeChangeRequest()
updateChangeRequest()
getRevisionOfChangeRequestById()
importContentInChangeRequest()
listFilesInChangeRequestById()
getPageInChangeRequestById()
importContentInChangeRequestPageById()
getPageInChangeRequestByPath()
getRevisionById()
listFilesInRevisionById()
getPageInRevisionById()
getPageInRevisionByPath()
listPermissionsAggregateInSpace()
getCollectionById()
listSpacesInCollectionById()
listPermissionsAggregateInCollection()
listIntegrations()
getIntegrationByName()
publishIntegration()
unpublishIntegration()
listIntegrationInstallations()
listIntegrationSpaceInstallations()
renderIntegrationUiWithGet()
renderIntegrationUiWithPost()
updateIntegrationInstallation()
createIntegrationInstallationToken()
updateIntegrationSpaceInstallation()
listOrganizationsForAuthenticatedUser()
listMembersInOrganizationById()
getMemberInOrganizationById()
updateMemberInOrganizationById()
removeMemberFromOrganizationById()
setUserAsSsoMemberForOrganization()
listSpacesForOrganizationMember()
listTeamsInOrganizationById()
createOrganizationTeam()
getTeamInOrganizationById()
updateTeamInOrganizationById()
removeTeamFromOrganizationById()
updateMembersInOrganizationTeam()
listTeamMembersInOrganizationById()
addMemberToOrganizationTeamById()
deleteMemberFromOrganizationTeamById()
inviteUsersToOrganization()
joinOrganizationWithInvite()
upgradeOrganizationPlan()
getOrganizationBillingPortal()
requestOrganizationUpgrade()
transferOrganization()
searchOrganizationContent()
listSpacesInOrganizationById()
listCollectionsInOrganizationById()
setupDirectorySync()
listDirectorySyncGroups()
syncDirectorySyncGroupsToTeams()
getContentByUrl()