{"action":"created","issue":{"url":"https://api.github.com/repos/openwhisk/openwhisk/issues/1176","repository_url":"https://api.github.com/repos/openwhisk/openwhisk","labels_url":"https://api.github.com/repos/openwhisk/openwhisk/issues/1176/labels{/name}","comments_url":"https://api.github.com/repos/openwhisk/openwhisk/issues/1176/comments","events_url":"https://api.github.com/repos/openwhisk/openwhisk/issues/1176/events","html_url":"https://github.com/openwhisk/openwhisk/issues/1176","id":174382346,"number":1176,"title":"Discussion api2 admin vs. invoke/fire","user":{"login":"csantanapr","id":1094878,"avatar_url":"https://avatars.githubusercontent.com/u/1094878?v=3","gravatar_id":"","url":"https://api.github.com/users/csantanapr","html_url":"https://github.com/csantanapr","followers_url":"https://api.github.com/users/csantanapr/followers","following_url":"https://api.github.com/users/csantanapr/following{/other_user}","gists_url":"https://api.github.com/users/csantanapr/gists{/gist_id}","starred_url":"https://api.github.com/users/csantanapr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csantanapr/subscriptions","organizations_url":"https://api.github.com/users/csantanapr/orgs","repos_url":"https://api.github.com/users/csantanapr/repos","events_url":"https://api.github.com/users/csantanapr/events{/privacy}","received_events_url":"https://api.github.com/users/csantanapr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/openwhisk/openwhisk/labels/API","name":"API","color":"0052cc"},{"url":"https://api.github.com/repos/openwhisk/openwhisk/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-31T21:22:55Z","updated_at":"2016-08-31T21:51:55Z","closed_at":null,"body":"When we start work on api v2 I want to propose that we stop using POST on the `action` or `trigger` resource to `invoke` or `fire`\r\n\r\nThis will allow for clients to do admin tasks with CRUD on the resources.\r\nWere a POST to an action resource will create the action, and a PUT will update an existing action.\r\n\r\nwe can have a base url path to be use for differentiate, \r\nThis  could potentially have a set of controllers that deal with admin tasks and another set that deals with high performances tasks (i.e. invoke/fire)\r\n\r\nThis URLS will support CRUD to manage the resources (create (POST), read(GET), update(PUT), delete(DELETE)) \r\n- `https://{BASE URL}/api/v2/namespaces/{namespace}/actions/[{packageName}/]{actionName}`\r\n- `https://{BASE URL}/api/v2/namespaces/{namespace}/triggers/{triggerName}`\r\n\r\nHave alternative APIs for invoke and trigger, have `invoke` or `trigger` in the path\r\nMaybe at the start: \r\n- `https://{BASE URL}/api/v2/invoke/namespaces/{namespace}/actions/[{packageName}/]{actionName}`\r\n- `https://{BASE URL}/api/v2/fire/namespaces/{namespace}/triggers/{triggerName}`\r\n\r\ncc @rabbah \r\n"},"comment":{"url":"https://api.github.com/repos/openwhisk/openwhisk/issues/comments/243914118","html_url":"https://github.com/openwhisk/openwhisk/issues/1176#issuecomment-243914118","issue_url":"https://api.github.com/repos/openwhisk/openwhisk/issues/1176","id":243914118,"user":{"login":"csantanapr","id":1094878,"avatar_url":"https://avatars.githubusercontent.com/u/1094878?v=3","gravatar_id":"","url":"https://api.github.com/users/csantanapr","html_url":"https://github.com/csantanapr","followers_url":"https://api.github.com/users/csantanapr/followers","following_url":"https://api.github.com/users/csantanapr/following{/other_user}","gists_url":"https://api.github.com/users/csantanapr/gists{/gist_id}","starred_url":"https://api.github.com/users/csantanapr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csantanapr/subscriptions","organizations_url":"https://api.github.com/users/csantanapr/orgs","repos_url":"https://api.github.com/users/csantanapr/repos","events_url":"https://api.github.com/users/csantanapr/events{/privacy}","received_events_url":"https://api.github.com/users/csantanapr/received_events","type":"User","site_admin":false},"created_at":"2016-08-31T21:51:55Z","updated_at":"2016-08-31T21:51:55Z","body":"OK so your saying that you agree with me that having a POST to create an action is good thing?\r\n\r\nSo your saying we go with something like this?:\r\nGET, PUT, DELETE on this URIs\r\nhttps://{BASE URL}/api/v2/namespaces/{namespace}/actions/[{packageName}/]{actionName}\r\nhttps://{BASE URL}/api/v2/namespaces/{namespace}/triggers/{triggerName}\r\n\r\nPOST on this URIs\r\nhttps://{BASE URL}/api/v2/namespaces/{namespace}/actions\r\nbody will have action entity to create including packagename it belongs to\r\nhttps://{BASE URL}/api/v2/namespaces/{namespace}/triggers\r\nbody will have trigger entity to create\r\n"}}
{"actor":{"display_login":"csantanapr"}}