{"action":"created","issue":{"url":"https://api.github.com/repos/MISP/MISP/issues/387","labels_url":"https://api.github.com/repos/MISP/MISP/issues/387/labels{/name}","comments_url":"https://api.github.com/repos/MISP/MISP/issues/387/comments","events_url":"https://api.github.com/repos/MISP/MISP/issues/387/events","html_url":"https://github.com/MISP/MISP/issues/387","id":56691854,"number":387,"title":"Bug with Download as... JSON format","user":{"login":"elhoim","id":178521,"avatar_url":"https://avatars.githubusercontent.com/u/178521?v=3","gravatar_id":"","url":"https://api.github.com/users/elhoim","html_url":"https://github.com/elhoim","followers_url":"https://api.github.com/users/elhoim/followers","following_url":"https://api.github.com/users/elhoim/following{/other_user}","gists_url":"https://api.github.com/users/elhoim/gists{/gist_id}","starred_url":"https://api.github.com/users/elhoim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elhoim/subscriptions","organizations_url":"https://api.github.com/users/elhoim/orgs","repos_url":"https://api.github.com/users/elhoim/repos","events_url":"https://api.github.com/users/elhoim/events{/privacy}","received_events_url":"https://api.github.com/users/elhoim/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-05T16:20:33Z","updated_at":"2015-02-24T10:38:43Z","closed_at":"2015-02-05T16:27:04Z","body":"When using the Download as... option, and choosing the JSON format, I end up on an URL like:\r\nhttps://[REDACTED]/events/view/870json\r\nwhere no data in json is presented. My guess is that it is probably a problem when generating the URL to link to JSON."},"comment":{"url":"https://api.github.com/repos/MISP/MISP/issues/comments/75733953","html_url":"https://github.com/MISP/MISP/issues/387#issuecomment-75733953","issue_url":"https://api.github.com/repos/MISP/MISP/issues/387","id":75733953,"user":{"login":"iglocska","id":3668672,"avatar_url":"https://avatars.githubusercontent.com/u/3668672?v=3","gravatar_id":"","url":"https://api.github.com/users/iglocska","html_url":"https://github.com/iglocska","followers_url":"https://api.github.com/users/iglocska/followers","following_url":"https://api.github.com/users/iglocska/following{/other_user}","gists_url":"https://api.github.com/users/iglocska/gists{/gist_id}","starred_url":"https://api.github.com/users/iglocska/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iglocska/subscriptions","organizations_url":"https://api.github.com/users/iglocska/orgs","repos_url":"https://api.github.com/users/iglocska/repos","events_url":"https://api.github.com/users/iglocska/events{/privacy}","received_events_url":"https://api.github.com/users/iglocska/received_events","type":"User","site_admin":false},"created_at":"2015-02-24T10:38:43Z","updated_at":"2015-02-24T10:38:43Z","body":"Yeah indeed that is really clunky right now and it's a pretty easy fix to\nhave a similar json api. Right now the XML API simply accepts a JSON or an\nXML object as filter parameters and always returns an XML (which isn't very\nhandy). I'll add a JSON equivalent.\n\nOn Tue, Feb 24, 2015 at 11:24 AM, AaronK <notifications@github.com> wrote:\n\n> When following the documentation and extrapolating the XML example to JSON\n> you end up with a URL:\n>\n> curl -H \"Authorization: XXXXX(redacted)XXXX\" -H \"Accept: application/json\"\n> --insecure https://[redacted]/events/json/download/868.json\" or a\n> variation of these. But this URL does not work. It works for XML (replace\n> json by xml in the example above!) but not with json.\n> So, this is not very consistent in the documentation.\n>\n> My recommendation is to fix this in the documentation and show an example\n> on how to use the JSON RESTful API. Or... (even better) make the XML and\n> json API symmetrical.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/MISP/MISP/issues/387#issuecomment-75731998>.\n>\n"}}