# Duplicati API running on Windows

**URL:** https://forum.duplicati.com/t/duplicati-api-running-on-windows/9111
**Category:** Developer
**Created:** [February 6, 2020, 5:37pm UTC](https://forum.duplicati.com/t/duplicati-api-running-on-windows/9111 "2020-02-06T17:37:53Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![prusacv](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/p/5fc32e/32.png) [@prusacv](https://forum.duplicati.com/u/prusacv)
#### Post date: [February 6, 2020, 5:37pm UTC](https://forum.duplicati.com/t/duplicati-api-running-on-windows/9111/1 "2020-02-06T17:37:54Z")

</div>

I didn’t find more information about automating Dulicati API running on the Windows platform. Can you provide me a link to the page where I can find more information about Duplicati API?

Is it possible to use PowerShell:

- to create all necessary configuration of FTP/SFTP jobs/configuration (e.g. define all necessary data, home folder, destination server, username/password, etc)?
- get progress status when a job started
- list of files transferred to FTP/SFTP server
- status of transfer (success, failed)

Thanks in advance  
Vlad

---

<div class="post-metadata">

### Author: ![kenkendk](https://forum.duplicati.com/user_avatar/forum.duplicati.com/kenkendk/32/5305_2.png) [@kenkendk](https://forum.duplicati.com/u/kenkendk)
#### Post date: [February 6, 2020, 9:10pm UTC](https://forum.duplicati.com/t/duplicati-api-running-on-windows/9111/2 "2020-02-06T21:10:19Z")

</div>

> [@prusacv](#):
>
> Can you provide me a link to the page where I can find more information about Duplicati API?

I don’t think anyone has documented the API, so you need to dig around a bit.

The API is exposed via these classes:

- [duplicati/Duplicati/Server/WebServer/RESTMethods at master · duplicati/duplicati · GitHub](https://github.com/duplicati/duplicati/tree/master/Duplicati/Server/WebServer/RESTMethods)

The general structure is that `/api/v1/acknowledgements` maps to `/RESTMethods/Acknowledgements.cs`

You then need to look at the `GET`, `POST` etc methods inside, like here:

- [duplicati/Duplicati/Server/WebServer/RESTMethods/Acknowledgements.cs at master · duplicati/duplicati · GitHub](https://github.com/duplicati/duplicati/blob/master/Duplicati/Server/WebServer/RESTMethods/Acknowledgements.cs#L32)

There is an example Python script here that performs the authentication steps and calls the pause/resume commands:

- [duplicati/Tools/Commandline/pause-resume.py at master · duplicati/duplicati · GitHub](https://github.com/duplicati/duplicati/blob/master/Tools/Commandline/pause-resume.py)

To answer each of the task you are looking at:

> [@prusacv](#):
>
> - to create all necessary configuration of FTP/SFTP jobs/configuration (e.g. define all necessary data, home folder, destination server, username/password, etc)?

You can use the import feature, or `POST` a JSON document with the desired setup (try exporting one and have a look at the format).

> [@prusacv](#):
>
> - get progress status when a job started

There are no callback hooks, but you can register a custom script that is called when the backup is started, which can call something else. During the backup you can poll the status (should be `/api/v1/serverstatus`).

> [@prusacv](#):
>
> - list of files transferred to FTP/SFTP server

Source files or target files? The progress will emit some names, but there is not really a good way to get all the source file names (it takes up a lot of space). The remote destination filenames are not reported, but you can get the combined size and number of files.

> [@prusacv](#):
>
> - status of transfer (success, failed)

Yes, I think that is a `GET` to `/api/v1/backup/<id>` and it includes a `parsedresult` code.

---

<div class="post-metadata">

### Author: ![ts678](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@ts678](https://forum.duplicati.com/u/ts678)
#### Post date: [February 6, 2020, 10:08pm UTC](https://forum.duplicati.com/t/duplicati-api-running-on-windows/9111/3 "2020-02-06T22:08:54Z")

</div>

One thing I wonder about is what the term “API” refers to. PowerShell (or a batch file) can also go about [Using Duplicati from the Command Line](https://duplicati.readthedocs.io/en/latest/04-using-duplicati-from-the-command-line/) which is documented. A question is – what schedules backups?

If the automation scripts do it and are able to notify you somehow when backup starts, then you have all that’s requested except for a list of files transferred – but these files are not source files. Is info relevant?

[Scripting options](https://duplicati.readthedocs.io/en/latest/06-advanced-options/#scripting-options)

[Reporting options](https://duplicati.readthedocs.io/en/latest/06-advanced-options/#reporting-options)

[https://github.com/duplicati/duplicati/blob/master/Duplicati/Library/Modules/Builtin/run-script-example.bat](https://github.com/duplicati/duplicati/blob/master/Duplicati/Library/Modules/Builtin/run-script-example.bat)

If the goal is to have Duplicati’s scheduler schedule jobs, then it’s harder because server is independent of command line. [Here](https://forum.duplicati.com/t/question-about-duplicati/9051/8) are some ideas for ways to manage backup jobs done by server, using scripting.

---

<div class="post-metadata">

### Author: ![prusacv](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/p/5fc32e/32.png) [@prusacv](https://forum.duplicati.com/u/prusacv)
#### Post date: [February 7, 2020, 7:10pm UTC](https://forum.duplicati.com/t/duplicati-api-running-on-windows/9111/4 "2020-02-07T19:10:29Z")

</div>

Thank you both for information.
