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
|
For more information about jetapi, run the following command:
jetbackup5api --help
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. |
|
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).
- Click on the ‘Generate Token’ button.
- Enter the token name.
- Choose the privileges you would like to provision for your script(s).
- Make sure to check the ‘Third Party Services Additional Software - JetBackup software-JetBackup’.
- Hit the ‘save’ button.
- 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).
- Click on the “CREATE” Login Key button
- Enter the Key Name.
- Specify a Key Value, or use the random button for a longer value.
- Choose the Commands you would like to provision for your script(s).
- Hit the ‘CREATE’ button.
- 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.
Linux
To create an API Access Token in Linux (Standalone) servers, navigate to JB5 > Settings > Panel:
- Click on the “Create new Access Token”
- Enter description, IP Address, and assign the Account(s) that will be allowed access to the API. Leaving this field empty will allow all users to access using the access token.
- Copy the token generated and store in a safe place.
For more infomration about JetBackup Linux Access Tokens, click here
Plesk
To create an API Key in Plesk, use the secret_key
utility.
- Run the following command and replace the
$IP_ADDRESS
field with your server IP address:plesk bin secret_key -c -ip-address {$IP_ADDRESS}
- You should receive a key in the output:
4897e11f-d053-0f83-1ac0-38b3822cfba8
- Copy the API key and store it in a safe place.
Alternatively, you may create an API key in Plesk by sending a POST request:
- Create an API key. Replace
root:password
with your user credentials and$IP_ADDRESS
with your Plesk server IP address.curl -X POST --user root:password -H "Content-Type: application/json" -H "Accept: application/json" -d'{}' "https://{$IP_ADDRESS}:8443/api/v2/auth/keys"
- This should output the key.
{"key":"4897e11f-d053-0f83-1ac0-38b3822cfba8"}
- Copy the API key and store it in a safe place.
For more information about Plesk API Keys, click here
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.