{"action":"created","issue":{"url":"https://api.github.com/repos/ElektraInitiative/libelektra/issues/912","repository_url":"https://api.github.com/repos/ElektraInitiative/libelektra","labels_url":"https://api.github.com/repos/ElektraInitiative/libelektra/issues/912/labels{/name}","comments_url":"https://api.github.com/repos/ElektraInitiative/libelektra/issues/912/comments","events_url":"https://api.github.com/repos/ElektraInitiative/libelektra/issues/912/events","html_url":"https://github.com/ElektraInitiative/libelektra/pull/912","id":174579901,"number":912,"title":"elektra web HTTP API","user":{"login":"omnidan","id":668674,"avatar_url":"https://avatars.githubusercontent.com/u/668674?v=3","gravatar_id":"","url":"https://api.github.com/users/omnidan","html_url":"https://github.com/omnidan","followers_url":"https://api.github.com/users/omnidan/followers","following_url":"https://api.github.com/users/omnidan/following{/other_user}","gists_url":"https://api.github.com/users/omnidan/gists{/gist_id}","starred_url":"https://api.github.com/users/omnidan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omnidan/subscriptions","organizations_url":"https://api.github.com/users/omnidan/orgs","repos_url":"https://api.github.com/users/omnidan/repos","events_url":"https://api.github.com/users/omnidan/events{/privacy}","received_events_url":"https://api.github.com/users/omnidan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ElektraInitiative/libelektra/labels/proposal","name":"proposal","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-01T17:24:06Z","updated_at":"2016-09-05T09:01:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ElektraInitiative/libelektra/pulls/912","html_url":"https://github.com/ElektraInitiative/libelektra/pull/912","diff_url":"https://github.com/ElektraInitiative/libelektra/pull/912.diff","patch_url":"https://github.com/ElektraInitiative/libelektra/pull/912.patch"},"body":"# Purpose\r\n\r\nThis is a proposal to allow remote configuration of (multiple) elektra instances.\r\n\r\n# Checklist\r\n\r\n- [x] change links to point to the official repo\r\n- [ ] squash commits\r\n\r\n@markus2330 please review my pull request\r\n"},"comment":{"url":"https://api.github.com/repos/ElektraInitiative/libelektra/issues/comments/244695683","html_url":"https://github.com/ElektraInitiative/libelektra/pull/912#issuecomment-244695683","issue_url":"https://api.github.com/repos/ElektraInitiative/libelektra/issues/912","id":244695683,"user":{"login":"Namoshek","id":8877609,"avatar_url":"https://avatars.githubusercontent.com/u/8877609?v=3","gravatar_id":"","url":"https://api.github.com/users/Namoshek","html_url":"https://github.com/Namoshek","followers_url":"https://api.github.com/users/Namoshek/followers","following_url":"https://api.github.com/users/Namoshek/following{/other_user}","gists_url":"https://api.github.com/users/Namoshek/gists{/gist_id}","starred_url":"https://api.github.com/users/Namoshek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Namoshek/subscriptions","organizations_url":"https://api.github.com/users/Namoshek/orgs","repos_url":"https://api.github.com/users/Namoshek/repos","events_url":"https://api.github.com/users/Namoshek/events{/privacy}","received_events_url":"https://api.github.com/users/Namoshek/received_events","type":"User","site_admin":false},"created_at":"2016-09-05T09:01:35Z","updated_at":"2016-09-05T09:01:35Z","body":"So far the API descriptions seems clear and well thought, except for the HTTP methods here and there. When you change them, make sure you only use either **PUT** or **PATCH**, but not both. I think they are interchangable, although some might say that **PATCH** is used for modifications and **PUT** for replacements (although this differentiation is quite hard in most scenarios). For removing resources obviously use **DELETE**. Concerning the rest of your proposal and the structure, I think I would have chosen a similar approach.\r\n\r\nFor further definition of the REST API, I have some thoughs on my mind that might be helpful for you:\r\n* How are you handling meta data?\r\n* How are you handling plugin operations / other common tasks (do you plan to support them at all)? \r\n<br/>(I think these two points are quite difficult to answer, because there are basically only two options: Use unique API endpoints for each operation, which will bloat the whole API, or encapsulate the operations within one API endpoint, which doesn't really fit the RESTful approach...)\r\n* Your HTTP response codes for the `elektrad` daemon are quite clear, because the daemon can select them on his very own for a single operation. But how are you going to select the response codes for the `clusterd` daemon, if the response codes of the underlying instances are not all the same (e.g. one instance failed the operation)? (There is a multi-status response code (207) which could be used for the outer response and then you could send the individual response codes as part of the response message for each instance. This way you could probably also avoid having to implement transaction logic (not sure if this would be possible at all, and quite sure this would be out of scope for your work).)\r\n* What response codes will you be using within your system at all? (Probably 200, 404, maybe 403, ...)\r\n* When you setup an instance, you'll have to setup the `elektrad` daemon individually via SSH or something. Instead of having to put the daemon into the cluster configuration by hand after that operation, the daemon could register himself (based on a configuration file e.g.). This would also make things easier if the IP or domain of one of your machines (instances) changes for example. Of course, if your cluster management server would change his address, you would have to change the configuration for each machine by hand.\r\n* What is your plan for authorization / security?\r\n* Will hierarchical clusters be a thing (e.g. cluster A only encapsulates clusters B and C, which then hold real instances)?\r\n\r\nI think that is enough to think about for the moment. :smile: "}}
{"actor":{"display_login":"Namoshek"}}