{"action":"created","issue":{"url":"https://api.github.com/repos/cozy/cozy-proxy/issues/94","labels_url":"https://api.github.com/repos/cozy/cozy-proxy/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/cozy/cozy-proxy/issues/94/comments","events_url":"https://api.github.com/repos/cozy/cozy-proxy/issues/94/events","html_url":"https://github.com/cozy/cozy-proxy/issues/94","id":57294219,"number":94,"title":"Add a replication route","user":{"login":"Gara64","id":7010087,"avatar_url":"https://avatars.githubusercontent.com/u/7010087?v=3","gravatar_id":"","url":"https://api.github.com/users/Gara64","html_url":"https://github.com/Gara64","followers_url":"https://api.github.com/users/Gara64/followers","following_url":"https://api.github.com/users/Gara64/following{/other_user}","gists_url":"https://api.github.com/users/Gara64/gists{/gist_id}","starred_url":"https://api.github.com/users/Gara64/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gara64/subscriptions","organizations_url":"https://api.github.com/users/Gara64/orgs","repos_url":"https://api.github.com/users/Gara64/repos","events_url":"https://api.github.com/users/Gara64/events{/privacy}","received_events_url":"https://api.github.com/users/Gara64/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-11T09:42:45Z","updated_at":"2015-02-11T10:28:23Z","closed_at":null,"body":"For now it is not possible for an app to request its proxy for a replication with a remote target. \r\nExternal clients like cozy-desktop or cozy-mobile can request a replication on a local database, e.g. PouchDB and establish the sync with cozy through the device interface. But a cozy app cannot access the CouchDB replication.\r\nAdding a replication route would enable at least 2 things : \r\n_ the possibility for an app to share data with a remote cozy \r\n_ the possibility to create backup apps\r\n\r\nThe proxy should check that the request is correctly authenticated before routing the request to CouchDB. The remote authentication on the other hand is probably an other issue (User/Sharer doctype with specific rights?)."},"comment":{"url":"https://api.github.com/repos/cozy/cozy-proxy/issues/comments/73860529","html_url":"https://github.com/cozy/cozy-proxy/issues/94#issuecomment-73860529","issue_url":"https://api.github.com/repos/cozy/cozy-proxy/issues/94","id":73860529,"user":{"login":"aenario","id":1580287,"avatar_url":"https://avatars.githubusercontent.com/u/1580287?v=3","gravatar_id":"","url":"https://api.github.com/users/aenario","html_url":"https://github.com/aenario","followers_url":"https://api.github.com/users/aenario/followers","following_url":"https://api.github.com/users/aenario/following{/other_user}","gists_url":"https://api.github.com/users/aenario/gists{/gist_id}","starred_url":"https://api.github.com/users/aenario/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aenario/subscriptions","organizations_url":"https://api.github.com/users/aenario/orgs","repos_url":"https://api.github.com/users/aenario/repos","events_url":"https://api.github.com/users/aenario/events{/privacy}","received_events_url":"https://api.github.com/users/aenario/received_events","type":"User","site_admin":false},"created_at":"2015-02-11T10:28:23Z","updated_at":"2015-02-11T10:28:23Z","body":"@frankrousseau this is already possible through the device API and wont be possible using this approach.\r\n\r\nTo put it simply, it is already possible to replicate to & from the cozy's couchdb if the replication is managed from the outside (see cozy-mobile & cozy-desktop) \r\nWhat is not possible is to POST localhost:5984/_replication to ask the cozy's couchdb to initiate and manage a replication\r\n\r\nSo from my point of view, it would make more sense for this to be an API of the DS rather than the proxy. So a cozy **app** could say : \"OK cozy, do a replication to/from this remote\" (where the remote could be another cozy). Of course @Gara64 , this depends of the architecture of the solution (ie. is there an app in the cozy ?)."}}