{"action":"created","issue":{"url":"https://api.github.com/repos/EOL/tramea/issues/40","labels_url":"https://api.github.com/repos/EOL/tramea/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/EOL/tramea/issues/40/comments","events_url":"https://api.github.com/repos/EOL/tramea/issues/40/events","html_url":"https://github.com/EOL/tramea/issues/40","id":115089697,"number":40,"title":"[5] Allow batch mode in the Pages API","user":{"login":"hyanwong","id":4699014,"avatar_url":"https://avatars.githubusercontent.com/u/4699014?v=3","gravatar_id":"","url":"https://api.github.com/users/hyanwong","html_url":"https://github.com/hyanwong","followers_url":"https://api.github.com/users/hyanwong/followers","following_url":"https://api.github.com/users/hyanwong/following{/other_user}","gists_url":"https://api.github.com/users/hyanwong/gists{/gist_id}","starred_url":"https://api.github.com/users/hyanwong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyanwong/subscriptions","organizations_url":"https://api.github.com/users/hyanwong/orgs","repos_url":"https://api.github.com/users/hyanwong/repos","events_url":"https://api.github.com/users/hyanwong/events{/privacy}","received_events_url":"https://api.github.com/users/hyanwong/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"AmrMMorad","id":9263535,"avatar_url":"https://avatars.githubusercontent.com/u/9263535?v=3","gravatar_id":"","url":"https://api.github.com/users/AmrMMorad","html_url":"https://github.com/AmrMMorad","followers_url":"https://api.github.com/users/AmrMMorad/followers","following_url":"https://api.github.com/users/AmrMMorad/following{/other_user}","gists_url":"https://api.github.com/users/AmrMMorad/gists{/gist_id}","starred_url":"https://api.github.com/users/AmrMMorad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmrMMorad/subscriptions","organizations_url":"https://api.github.com/users/AmrMMorad/orgs","repos_url":"https://api.github.com/users/AmrMMorad/repos","events_url":"https://api.github.com/users/AmrMMorad/events{/privacy}","received_events_url":"https://api.github.com/users/AmrMMorad/received_events","type":"User","site_admin":false},"milestone":null,"comments":10,"created_at":"2015-11-04T16:17:19Z","updated_at":"2015-12-03T11:01:00Z","closed_at":null,"body":"For querying a large number of pages or data objects, it is slow and costly to make multiple API calls. It would be good if the pages and data_objects APIs could take an array of page IDs or data_object IDs and return a list of results. \r\n\r\nTo help with this, it would be sensible to be able to minimise the amount of data returned from a pages or data_object API query. At the moment, both types of query always return an (often large) \"taxonConcepts\" array. It would be sensible to have a parameter to set to true/false which can be used to turn this off, to save bandwidth / EoL effort."},"comment":{"url":"https://api.github.com/repos/EOL/tramea/issues/comments/161599046","html_url":"https://github.com/EOL/tramea/issues/40#issuecomment-161599046","issue_url":"https://api.github.com/repos/EOL/tramea/issues/40","id":161599046,"user":{"login":"hyanwong","id":4699014,"avatar_url":"https://avatars.githubusercontent.com/u/4699014?v=3","gravatar_id":"","url":"https://api.github.com/users/hyanwong","html_url":"https://github.com/hyanwong","followers_url":"https://api.github.com/users/hyanwong/followers","following_url":"https://api.github.com/users/hyanwong/following{/other_user}","gists_url":"https://api.github.com/users/hyanwong/gists{/gist_id}","starred_url":"https://api.github.com/users/hyanwong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyanwong/subscriptions","organizations_url":"https://api.github.com/users/hyanwong/orgs","repos_url":"https://api.github.com/users/hyanwong/repos","events_url":"https://api.github.com/users/hyanwong/events{/privacy}","received_events_url":"https://api.github.com/users/hyanwong/received_events","type":"User","site_admin":false},"created_at":"2015-12-03T11:01:00Z","updated_at":"2015-12-03T11:01:00Z","body":"Also we need a way to pass a number of IDs into the API. At the moment, the ID is hard coded into the url, as in\r\n\r\n    http://eol.org/api/pages/1.0/1045608.json?images=2\r\n\r\nI guess we don't want to encode this in the URL name. E.g.separating with a vertical bar (pipe character, %7C) in the file name looks bad to me:\r\n\r\n    http://eol.org/api/pages/1.0/1045608%7C328023%7C591753.json?images=2\r\n\r\nperhaps we need something like\r\n\r\n    http://eol.org/api/pages/1.0/batch.json?images=2&pageIDs=1045608%7C328023%7C591753\r\n\r\nI use the pipe character (%7C) to separate numbers, as that is what is done in the licenses field. But some other separator could be used, or we could even repeat the parameter:\r\n\r\n    http://eol.org/api/pages/1.0/batch.json?images=2&ID=1045608&ID=328023&ID=591753\r\n"}}