Using the REST API, you can retrieve a company backup as follows:
GET /c/db_nazev/backup
if you include the
Acceptheader, it must have the value application/x-winstrom-backup (or application/octet-stream).
You can also restore a company from a backup using the REST API:
PUT /c/db_nazev/restore?name=Firma
the
nameparameter is optional,the request body must contain the company backup,
if you include the
Content-Typeheader, it must have the value application/x-winstrom-backup (or application/octet-stream).
Warning: the company being restored must not already exist — it will be created during the restore process. If the company already exists, the server will return the result Company 'restored_company' already exists. If you use a disallowed character in the company identifier, you will be redirected to a URL with a valid identifier.
When restoring from a backup, it is also possible to mark the company as a test company and disable features that are not desirable during testing.
Restoring a test company
To restore a company as a test company, you need to add the forTesting=1 parameter to the URL (e.g. PUT /c/db_nazev/restore?name=Firma&forTesting=1).
In this mode, you can additionally specify which features should be disabled. By default (if not specified), the parameters have the value 1, which causes the corresponding feature to be disabled. If a feature should not be disabled, specify the parameter with the value 0.
Features that can be disabled:
| Disables sending messages to EET. In all validity periods of the company settings, the Communication mode property (on the Automatic operations — EET tab) will be changed to the value |
| Disables automatic email sending. In all validity periods of the company settings, the Automatically send documents by email property (on the Other tab) will be changed to the value |
| Unregisters all Web Hooks that are registered in the company. |
| Optional parameter — do not restore the change history |
| Optional parameter — do not restore the Changes API history |
The URL might then look like, for example, /c/db_nazev/restore?name=Firma&forTesting=1&disableAutoSendMail=0&skipZurnal
