{"action":"created","issue":{"url":"https://api.github.com/repos/json-api/json-api/issues/795","repository_url":"https://api.github.com/repos/json-api/json-api","labels_url":"https://api.github.com/repos/json-api/json-api/issues/795/labels{/name}","comments_url":"https://api.github.com/repos/json-api/json-api/issues/795/comments","events_url":"https://api.github.com/repos/json-api/json-api/issues/795/events","html_url":"https://github.com/json-api/json-api/issues/795","id":91770622,"number":795,"title":"Support for multiple operations in a single request","user":{"login":"tkellen","id":1004324,"avatar_url":"https://avatars.githubusercontent.com/u/1004324?v=3","gravatar_id":"","url":"https://api.github.com/users/tkellen","html_url":"https://github.com/tkellen","followers_url":"https://api.github.com/users/tkellen/followers","following_url":"https://api.github.com/users/tkellen/following{/other_user}","gists_url":"https://api.github.com/users/tkellen/gists{/gist_id}","starred_url":"https://api.github.com/users/tkellen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkellen/subscriptions","organizations_url":"https://api.github.com/users/tkellen/orgs","repos_url":"https://api.github.com/users/tkellen/repos","events_url":"https://api.github.com/users/tkellen/events{/privacy}","received_events_url":"https://api.github.com/users/tkellen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/json-api/json-api/milestones/2","html_url":"https://github.com/json-api/json-api/milestones/JSON-API%201.1-beta","labels_url":"https://api.github.com/repos/json-api/json-api/milestones/2/labels","id":1196038,"number":2,"title":"JSON-API 1.1-beta","description":"1.1-beta launch.","creator":{"login":"tkellen","id":1004324,"avatar_url":"https://avatars.githubusercontent.com/u/1004324?v=3","gravatar_id":"","url":"https://api.github.com/users/tkellen","html_url":"https://github.com/tkellen","followers_url":"https://api.github.com/users/tkellen/followers","following_url":"https://api.github.com/users/tkellen/following{/other_user}","gists_url":"https://api.github.com/users/tkellen/gists{/gist_id}","starred_url":"https://api.github.com/users/tkellen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkellen/subscriptions","organizations_url":"https://api.github.com/users/tkellen/orgs","repos_url":"https://api.github.com/users/tkellen/repos","events_url":"https://api.github.com/users/tkellen/events{/privacy}","received_events_url":"https://api.github.com/users/tkellen/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":0,"state":"open","created_at":"2015-07-07T02:28:26Z","updated_at":"2015-12-29T13:33:57Z","due_on":"2015-09-30T04:00:00Z","closed_at":null},"comments":98,"created_at":"2015-06-29T10:47:02Z","updated_at":"2016-09-09T09:01:56Z","closed_at":null,"body":"It has been widely requested that JSON-API support creating/editing/updating/deleting multiple records in a single request (#202, #205, #753, #536). We have attempted to paint this bikeshed repeatedly over the years. Providing an \"official\" solution, or solutions, to this problem is one of the primary goals for v1.1 of this specification.\r\n\r\nThere are several requirements for a solution:\r\n\r\n* It should allow mixed actions in a single request (e.g. creating + updating).\r\n* It should work for multiple types of resources (e.g. articles + tags) that would otherwise be accessed at different endpoints.\r\n* Every request should be transactional (i.e. all operations should succeed or fail together).\r\n* Additive to the base spec (probably as an extension).\r\n\r\nHere are a couple use-cases that test these requirements:\r\n\r\n* Create two articles, add one existing tag to both, create a new tag and add to both.\r\n* Change the title of an article and update its tags: add one existing tag, create another, and remove another (without replacing the whole tag set).\r\n\r\n**We would like the community to propose ideas for how to solve these use cases (or chime in to support solutions provided in the responses to follow).**\r\n\r\nAssume the following data is present\r\n\r\n```\r\nGET /articles\r\n\r\n{\r\n  \"data\": [{\r\n    \"id\": \"article-1\",\r\n    \"type\": \"articles\",\r\n    \"attributes\": {\r\n      \"title\": \"the first article\",\r\n      \"content\": \"some content for an article\",\r\n    },\r\n    \"relationships\": {\r\n      \"tags\": {\r\n        \"data\": [\r\n          { \"id\": \"tag-1\", \"type\": \"tags\" }\r\n        ]\r\n      }\r\n    }\r\n  }]\r\n}\r\n```\r\n\r\n```\r\nGET /tags\r\n\r\n{\r\n  \"data\": [{\r\n    \"id\": \"tag-1\",\r\n    \"type\": \"tags\"\r\n    \"attributes\": {\r\n      \"name\": \"one\"\r\n    }\r\n  }, {\r\n    \"id\": \"tag-2\",\r\n    \"type\": \"tags\"\r\n    \"attributes\": {\r\n      \"name\": \"two\"\r\n    }\r\n  }]\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/json-api/json-api/issues/comments/245859208","html_url":"https://github.com/json-api/json-api/issues/795#issuecomment-245859208","issue_url":"https://api.github.com/repos/json-api/json-api/issues/795","id":245859208,"user":{"login":"remmeier","id":8008853,"avatar_url":"https://avatars.githubusercontent.com/u/8008853?v=3","gravatar_id":"","url":"https://api.github.com/users/remmeier","html_url":"https://github.com/remmeier","followers_url":"https://api.github.com/users/remmeier/followers","following_url":"https://api.github.com/users/remmeier/following{/other_user}","gists_url":"https://api.github.com/users/remmeier/gists{/gist_id}","starred_url":"https://api.github.com/users/remmeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remmeier/subscriptions","organizations_url":"https://api.github.com/users/remmeier/orgs","repos_url":"https://api.github.com/users/remmeier/repos","events_url":"https://api.github.com/users/remmeier/events{/privacy}","received_events_url":"https://api.github.com/users/remmeier/received_events","type":"User","site_admin":false},"created_at":"2016-09-09T09:01:56Z","updated_at":"2016-09-09T09:01:56Z","body":"like this post vote for A\r\ndislike this post to vote for B\r\n\r\nVoting for a A does not mean B will never be resolved. But they are considered to be separate issues and A comes up a solution on its own."}}
{"actor":{"display_login":"remmeier"}}