{"action":"closed","number":1401,"pull_request":{"url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1401","id":34044623,"html_url":"https://github.com/geoadmin/mf-chsdi3/pull/1401","diff_url":"https://github.com/geoadmin/mf-chsdi3/pull/1401.diff","patch_url":"https://github.com/geoadmin/mf-chsdi3/pull/1401.patch","issue_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/1401","number":1401,"state":"closed","locked":false,"title":"File storage service (KML)","user":{"login":"procrastinatio","id":1236739,"avatar_url":"https://avatars.githubusercontent.com/u/1236739?v=3","gravatar_id":"","url":"https://api.github.com/users/procrastinatio","html_url":"https://github.com/procrastinatio","followers_url":"https://api.github.com/users/procrastinatio/followers","following_url":"https://api.github.com/users/procrastinatio/following{/other_user}","gists_url":"https://api.github.com/users/procrastinatio/gists{/gist_id}","starred_url":"https://api.github.com/users/procrastinatio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/procrastinatio/subscriptions","organizations_url":"https://api.github.com/users/procrastinatio/orgs","repos_url":"https://api.github.com/users/procrastinatio/repos","events_url":"https://api.github.com/users/procrastinatio/events{/privacy}","received_events_url":"https://api.github.com/users/procrastinatio/received_events","type":"User","site_admin":false},"body":"The following operations are supported:\r\n\r\n#### Create\r\n\r\n```\r\n$ curl -X POST -d @la_sagne.kml -H \"Content-Type: application/vnd.google-earth.kml+xml\" -H \"Referer: http://map.geo.admin.ch\" \\\r\n http://mf-chsdi3.dev.bgdi.ch/mom_kml_storage/files\r\n\r\n{\"adminId\":\"J3KMLz8CRyKjO-n1DhMm7w_admin\",\"fileId\":\"J3KMLz8CRyKjO-n1DhMm7w\"}\r\n```\r\n\r\n\r\n#### GET with file_id\r\n\r\n```\r\n$ curl http://mf-chsdi3.dev.bgdi.ch/mom_kml_storage/files/J3KMLz8CRyKjO-n1DhMm7w\r\n\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?><kml xmlns=\"http://www.opengis.net/kml/2.2\".....\r\n```\r\n\r\n#### GET with admin_id\r\n\r\n```\r\n$ curl http://mf-chsdi3.dev.bgdi.ch/mom_kml_storage/files/J3KMLz8CRyKjO-n1DhMm7w\r\n\r\n{\"fileId\":\"J3KMLz8CRyKjO-n1DhMm7w\"}\r\n```\r\n\r\n#### POST with admin_id (UPDATE)\r\n\r\n```\r\n$ curl -v -X POST -d @la_sagne.kml  -H \"Content-Type: application/vnd.google-earth.kml+xml\" -H \"Referer: http://map.geo.admin.ch\"  \\\r\n http://mf-chsdi3.dev.bgdi.ch/mom_kml_storage/files/J3KMLz8CRyKjO-n1DhMm7w_admin\r\n\r\n{\"adminId\":\"J3KMLz8CRyKjO-n1DhMm7w_admin\",\"fileId\":\"J3KMLz8CRyKjO-n1DhMm7w\"}\r\n```\r\n\r\n#### POST with file_id (FORK)\r\n\r\n```\r\n$ curl -v -X POST -d @la_sagne.kml  -H \"Content-Type: application/vnd.google-earth.kml+xml\" -H \"Referer: http://map.geo.admin.ch\" \\\r\n http://mf-chsdi3.dev.bgdi.ch/mom_kml_storage/files/J3KMLz8CRyKjO-n1DhMm7w\r\n\r\n{\"adminId\":\"hghdthtfghdh_admin\",\"fileId\":\"hghdthtfghdh\"}\r\n```\r\n#### DELETE with admin_id\r\n```\r\n$ curl -X DELETE  -H \"Referer: http://map.geo.admin.ch\" http://mf-chsdi3.dev.bgdi.ch/mom_kml_storage/files/J3KMLz8CRyKjO-n1DhMm7w_admin\r\n\r\nHTTP/1.1 200 OK\r\n```\r\n\r\nCurrently, only KML files are supported. Files are check for correct 'Content-Type', size and well-formedness, and are stored into bucket `public.geo.admin.ch` (or the equivalent on stagging environnments)\r\n\r\n## TODO\r\n\r\n- [x] View for each operations\r\n- [x] Multiple buckets + Varnish settings\r\n- [x] Full HTTPS check (new certificate for _public.geo.admin.ch_!)\r\n- [x] Automatic tests\r\n- [x] Proper credentials management\r\n- [x] Dynamodb dump/restore\r\n- [ ] Bucket backup\r\n- [x] Proper scaling (how much traffic to we expect, how many files ?)\r\n\r\nFrom https://github.com/geoadmin/mf-geoadmin3/issues/2315\r\n- [ ]  availability to manage the data by KOGIS (DB mmgt interfce, instruction) (see https://github.com/geoadmin/dynamodump/pull/15)\r\n- [ ] set up automatic deletion date (bucket policy)\r\n\r\n## Backups\r\n\r\n* DynamoDB: see https://github.com/geoadmin/dynamodump/pull/15\r\n* S3 Bucket: `s3sync`\r\n\r\n## Integration in geo.admin.ch\r\n\r\nTest [link](https://mf-geoadmin3.dev.bgdi.ch/teo_save_draw)\r\n","created_at":"2015-04-24T12:41:02Z","updated_at":"2015-05-20T06:22:21Z","closed_at":"2015-05-20T06:22:21Z","merged_at":"2015-05-20T06:22:21Z","merge_commit_sha":"195a51cf69542d886ace91e6615d69c1d848a532","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1401/commits","review_comments_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1401/comments","review_comment_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/1401/comments","statuses_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/statuses/ea7cd3f69b4457145065b28c54552d5fffe1bdf4","head":{"label":"geoadmin:mom_kml_storage","ref":"mom_kml_storage","sha":"ea7cd3f69b4457145065b28c54552d5fffe1bdf4","user":{"login":"geoadmin","id":3369793,"avatar_url":"https://avatars.githubusercontent.com/u/3369793?v=3","gravatar_id":"","url":"https://api.github.com/users/geoadmin","html_url":"https://github.com/geoadmin","followers_url":"https://api.github.com/users/geoadmin/followers","following_url":"https://api.github.com/users/geoadmin/following{/other_user}","gists_url":"https://api.github.com/users/geoadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/geoadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoadmin/subscriptions","organizations_url":"https://api.github.com/users/geoadmin/orgs","repos_url":"https://api.github.com/users/geoadmin/repos","events_url":"https://api.github.com/users/geoadmin/events{/privacy}","received_events_url":"https://api.github.com/users/geoadmin/received_events","type":"Organization","site_admin":false},"repo":{"id":10399553,"name":"mf-chsdi3","full_name":"geoadmin/mf-chsdi3","owner":{"login":"geoadmin","id":3369793,"avatar_url":"https://avatars.githubusercontent.com/u/3369793?v=3","gravatar_id":"","url":"https://api.github.com/users/geoadmin","html_url":"https://github.com/geoadmin","followers_url":"https://api.github.com/users/geoadmin/followers","following_url":"https://api.github.com/users/geoadmin/following{/other_user}","gists_url":"https://api.github.com/users/geoadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/geoadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoadmin/subscriptions","organizations_url":"https://api.github.com/users/geoadmin/orgs","repos_url":"https://api.github.com/users/geoadmin/repos","events_url":"https://api.github.com/users/geoadmin/events{/privacy}","received_events_url":"https://api.github.com/users/geoadmin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/geoadmin/mf-chsdi3","description":"api3.geo.admin.ch source code. ","fork":false,"url":"https://api.github.com/repos/geoadmin/mf-chsdi3","forks_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/forks","keys_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/teams","hooks_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/hooks","issue_events_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/events{/number}","events_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/events","assignees_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/assignees{/user}","branches_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/branches{/branch}","tags_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/tags","blobs_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/refs{/sha}","trees_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/statuses/{sha}","languages_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/languages","stargazers_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/stargazers","contributors_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/contributors","subscribers_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/subscribers","subscription_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/subscription","commits_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/commits{/sha}","git_commits_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/commits{/sha}","comments_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/comments{/number}","issue_comment_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/comments{/number}","contents_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/contents/{+path}","compare_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/merges","archive_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/downloads","issues_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues{/number}","pulls_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls{/number}","milestones_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/milestones{/number}","notifications_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/labels{/name}","releases_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/releases{/id}","created_at":"2013-05-31T06:59:44Z","updated_at":"2015-05-14T18:15:42Z","pushed_at":"2015-05-20T06:22:21Z","git_url":"git://github.com/geoadmin/mf-chsdi3.git","ssh_url":"git@github.com:geoadmin/mf-chsdi3.git","clone_url":"https://github.com/geoadmin/mf-chsdi3.git","svn_url":"https://github.com/geoadmin/mf-chsdi3","homepage":"api3.geo.admin.ch","size":264011,"stargazers_count":10,"watchers_count":10,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":47,"forks":7,"open_issues":47,"watchers":10,"default_branch":"master"}},"base":{"label":"geoadmin:master","ref":"master","sha":"def01facb78e472ea0593d81bcf80ba1032dcb9a","user":{"login":"geoadmin","id":3369793,"avatar_url":"https://avatars.githubusercontent.com/u/3369793?v=3","gravatar_id":"","url":"https://api.github.com/users/geoadmin","html_url":"https://github.com/geoadmin","followers_url":"https://api.github.com/users/geoadmin/followers","following_url":"https://api.github.com/users/geoadmin/following{/other_user}","gists_url":"https://api.github.com/users/geoadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/geoadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoadmin/subscriptions","organizations_url":"https://api.github.com/users/geoadmin/orgs","repos_url":"https://api.github.com/users/geoadmin/repos","events_url":"https://api.github.com/users/geoadmin/events{/privacy}","received_events_url":"https://api.github.com/users/geoadmin/received_events","type":"Organization","site_admin":false},"repo":{"id":10399553,"name":"mf-chsdi3","full_name":"geoadmin/mf-chsdi3","owner":{"login":"geoadmin","id":3369793,"avatar_url":"https://avatars.githubusercontent.com/u/3369793?v=3","gravatar_id":"","url":"https://api.github.com/users/geoadmin","html_url":"https://github.com/geoadmin","followers_url":"https://api.github.com/users/geoadmin/followers","following_url":"https://api.github.com/users/geoadmin/following{/other_user}","gists_url":"https://api.github.com/users/geoadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/geoadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoadmin/subscriptions","organizations_url":"https://api.github.com/users/geoadmin/orgs","repos_url":"https://api.github.com/users/geoadmin/repos","events_url":"https://api.github.com/users/geoadmin/events{/privacy}","received_events_url":"https://api.github.com/users/geoadmin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/geoadmin/mf-chsdi3","description":"api3.geo.admin.ch source code. ","fork":false,"url":"https://api.github.com/repos/geoadmin/mf-chsdi3","forks_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/forks","keys_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/teams","hooks_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/hooks","issue_events_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/events{/number}","events_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/events","assignees_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/assignees{/user}","branches_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/branches{/branch}","tags_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/tags","blobs_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/refs{/sha}","trees_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/statuses/{sha}","languages_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/languages","stargazers_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/stargazers","contributors_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/contributors","subscribers_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/subscribers","subscription_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/subscription","commits_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/commits{/sha}","git_commits_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/commits{/sha}","comments_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/comments{/number}","issue_comment_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/comments{/number}","contents_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/contents/{+path}","compare_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/merges","archive_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/downloads","issues_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues{/number}","pulls_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls{/number}","milestones_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/milestones{/number}","notifications_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/labels{/name}","releases_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/releases{/id}","created_at":"2013-05-31T06:59:44Z","updated_at":"2015-05-14T18:15:42Z","pushed_at":"2015-05-20T06:22:21Z","git_url":"git://github.com/geoadmin/mf-chsdi3.git","ssh_url":"git@github.com:geoadmin/mf-chsdi3.git","clone_url":"https://github.com/geoadmin/mf-chsdi3.git","svn_url":"https://github.com/geoadmin/mf-chsdi3","homepage":"api3.geo.admin.ch","size":264011,"stargazers_count":10,"watchers_count":10,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":47,"forks":7,"open_issues":47,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1401"},"html":{"href":"https://github.com/geoadmin/mf-chsdi3/pull/1401"},"issue":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/1401"},"comments":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/1401/comments"},"review_comments":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1401/comments"},"review_comment":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1401/commits"},"statuses":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/statuses/ea7cd3f69b4457145065b28c54552d5fffe1bdf4"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"gjn","id":2572317,"avatar_url":"https://avatars.githubusercontent.com/u/2572317?v=3","gravatar_id":"","url":"https://api.github.com/users/gjn","html_url":"https://github.com/gjn","followers_url":"https://api.github.com/users/gjn/followers","following_url":"https://api.github.com/users/gjn/following{/other_user}","gists_url":"https://api.github.com/users/gjn/gists{/gist_id}","starred_url":"https://api.github.com/users/gjn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gjn/subscriptions","organizations_url":"https://api.github.com/users/gjn/orgs","repos_url":"https://api.github.com/users/gjn/repos","events_url":"https://api.github.com/users/gjn/events{/privacy}","received_events_url":"https://api.github.com/users/gjn/received_events","type":"User","site_admin":false},"comments":8,"review_comments":26,"commits":1,"additions":1298,"deletions":5,"changed_files":13}}