Merge pull request #793 from gpodder/remove-advertise
[mygpo.git] / doc / api / reference / sync.rst
blob9e9abc4fbe45a49fdc1fe9fb5aab266c805c03c8
1 Device Synchronization API
2 ==========================
4 Get Sync Status
5 ---------------
7 ..  http:get:: /api/2/sync-devices/(username).json
8     :synopsis: get the sync status of a user
10     * requires authentication
11     * since 2.10
13     **Example response**:
15     .. sourcecode:: http
17         {
18           "synchronized": [
19                ["notebook", "n900"],
20                ["pc-home", "pc-work"],
21             ],
22           "not-synchronized": [
23                "test-pc", "netbook"
24             ]
25         }
27     :param username: username for which the sync status is requested
30 Start / Stop Sync
31 -----------------
33 ..  http:post:: /api/2/sync-devices/(username).json
34     :synopsis: update the sync status of a user's devices
36     * requires authentication
37     * since 2.10
39     **Example request**:
41     .. sourcecode:: http
43         {
44           "synchronize": [
45                ["notebook", "netbook"]
46              ],
47           "stop-synchronize": ["pc-work"]
48         }
50     Sets up / stops synchronization between devices. The synchronization status
51     is sent as a response
53     **Example status**:
55     .. sourcecode:: http
57         {
58           "synchronized": [
59                ["notebook", "netbook", "n900"]
60            ],
61           "not-synchronized": [
62                "test-pc", "pc-work", "pc-home"
63            ]
64         }
66     :param username: username for which the sync status is requested