Perform action with project or publication

Perform action with project or publication

Performs an action on the project or publication (export, download, publish, or import).

  • action=publish: Creates a new online publication. Required request body fields: pubId, pubName.
  • action=publish: Updates an existing online publication. Required request body fields: updatedPubId, pubName, updateMode.
  • action=import: Imports new content into an existing project. Requires the format query parameter. For format=base64 required request body fields: importFormat, options, inputFileContent, inputFileName. For format=url required request body fields: importFormat, options, inputFileUrl.
  • action=export: Exports a project or publication to one of the supported formats. Required request body fields: format, outputFileName.
  • action=download: Creates a backup of a project in the specified location in your portal Storage with the specified file name. Required request body fields: outputFileName.
Path Parameters
  • id
    string
    required

    The ID of the project or publication.

Query Parameters
  • action
    string enum
    required

    Action to perform: export, download, publish, or import.

    • export
    • download
    • publish
    • import
  • format
    string enum

    Specifies how the import data is provided. Required when action=import. Can be url or base64.

    • url
    • base64
Body
application/json

A combined request body containing all possible parameters for project and publication actions. Fields are used depending on the specific operation (e.g., 'projectName' for creating, 'outputFileName' for backups).

projectName
string

The name of the new project. Required when action=create.

projectId
string

The ID (URL slug) of the new project. If not specified, it will be generated from the project name. Used when action=create.

sourceType
string enum

The source type for creating the project: Empty (default), Template, or Copy. Used when action=create.

  • Empty
  • Template
  • Copy
sourceProjectId
string

The ID of an existing project to use as a source. Required when sourceType is Template (use 'minimalist-template', 'api-documentation-template', 'coffee-break-template', 'colorize-template', 'mountain-peak-template' or 'stardust-template') or Copy (use your existing project ID). Used when action=create.

languageFourLetterCode
string

The four-letter language code for the new project (e.g., 'en-US'). If not specified, the portal's default language will be used. Used when action=create.

pubId
string

The ID of the publication to create.

pubName
string

The name of the publication to create.

isPublishOnlyReadyTopics
boolean

Whether to publish only topics in the Ready status.

outputTags
array string[]

An array of strings containing Output Tags to use.

pubVisibility
string enum

The target publication visibility. Specify Public, Restricted or Private.

  • Public
  • Restricted
  • Private
publishedTocNodeIds
array string[]

An array of strings containing IDs of the TOC nodes to publish. If not specified, the entire project is published.

updatedPubId
string

The ID of the publication to update.

updateMode
string enum

Defines which update mode to choose for the update. Specify FullReplace or Partial.

  • FullReplace
  • Partial
isReplacePubStyles
boolean

Specifies whether to update CSS style files.

isReplacePubScripts
boolean

Specifies whether to update JavaScript files.

format
string enum

One of the allowed case-sensitive export formats.

  • WebHelp
  • PureHtml
  • Markdown
  • Chm
  • Pdf
outputFileName
string

The full name of the output file. If the output file is written in ClickHelp File Storage (default), this should be a full file name, including the file path that starts with Storage/. If the output is written to an FTP server, this should be an FTP file name relative to the FTP directory in which the file is written.

ExampleStorage/export-files/deep-space-1.0-docs.zip
exportPresetName
string

For printed formats only. The full name of the Export Preset to be used.

ftpInfo
object

An object specifying FTP server connection settings. If the value is null, the output file will be written to your ClickHelp portal File Storage.

importFormat
string enum

Import format.

  • Word
  • Rtf
  • Epub
  • Odt
  • Html
  • Markdown
  • ProjectBackup
  • Docfx
  • AutoDocs
inputFileContent
string

Base64-encoded content of the file to import. Required if base64 is selected for the format query parameter. If url format is selected, this parameter is ignored.

inputFileName
string

The name of the file with an extension. Required if base64 is selected for the format query parameter. If url format is selected, this parameter is ignored.

inputFileUrl
string

The URL of the file. It can be a public URL (no authentication required) or a path to a file in ClickHelp Storage. Required if url is selected for the format query parameter. If base64 format is selected, this parameter is ignored.

site
string

The domain of the site to assign a publication to.

Examplehedron-partners.clickhelp.com
options
object

Additional import parameters.

newProjectId
string

The ID of a new project where to import a definition. Either newProjectId or newProjectName should be specified.

newProjectName
string

The name of a new project where to import a definition. Either newProjectId or newProjectName should be specified.

newProjectLanguageFourLetterCode
string

An ISO 639 four-letter language code of a new project where to import a definition. If not specified, the en-US code is used.

Responses
POST/projects/{id}

{
  "taskKey": "f8de60eb4ad8757c5a2b533afae6251aa"
}