Last modified October 31, 2024

Common

JetBackup API Parameters

jetbackup5api backup -F listBackups -D "type=127" -O json
Part Description
Function
The JetBackup API function.
-F/--func FUNCTION_NAME
Data
The parameters you want to pass to the API call.
-D/--data "PARAM_NAME=PARAM_VALUE&...&PARAM_NAME=PARAM_VALUE"
Output format
The output format you want the API call to be returned as.
-O/--output json/plain

List Parameters

These are the available parameters you can pass to all the list API calls.

Parameter name Value Description Possible values Example
limit Integer Limit the specified number of records returned.   10
skip Integer Skip the specified number of records returned.   2
sort[] List The value you want to sort by.
  • 1 : ascending order
  • -1 : descending order
sort[type]=1

How To Retrieve API Keys/Tokens

cPanel

To create an API token in cPanel, use WHM’s Manage API Tokens interface (WHM > Home > Development > Manage API Tokens).

  1. Click on the ‘Generate Token’ button.
  2. Enter the token name.
  3. Choose the privileges you would like to provision for your script(s).
  4. Make sure to check the ‘Third Party Services Additional Software - JetBackup software-JetBackup’.
  5. Hit the ‘save’ button.
  6. Copy the token generated and store in a safe place.

For more information about cPanel API tokens, click here.

DirectAdmin

To create an API Login Key in DirectAdmin, use WCP’s Login Keys interface (WCP > User Level > Login Keys).

  1. Click on the “CREATE” Login Key button
  2. Enter the Key Name.
  3. Specify a Key Value, or use the random button for a longer value.
  4. Choose the Commands you would like to provision for your script(s).
  5. Hit the ‘CREATE’ button.
  6. Copy the key generated and store in a safe place.

For more information about DirectAdmin API Login Keys, click here.

Once your key/token is generated, include that API key/token in your custom code.