{"action":"created","issue":{"url":"https://api.github.com/repos/frictionlessdata/dpr-api/issues/4","repository_url":"https://api.github.com/repos/frictionlessdata/dpr-api","labels_url":"https://api.github.com/repos/frictionlessdata/dpr-api/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/frictionlessdata/dpr-api/issues/4/comments","events_url":"https://api.github.com/repos/frictionlessdata/dpr-api/issues/4/events","html_url":"https://github.com/frictionlessdata/dpr-api/issues/4","id":185180643,"number":4,"title":"[publish] Create new data package from metadata","user":{"login":"rgrp","id":180658,"avatar_url":"https://avatars.githubusercontent.com/u/180658?v=3","gravatar_id":"","url":"https://api.github.com/users/rgrp","html_url":"https://github.com/rgrp","followers_url":"https://api.github.com/users/rgrp/followers","following_url":"https://api.github.com/users/rgrp/following{/other_user}","gists_url":"https://api.github.com/users/rgrp/gists{/gist_id}","starred_url":"https://api.github.com/users/rgrp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgrp/subscriptions","organizations_url":"https://api.github.com/users/rgrp/orgs","repos_url":"https://api.github.com/users/rgrp/repos","events_url":"https://api.github.com/users/rgrp/events{/privacy}","received_events_url":"https://api.github.com/users/rgrp/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-10-25T17:20:39Z","updated_at":"2016-11-11T12:18:04Z","closed_at":"2016-11-09T15:55:00Z","body":"`POST /api/package/{publisher}/{package}`\r\n\r\nCreate / update data package with new metadata\r\n\r\nParameters:\r\n- Data Package metadata (`datapackage.json`) \r\n- Auth info\r\n\r\nReturns:\r\n\r\n```\r\nSUCCESS\r\n\r\n{\r\n   \"message\": \"Data Package created\"\r\n   \"url\": \"url to data package\" [really needed as user get this through api]???\r\n}\r\n\r\nFAILURE: (http code ...)\r\n\r\n{\r\n  \"message\": \"Invalid data package\"\r\n}, 400\r\n{\r\n  \"message\": \"Not authorized to publish\"\r\n}, 401\r\n{\r\n  \"message\": \"Failed to store data package\"\r\n}, 500\r\n```\r\n\r\nTasks\r\n- [x] Test for all of this\r\n- [x] Auth: check token\r\n- [x] Validate this data package and fail if wrong\r\n  - [x] Validate the user id (from token) and user name to validate user\r\n- [x] Store data into S3\r\n"},"comment":{"url":"https://api.github.com/repos/frictionlessdata/dpr-api/issues/comments/259945776","html_url":"https://github.com/frictionlessdata/dpr-api/issues/4#issuecomment-259945776","issue_url":"https://api.github.com/repos/frictionlessdata/dpr-api/issues/4","id":259945776,"user":{"login":"rgrp","id":180658,"avatar_url":"https://avatars.githubusercontent.com/u/180658?v=3","gravatar_id":"","url":"https://api.github.com/users/rgrp","html_url":"https://github.com/rgrp","followers_url":"https://api.github.com/users/rgrp/followers","following_url":"https://api.github.com/users/rgrp/following{/other_user}","gists_url":"https://api.github.com/users/rgrp/gists{/gist_id}","starred_url":"https://api.github.com/users/rgrp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgrp/subscriptions","organizations_url":"https://api.github.com/users/rgrp/orgs","repos_url":"https://api.github.com/users/rgrp/repos","events_url":"https://api.github.com/users/rgrp/events{/privacy}","received_events_url":"https://api.github.com/users/rgrp/received_events","type":"User","site_admin":false},"created_at":"2016-11-11T12:18:04Z","updated_at":"2016-11-11T12:18:04Z","body":"@subhankarb do we allow both put and POST?"}}
{"actor":{"display_login":"rgrp"}}