ClickHelp User Manual

[API] Export Publication

Exports a publication to the specified format, optionally uploading the file to an FTP of choice. The response returns a task key which can be used to track task progress via API.

POST projects/{publication-id}?action=export

Authentication

This request requires basic authentication.

Request Parameters

Path params
publication-id string
The ID of the publication to export.
Query params
action
string
Action to perform. Only export is supported.
Body params
format string

One of the allowed case-sensitive export formats, which are:

  • WebHelp
  • Chm
  • Pdf
  • Doc
  • Docx
  • Rtf
  • Epub
  • Mht
  • Odt
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/. Example:

Storage/export-files/deep-space-1.0-docs.zip

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. For example:

downloads/deep-space-1.0-docs.zip

exportPresetName


string

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

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

[optional] The FTP hostname of your FTP server, like ftp.hedronlabs.org.

    userName
string
[optional] The FTP user name.
    password
string
[optional] The FTP user password.
    isUsePassiveMode
bool
[optional] Whether or not to use passive mode for the FTP connection. Try setting it to true if you face FTP errors, specifically, the 425 Can't open data connection error.
    port
int
[optional] The FTP server port to which the connection is established. The default FTP port is used if the value is null or not specified.

Samples

Request sample
Bash (Unix Shell)
curl --location -g --request POST 'https://{portal-url}/api/v1/projects/space-program-pub?action=export' ^
--header 'Content-Type: application/json' ^
--data-raw '{
"format":"Pdf",
"outputFileName":"Storage/space-program.pdf",
"exportPresetName":"Default",
"ftpInfo":{
"hostName": "ftp.example.com",
"userName": "admin",
"password": "p@ssw0rd",
"isUsePassiveMode": true,
"port": null
}
}'
Response body sample
JSON
{
"taskKey": "85413f07c1644b12add45da9df56ec8b"
}

Response fields

taskKey
The task key of the export process.