{"action":"closed","issue":{"url":"https://api.github.com/repos/CartoDB/cartodb/issues/1742","labels_url":"https://api.github.com/repos/CartoDB/cartodb/issues/1742/labels{/name}","comments_url":"https://api.github.com/repos/CartoDB/cartodb/issues/1742/comments","events_url":"https://api.github.com/repos/CartoDB/cartodb/issues/1742/events","html_url":"https://github.com/CartoDB/cartodb/issues/1742","id":54215722,"number":1742,"title":"In visualizations API, total entries is wrong when shared datasets is requested","user":{"login":"xavijam","id":132146,"avatar_url":"https://avatars.githubusercontent.com/u/132146?v=3","gravatar_id":"","url":"https://api.github.com/users/xavijam","html_url":"https://github.com/xavijam","followers_url":"https://api.github.com/users/xavijam/followers","following_url":"https://api.github.com/users/xavijam/following{/other_user}","gists_url":"https://api.github.com/users/xavijam/gists{/gist_id}","starred_url":"https://api.github.com/users/xavijam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xavijam/subscriptions","organizations_url":"https://api.github.com/users/xavijam/orgs","repos_url":"https://api.github.com/users/xavijam/repos","events_url":"https://api.github.com/users/xavijam/events{/privacy}","received_events_url":"https://api.github.com/users/xavijam/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CartoDB/cartodb/labels/0+-+Backlog","name":"0 - Backlog","color":"CCCCCC"},{"url":"https://api.github.com/repos/CartoDB/cartodb/labels/3+-+Done","name":"3 - Done","color":"CCCCCC"},{"url":"https://api.github.com/repos/CartoDB/cartodb/labels/backend","name":"backend","color":"d4c5f9"},{"url":"https://api.github.com/repos/CartoDB/cartodb/labels/New+dashboard","name":"New dashboard","color":"c7def8"}],"state":"closed","locked":false,"assignee":{"login":"xavijam","id":132146,"avatar_url":"https://avatars.githubusercontent.com/u/132146?v=3","gravatar_id":"","url":"https://api.github.com/users/xavijam","html_url":"https://github.com/xavijam","followers_url":"https://api.github.com/users/xavijam/followers","following_url":"https://api.github.com/users/xavijam/following{/other_user}","gists_url":"https://api.github.com/users/xavijam/gists{/gist_id}","starred_url":"https://api.github.com/users/xavijam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xavijam/subscriptions","organizations_url":"https://api.github.com/users/xavijam/orgs","repos_url":"https://api.github.com/users/xavijam/repos","events_url":"https://api.github.com/users/xavijam/events{/privacy}","received_events_url":"https://api.github.com/users/xavijam/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/CartoDB/cartodb/milestones/30","labels_url":"https://api.github.com/repos/CartoDB/cartodb/milestones/30/labels","id":913526,"number":30,"title":"Matalascañas","description":"- [x] IP Guessing on Import (@rtorre)\r\n- [x] Editor 3.0 - Design (@carlostallon)\r\n- [ ] Kepler integration quick test (@rtorre)\r\n- [ ] Url rewrite (@kartones // @javisantana)\r\n- [ ] Odissey integration in the editor. (@javisantana)\r\n- [ ] Torque Heatmap and fixes (@fdansv)\r\n- [ ] Temp. Maps API specification (@rochoa)\r\n- [ ] New dashboard (@jmedina)\r\n- [ ] Limits per user / plan (@lbosque)\r\n- [ ] Apps pages (@piensaenpixel)","creator":{"login":"saleiva","id":132149,"avatar_url":"https://avatars.githubusercontent.com/u/132149?v=3","gravatar_id":"","url":"https://api.github.com/users/saleiva","html_url":"https://github.com/saleiva","followers_url":"https://api.github.com/users/saleiva/followers","following_url":"https://api.github.com/users/saleiva/following{/other_user}","gists_url":"https://api.github.com/users/saleiva/gists{/gist_id}","starred_url":"https://api.github.com/users/saleiva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saleiva/subscriptions","organizations_url":"https://api.github.com/users/saleiva/orgs","repos_url":"https://api.github.com/users/saleiva/repos","events_url":"https://api.github.com/users/saleiva/events{/privacy}","received_events_url":"https://api.github.com/users/saleiva/received_events","type":"User","site_admin":false},"open_issues":53,"closed_issues":72,"state":"open","created_at":"2014-12-23T17:58:14Z","updated_at":"2015-01-20T09:39:54Z","due_on":"2015-01-21T23:00:00Z","closed_at":null},"comments":10,"created_at":"2015-01-13T16:40:07Z","updated_at":"2015-01-20T09:39:54Z","closed_at":"2015-01-20T09:39:54Z","body":"Basically, when shared datasets/maps is requested in the call, total_entries in the response is wrong and the value is the same than total_shared.\r\n\r\nRequesting normal datasets:\r\n```\r\nhttp://theteam.localhost.lan:3000/u/cartofante/api/v1/viz/?tag_name=&q=&page=1&type=table&exclude_shared=true&per_page=20&tags=&only_shared=false&locked=false&liked=false&order=updated_at\r\n```\r\nResponse:\r\n```\r\n{\r\n   total_entries: 43,\r\n   total_shared: 1,\r\n   ...\r\n}\r\n```\r\n\r\n\r\nRequesting shared datasets:\r\n```\r\nhttp://theteam.localhost.lan:3000/u/cartofante/api/v1/viz/?tag_name=&q=&page=1&type=table&exclude_shared=false&per_page=20&tags=&only_shared=true&locked=false&liked=false&order=updated_at\r\n```\r\nReponse:\r\n```\r\n{\r\n   total_entries: 1,\r\n   total_shared: 1,\r\n   ...\r\n}\r\n```\r\n\r\n![screen shot 2015-01-13 at 17 35 45](https://cloud.githubusercontent.com/assets/132146/5724269/cdab93e0-9b4a-11e4-94b8-dddca9a7f4ed.png)"}}