Using the JetBackup 5 API with Ansible: manageBackupJob Errors and Fixes
If you're automating JetBackup 5 configuration via Ansible and find that your manageBackupJob API call completes without errors, but the backup job never actually appears in the JetBackup interface. There are two common culprits worth checking before digging any deeper. We've pulled together the most frequent issues and how to fix them below.
Why isn't my backup job being created even though the API call succeeds?
The JetBackup API will return success: 0 If the call fails, verify that you're checking the field in the API response, not just the Ansible task exit code. A task can be marked as ok from Ansible's perspective while the API itself silently rejects the request.
Check your JetBackup logs at:
/usr/local/jetapps/var/log/jetbackup5/
You'll see the raw API call that was submitted, which makes it easy to spot the exact parameters that were sent. The API log does not show the response success/failure, but you can reuse the same parameters in a manual API call to verify the response.
The two most common issues
1. Invalid time value must be a multiple of 5
The time parameter in manageBackupJob represents the scheduled backup time in HHMM format, and it must be a multiple of 5 to be valid. For example:
- 125 = 1:25 AM ✅
- 128 = invalid ❌
If a non-multiple-of-5 value is passed, the API will return: message: Invalid time provided. (Valid value is between 0 to 2355 in multiple of 5)
The fix is straightforward — update the time value in your Ansible variable to the nearest valid multiple of 5.
2. Incorrect filters array syntax
The filters parameter expects an Array of Arrays, not a flat array of IDs. Passing a single-level array like filters[0]=<id> will result in: message: Invalid data provided for field 'filters', Valid data types: Array of Array
The correct syntax is filters[0][0]=<id>, where the outer index is the filter group and the inner index is the filter within that group.
Additionally, the ID passed must be the filter group ID (group_id), not the filter's _id. To obtain the correct value:
- When a filter is created using
manageAccountFilter, a Filter Group will already exist by default. - You can find the Filter Group ID using
listAccountFilterGroupsas a shortcut, or by runninglistAccountFiltersand using thegroup_idfield from the results, both will return the same ID.
- If using
listAccountFilters, you can use thegroup_idvalue when assigning the filter tomanageBackupJob. - Do not use the
_idreturned bylistAccountFilters, that is a different identifier and will not work withmanageBackupJob.
listAccountFilterGroups documentation: https://docs.jetbackup.com/v5.3/api/AccountFilters/listAccountFilterGroups.html
What does a working manageBackupJob call look like?
A valid API call with both filters and time correctly formatted looks like this:
jetbackup5api -F manageBackupJob -D "action=create&name=Daily&type=1& \ destination[0]=<destination_id>&time=125&filters[0][0]=<filter_group_id>& \ schedules[0][_id]=<schedule_id>&schedules[0][retain]=12"
When the parameters are correct, you should see: success: 1 message: Backup Job Created Successfully
Quick Reference
| Parameter | Requirement |
|---|---|
| time | Must be between 0–2355 and a multiple of 5 |
| filters | Must be an Array of Arrays: filters[0][0]=<id> |
| Filter ID source | Use _id from listAccountFilterGroups, not listAccountFilters |
For full manageBackupJob documentation, visit: https://docs.jetbackup.com/v5.3/api/BackupJobs/manageBackupJob.html
If you have any questions that aren't addressed above, please don't hesitate to reach out to our 24/7 Support team for assistance.

