Archbee Public API CLI
44 min
a command line interface for the archbee public api manage documents, spaces, openapi references, and more directly from your terminal installation download the pre built binary for your operating system and architecture macos apple silicon (m1/m2/m3/m4) curl l o archbee api cli https //downloads archbee com/cli/latest/archbee api cli macos arm64 chmod +x archbee api cli sudo mv archbee api cli /usr/local/bin/ intel curl l o archbee api cli https //downloads archbee com/cli/latest/archbee api cli macos x64 chmod +x archbee api cli sudo mv archbee api cli /usr/local/bin/ linux x64 curl l o archbee api cli https //downloads archbee com/cli/latest/archbee api cli linux x64 chmod +x archbee api cli sudo mv archbee api cli /usr/local/bin/ arm64 curl l o archbee api cli https //downloads archbee com/cli/latest/archbee api cli linux arm64 chmod +x archbee api cli sudo mv archbee api cli /usr/local/bin/ windows x64 download archbee api cli windows x64 exe https //downloads archbee com/cli/latest/archbee api cli windows x64 exe and add it to your path or via powershell invoke webrequest uri "https //downloads archbee com/cli/latest/archbee api cli windows x64 exe" outfile "archbee api cli exe" verify installation archbee api cli help authentication every command requires doc space id and api key these can be found in your archbee workspace under settings > api keys the cli builds a bearer token automatically using base64(docspaceid apikey) archbee api cli \<command> doc space id \<your space id> api key \<your api key> \[options] commands documents get doc retrieve a document in markdown, html, json, or source format archbee api cli get doc \\ \ doc space id \<id> \\ \ api key \<key> \\ \ doc id \<id> \\ \ format markdown option required description doc id \<id> yes document id format \<fmt> no output format markdown , html , json , source default markdown create doc create a new document or update an existing one if doc id is provided, the document is updated \# create a new document from inline content archbee api cli create doc \\ \ doc space id \<id> \\ \ api key \<key> \\ \ title "getting started" \\ \ content "# welcome\nthis is a new document " \# update an existing document from a file archbee api cli create doc \\ \ doc space id \<id> \\ \ api key \<key> \\ \ doc id \<existing id> \\ \ file /readme md option required description content \<text> yes markdown or json content file \<path> yes read content from a file instead of content format \<fmt> no content format markdown , json default markdown doc id \<id> no existing document id to update parent doc id \<id> no parent document id empty string moves to root title \<text> no document title description \<text> no document description slug \<text> no url slug alias \<text> no url alias preview img url \<url> no preview image url conditional rule id \<id> no conditional rule id sorting \<type> no insertion order alphabetical , chronological hidden no mark document as hidden either content or file is required delete doc permanently delete a document archbee api cli delete doc \\ \ doc space id \<id> \\ \ api key \<key> \\ \ doc id \<id> option required description doc id \<id> yes document id to delete search docs search documents in a space supports word based search, ai chat, and ai retrieval \# word based search archbee api cli search docs \\ \ doc space id \<id> \\ \ api key \<key> \\ \ query "authentication" \# ai powered search archbee api cli search docs \\ \ doc space id \<id> \\ \ api key \<key> \\ \ query "how do i set up sso?" \\ \ type ai chat \# list all documents (empty query) archbee api cli search docs \\ \ doc space id \<id> \\ \ api key \<key> \\ \ query "" option required description query \<text> yes search query empty string returns all documents type \<type> no search type words , ai chat , ai retrieval default words doc id \<id> no return only this document parent doc id \<id> no return only children of this doc use "null" for root search only title no search only by title data text format \<fmt> no return datatext as markdown , html persist search no keep a searchsession in the database search session id \<id> no existing searchsession id to continue import content import a markdown file or a zip archive of markdown files as new documents \# single markdown file archbee api cli import content \\ \ doc space id \<id> \\ \ api key \<key> \\ \ file /guide md \# zip archive (preserves folder structure) archbee api cli import content \\ \ doc space id \<id> \\ \ api key \<key> \\ \ file /docs zip option required description file \<path> yes path to md file or zip archive spaces create space create a new space the new space inherits the api key archbee api cli create space \\ \ doc space id \<id> \\ \ api key \<key> \\ \ name "api documentation" \\ \ enable llm option required description name \<text> no space name enable llm no enable ai features enable review system no enable review system doc space group id \<id> no space group id to add this space to update space update space settings including access control, custom hostname, and space links \# set password protection archbee api cli update space \\ \ doc space id \<id> \\ \ api key \<key> \\ \ protection type password \\ \ password "s3cret" \# set custom hostname archbee api cli update space \\ \ doc space id \<id> \\ \ api key \<key> \\ \ hostname docs example com \# configure jwt authentication archbee api cli update space \\ \ doc space id \<id> \\ \ api key \<key> \\ \ protection type jwt \\ \ jwt validation type jwt secret \\ \ jwt secret "my secret" \\ \ jwt redirect url "https //example com/auth" option required description protection type \<type> no access type none , password , guest accounts , private accounts , private link , magic link , jwt , saml password \<text> no password (when protection type is password ) hostname \<domain> no custom hostname hostname path \<path> no path component for hostname jwt validation type \<type> no jwt validation jwt secret , jwt keyset jwt secret \<text> no jwt secret jwt key url \<url> no jwt key url jwt redirect url \<url> no jwt redirect url saml metadata \<xml> no saml metadata xml conditional rule id \<id> no conditional rule id space links \<json> no json array of space links publish space publish documents from a space \# publish to production archbee api cli publish space \\ \ doc space id \<id> \\ \ api key \<key> \\ \ environment published \# publish to preview archbee api cli publish space \\ \ doc space id \<id> \\ \ api key \<key> \\ \ environment preview option required description environment \<env> yes preview or published clone space clone a space into a target space group archbee api cli clone space \\ \ doc space id \<id> \\ \ api key \<key> \\ \ target space group id \<id> option required description target space group id \<id> no target space group id openapi sync openapi sync an openapi or postman document with a new or existing api reference tree \# import a new openapi spec archbee api cli sync openapi \\ \ doc space id \<id> \\ \ api key \<key> \\ \ file /openapi json \# update an existing api reference tree archbee api cli sync openapi \\ \ doc space id \<id> \\ \ api key \<key> \\ \ file /openapi yml \\ \ doc tree id \<existing tree id> \# import with code examples archbee api cli sync openapi \\ \ doc space id \<id> \\ \ api key \<key> \\ \ file /openapi json \\ \ language examples "python,javascript,curl" \\ \ create schema category \\ \ create intro option required description file \<path> yes path to json , yml , yaml , or zip file doc tree id \<id> no existing doctree id to update type \<type> no import type openapi , postman default openapi try it no enable api try it feature default true show download no show download link for the openapi file create schema category no create a models category create intro no create an intro document language examples \<langs> no comma separated language examples (max 5) info openapi get info of an existing openapi tree archbee api cli info openapi \\ \ doc space id \<id> \\ \ api key \<key> \\ \ doc tree id \<id> option required description doc tree id \<id> yes doctree id to get info for upload upload upload a single file to the file manager archbee api cli upload \\ \ doc space id \<id> \\ \ api key \<key> \\ \ file /diagram png option required description file \<path> yes path to file to upload public no make the file publicly accessible default true no public no make the file private suggestions merge suggestion merge a suggestion document into the base document archbee api cli merge suggestion \\ \ doc space id \<id> \\ \ api key \<key> \\ \ doc id suggest abc123def456 option required description doc id \<id> yes suggestion document id must start with suggest discard suggestion discard and delete a suggestion document without merging archbee api cli discard suggestion \\ \ doc space id \<id> \\ \ api key \<key> \\ \ doc id suggest abc123def456 option required description doc id \<id> yes suggestion document id must start with suggest organization export export team documentation as a signed s3 url \# export entire team archbee api cli export \\ \ doc space id \<id> \\ \ api key \<key> \\ \ team id \<id> \# export only the current space archbee api cli export \\ \ doc space id \<id> \\ \ api key \<key> \\ \ team id \<id> \\ \ export this space only option required description team id \<id> yes team id export this space only no export only this space default false no export as link no return raw data instead of a link display rules list display rules for an organization archbee api cli display rules \\ \ doc space id \<id> \\ \ api key \<key> \\ \ team id \<id> option required description team id \<id> yes team id ci/cd usage the cli works great in ci pipelines here are some common workflows sync openapi docs on deploy \# github actions \ name update api docs run | archbee api cli sync openapi \\ \ doc space id ${{ secrets archbee space id }} \\ \ api key ${{ secrets archbee api key }} \\ \ file /openapi json \\ \ doc tree id ${{ secrets archbee doc tree id }} publish docs after content update \ name publish docs run | archbee api cli publish space \\ \ doc space id ${{ secrets archbee space id }} \\ \ api key ${{ secrets archbee api key }} \\ \ environment published import markdown docs from repo \ name import docs run | archbee api cli import content \\ \ doc space id ${{ secrets archbee space id }} \\ \ api key ${{ secrets archbee api key }} \\ \ file /docs zip output all commands output json to stdout on success errors are printed to stderr this makes it easy to pipe output to other tools \# get a document and pipe to jq archbee api cli get doc \\ \ doc space id \<id> \\ \ api key \<key> \\ \ doc id \<id> | jq ' content' \# search and save results to a file archbee api cli search docs \\ \ doc space id \<id> \\ \ api key \<key> \\ \ query "api" > results json getting help run any command with help to see available options archbee api cli help archbee api cli create doc help archbee api cli sync openapi help