)]}'
{"guidelines/metadata.rst":[{"author":{"_account_id":10670,"name":"Michael McCune","email":"elmiko@redhat.com","username":"mimccune"},"change_message_id":"579327ae1bec707a3dfb9e129ae7c5e6f366f340","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"Example request::"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    DELETE /servers/1234567890/metadata/?keys\u003dfoo,bar,qux"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"Addressing Individual Metadata Items"},{"line_number":151,"context_line":"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"}],"source_content_type":"text/x-rst","patch_set":1,"id":"dae33548_e72c1f9b","line":148,"updated":"2016-02-17 21:03:00.000000000","message":"is the last \"/\" needed?\n\ni would think this would make more sense as:\n\n    DELETE /servers/1234567890/metadata?keys\u003dfoo,bar,qux","commit_id":"85ad2682283501b0673cb140c6180fd501495687"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"2302836bae89069b78dcf991c2ffa0920d9eb572","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"Example request::"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    DELETE /servers/1234567890/metadata?keys\u003dfoo,bar,qux"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"Addressing Individual Metadata Items"},{"line_number":151,"context_line":"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"}],"source_content_type":"text/x-rst","patch_set":2,"id":"bae84128_7bb9df14","line":148,"updated":"2016-02-23 12:33:53.000000000","message":"Why is this better than three separate requests to metadata/foo metadata/bar metadata/qux?\n\nIt\u0027s a costly optimization to make to violates the semantics of the URLs.\n\nIf you want to delete some set of attributes you have two choices:\n\n* do what I describe above\n* PUT an entirely new metadata resource with the desired keys not present as described at https://specs.openstack.org/openstack/api-wg/guidelines/metadata.html#modifying-metadata","commit_id":"48de58811c58aeed20e6b93fc4e702e33ac376d5"},{"author":{"_account_id":14305,"name":"Yuriy Nesenenko","email":"ynesenenko@mirantis.com","username":"yuriy_n"},"change_message_id":"7d143d8b2a35ae2f55be90f63d5409d3d86c85a3","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"Example request::"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    DELETE /servers/1234567890/metadata?keys\u003dfoo,bar,qux"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"Addressing Individual Metadata Items"},{"line_number":151,"context_line":"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"}],"source_content_type":"text/x-rst","patch_set":2,"id":"bae84128_c66492ba","line":148,"in_reply_to":"bae84128_7bb9df14","updated":"2016-02-23 12:54:57.000000000","message":"The more metadata keys are necessary to remove, the more API\nrequests and DB queries are needed.\nThe PUT requires an additional query to the database to know which metadata keys exist. I don\u0027t think it\u0027s a good idea.","commit_id":"48de58811c58aeed20e6b93fc4e702e33ac376d5"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"8e8937ae0ed80225ce04fef656df022801132a06","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"Example request::"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    DELETE /servers/1234567890/metadata?keys\u003dfoo,bar,qux"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"Addressing Individual Metadata Items"},{"line_number":151,"context_line":"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"}],"source_content_type":"text/x-rst","patch_set":2,"id":"bae84128_e12700b4","line":148,"in_reply_to":"bae84128_c66492ba","updated":"2016-02-23 13:08:40.000000000","message":"If you\u0027re database and api server can\u0027t handle those additional requests, you\u0027ve got worse problems than a wonky API.\n\nIn order to do the DELETE the way you\u0027ve described it, you need to have done a GET recently to know what they keys are anyway, so you already have a metadata object in context, so it is no different to modify that object and PUT it back.\n\nIf there\u0027s a specific context in which this optimization is required, then fine, but since this is general advise we are giving to API developers, I feel this is not good advice.","commit_id":"48de58811c58aeed20e6b93fc4e702e33ac376d5"},{"author":{"_account_id":14305,"name":"Yuriy Nesenenko","email":"ynesenenko@mirantis.com","username":"yuriy_n"},"change_message_id":"fe733b0a40353bfba70d66ea1738144d8ba737e6","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"Example request::"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    DELETE /servers/1234567890/metadata?keys\u003dfoo,bar,qux"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"Addressing Individual Metadata Items"},{"line_number":151,"context_line":"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"}],"source_content_type":"text/x-rst","patch_set":2,"id":"bae84128_a1ab3874","line":148,"in_reply_to":"bae84128_e12700b4","updated":"2016-02-23 13:19:49.000000000","message":"No need to do GET request, the API call will just delete the keys or fail if some of them doesn\u0027t exist.","commit_id":"48de58811c58aeed20e6b93fc4e702e33ac376d5"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"7bd9ca13d6f1d6fddb22f9f064d686cad816e53f","unresolved":false,"context_lines":[{"line_number":209,"context_line":""},{"line_number":210,"context_line":"Example request::"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    DELETE /servers/1234567890/metadata?keys\u003dqux"}],"source_content_type":"text/x-rst","patch_set":2,"id":"bae84128_000ca239","line":212,"range":{"start_line":212,"start_character":0,"end_line":212,"end_character":48},"updated":"2016-02-23 12:07:18.000000000","message":"Are we able to change the URL of the guideline once it was published? There are OpenStack APIs already implementing that the old way.","commit_id":"48de58811c58aeed20e6b93fc4e702e33ac376d5"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"2302836bae89069b78dcf991c2ffa0920d9eb572","unresolved":false,"context_lines":[{"line_number":209,"context_line":""},{"line_number":210,"context_line":"Example request::"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    DELETE /servers/1234567890/metadata?keys\u003dqux"}],"source_content_type":"text/x-rst","patch_set":2,"id":"bae84128_db38eba2","line":212,"updated":"2016-02-23 12:33:53.000000000","message":"Which shouldn\u0027t get rid of the resource oriented version.","commit_id":"48de58811c58aeed20e6b93fc4e702e33ac376d5"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"3d45c7c1fc30e6a15058fce97cc253c13b8f0c71","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"Example request::"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    DELETE /servers/1234567890/metadata/foo,bar,qux"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"Addressing Individual Metadata Items"},{"line_number":151,"context_line":"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7af24918_81c4835f","line":148,"range":{"start_line":148,"start_character":40,"end_line":148,"end_character":51},"updated":"2016-03-02 13:31:27.000000000","message":"Idea seems neat to me, but only if we don\u0027t allow \",\" character in metadata key. I know Cinder do allow that.","commit_id":"76c317efce3abc78f3eed8e280978ecc9b0f0f87"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"df12f75a1bfc7e38dc41550004441c5695b7ad7e","unresolved":false,"context_lines":[{"line_number":101,"context_line":"Modifying Metadata"},{"line_number":102,"context_line":"~~~~~~~~~~~~~~~~~~"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"To add, remove, or change metadata items, a PUT request must be sent to the"},{"line_number":105,"context_line":"root metadata URL, with the updated complete list of metadata items in the"},{"line_number":106,"context_line":"body of the request. On success, the server responds with a 200 status code"},{"line_number":107,"context_line":"and the complete updated metadata block in the response body."}],"source_content_type":"text/x-rst","patch_set":4,"id":"5aef4532_e4cd5e86","line":104,"range":{"start_line":104,"start_character":8,"end_line":104,"end_character":14},"updated":"2016-03-09 14:02:21.000000000","message":"seem here already talked about remove?","commit_id":"c7ed50d41cd328c20449598a8fad981d979927ab"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"df12f75a1bfc7e38dc41550004441c5695b7ad7e","unresolved":false,"context_lines":[{"line_number":153,"context_line":"            \"buz\": \"Baz Value\""},{"line_number":154,"context_line":"        }"},{"line_number":155,"context_line":"    }"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"Addressing Individual Metadata Items"},{"line_number":158,"context_line":"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"},{"line_number":159,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"5aef4532_84073ac9","line":156,"updated":"2016-03-09 14:02:21.000000000","message":"may add response here like above modify section","commit_id":"c7ed50d41cd328c20449598a8fad981d979927ab"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"a0d52db47eafcaa8f84eb053461fee4141f5ff5f","unresolved":false,"context_lines":[{"line_number":160,"context_line":"            \"baz\": \"Baz Value\""},{"line_number":161,"context_line":"        }"},{"line_number":162,"context_line":"    }"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"Addressing Individual Metadata Items"},{"line_number":165,"context_line":"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"},{"line_number":166,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"5aef4532_2a754d31","line":163,"updated":"2016-03-09 14:29:49.000000000","message":"I think you should add a short statement that says \"You may also delete metadata items one at a time, see below (with a link)\".","commit_id":"9207ee5a07d9824189e206eca0e5cf5e9b0eec92"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"086bc12308d778fdfae3eb4f3677f0c03d9b3e3f","unresolved":false,"context_lines":[{"line_number":142,"context_line":"To delete multiple metadata items without affecting the remaining ones,"},{"line_number":143,"context_line":"a PUT request must be sent to the root metadata URL with the updated complete"},{"line_number":144,"context_line":"list of metadata items (without items to delete) in the body of the request."},{"line_number":145,"context_line":"On success, the server responds with a 200 status code."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"Example request (removes “foo” and “qux”)::"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"fa0719c6_eb7c7522","line":145,"updated":"2016-03-21 15:21:17.000000000","message":"201 would not be correct in this case because it is \u0027201 Created\u0027. In this example the metadata already exists are we are removing parts of it by replacing an existing representation with another. 200 is correct.\n\nAn option would be to remove the sentence and assume that people know it would be 200, but it doesn\u0027t appear that people know that, so leaving it in seems right.","commit_id":"b4a078a76c07ebd432f3e8eb999010ac9eaa1a22"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"1ea6b177e91e524610d292043b981e8829b1a8ba","unresolved":false,"context_lines":[{"line_number":142,"context_line":"To delete multiple metadata items without affecting the remaining ones,"},{"line_number":143,"context_line":"a PUT request must be sent to the root metadata URL with the updated complete"},{"line_number":144,"context_line":"list of metadata items (without items to delete) in the body of the request."},{"line_number":145,"context_line":"On success, the server responds with a 200 status code."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"Example request (removes “foo” and “qux”)::"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"1af94dfe_b83d2991","line":145,"range":{"start_line":145,"start_character":39,"end_line":145,"end_character":55},"updated":"2016-03-17 21:04:33.000000000","message":"In most cases, metadata operations are synchronous I feel because the operations affect DB only. So 201 also is a nice option as this code.\n\nHow about leaving this line 145 to avoid such discussion?","commit_id":"b4a078a76c07ebd432f3e8eb999010ac9eaa1a22"},{"author":{"_account_id":9717,"name":"Michael Krotscheck","email":"krotscheck@gmail.com","username":"krotscheck"},"change_message_id":"1129873513866828a5114222d138d096ba93ba57","unresolved":false,"context_lines":[{"line_number":105,"context_line":"root metadata URL, with the updated complete list of metadata items in the"},{"line_number":106,"context_line":"body of the request. On success, the server responds with a 200 status code"},{"line_number":107,"context_line":"and the complete updated metadata block in the response body. A PUT request"},{"line_number":108,"context_line":"shuold use etags to avoid the lost update problem."},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"Example request (updates \"foo\", removes \"bar\", adds \"qux\" and leaves \"baz\""},{"line_number":111,"context_line":"untouched)::"}],"source_content_type":"text/x-rst","patch_set":7,"id":"9a061dce_121615a7","line":108,"range":{"start_line":108,"start_character":0,"end_line":108,"end_character":6},"updated":"2016-04-05 13:25:53.000000000","message":"should","commit_id":"0fb47e6773a1f0328d473dcbce9223c0a175cc1c"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"e9e31ef46a062d69ff55479cace08bc19154f662","unresolved":false,"context_lines":[{"line_number":105,"context_line":"root metadata URL, with the updated complete list of metadata items in the"},{"line_number":106,"context_line":"body of the request. On success, the server responds with a 200 status code"},{"line_number":107,"context_line":"and the complete updated metadata block in the response body. A PUT request"},{"line_number":108,"context_line":"should use etags to avoid the lost update problem."},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"Example request (updates \"foo\", removes \"bar\", adds \"qux\" and leaves \"baz\""},{"line_number":111,"context_line":"untouched)::"}],"source_content_type":"text/x-rst","patch_set":8,"id":"9a061dce_cb606338","line":108,"updated":"2016-04-05 14:56:33.000000000","message":"I think this should be a warning or a note:\n\n    ..note:: A PUT request..\n\nto make it stand out. When I get the etag guideline done (coming soon) we can link to it from here.","commit_id":"587bd3b40aff61b9e5e96240a67d269a8c76fcd5"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"be93a4b1bc04ec9d112978cddc886b35e5186c65","unresolved":false,"context_lines":[{"line_number":106,"context_line":"body of the request. On success, the server responds with a 200 status code"},{"line_number":107,"context_line":"and the complete updated metadata block in the response body."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":".. note:: A PUT request should use etags to avoid the lost update problem."},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"Example request (updates \"foo\", removes \"bar\", adds \"qux\" and leaves \"baz\""},{"line_number":112,"context_line":"untouched)::"}],"source_content_type":"text/x-rst","patch_set":9,"id":"9a061dce_671f836c","line":109,"range":{"start_line":109,"start_character":24,"end_line":109,"end_character":30},"updated":"2016-04-06 17:15:34.000000000","message":"Do you intend a \"should\" or a \"could\" here?","commit_id":"b27ca332a75d3fff408204ab7983437b862ebdc3"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"c2d104d4178b6c82baa24bf35ba46cc72ebb7757","unresolved":false,"context_lines":[{"line_number":106,"context_line":"body of the request. On success, the server responds with a 200 status code"},{"line_number":107,"context_line":"and the complete updated metadata block in the response body."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":".. note:: A PUT request should use etags to avoid the lost update problem."},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"Example request (updates \"foo\", removes \"bar\", adds \"qux\" and leaves \"baz\""},{"line_number":112,"context_line":"untouched)::"}],"source_content_type":"text/x-rst","patch_set":9,"id":"9a061dce_861bb872","line":109,"in_reply_to":"9a061dce_671f836c","updated":"2016-04-06 17:32:21.000000000","message":"I suggested this line as a \"should\". It might also be \"must\". Without it there _will_ be a lost update problem.\n\nThe draft for the etag guideline is here: https://review.openstack.org/#/c/301846/","commit_id":"b27ca332a75d3fff408204ab7983437b862ebdc3"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"0ce664e153c8e353dfac84291fd468aa8416c5ed","unresolved":false,"context_lines":[{"line_number":106,"context_line":"body of the request. On success, the server responds with a 200 status code"},{"line_number":107,"context_line":"and the complete updated metadata block in the response body."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":".. note:: A PUT request should use etags to avoid the lost update problem."},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"Example request (updates \"foo\", removes \"bar\", adds \"qux\" and leaves \"baz\""},{"line_number":112,"context_line":"untouched)::"}],"source_content_type":"text/x-rst","patch_set":9,"id":"9a061dce_0ccfc729","line":109,"in_reply_to":"9a061dce_861bb872","updated":"2016-04-06 18:31:39.000000000","message":"gotcha, thanks!","commit_id":"b27ca332a75d3fff408204ab7983437b862ebdc3"}]}
