<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;"><font color="black" face="Tahoma" size="2"><span style="font-size:10pt;" dir="ltr">Hello All,<br>
I'm writing to notify you of the approach the Glance community has decided to take for doing functional API.  Also, I'm writing to solicit your feedback on this approach in the light of cross-project API consistency.<br>
<br>
At the Atlanta Summit, the Glance team has discussed introducing functional API in Glance so as to be able to expose operations/actions that do not naturally fit into the CRUD-style. A few approaches are proposed and discussed
<a href="https://etherpad.openstack.org/p/glance-adding-functional-operations-to-api">
here</a>. We have all converged on the approach to include 'action' and action type in the URL. For instance, 'POST /images/{image_id}/actions/{action_type}'.<br>
<br>
However, this is different from the way Nova does actions. Nova includes action type in the payload. For instance, 'POST /servers/{server_id}/action {"type": "<action_type>", ...}'. At this point, we hit a cross-project API consistency issue mentioned
<a href="https://etherpad.openstack.org/p/juno-cross-project-consistency-across-rest-apis">
here</a> (under the heading 'How to act on resource - cloud perform on resources'). Though we are differing from the way Nova does actions and hence another source of cross-project API inconsistency , we have a few reasons to believe that Glance's way is helpful
 in certain ways.<br>
<br>
The reasons are as following:<br>
1. Discoverability of operations.  It'll be easier to expose permitted actions through schemas a json home document living at /images/{image_id}/actions/.<br>
2. More conducive for rate-limiting. It'll be easier to rate-limit actions in different ways if the action type is available in the URL.<br>
3. Makes more sense for functional actions that don't require a request body (e.g., image deactivation).<br>
<br>
At this point we are curious to see if the API conventions group believes this is a valid and reasonable approach.<br>
Any feedback is much appreciated. Thank you!<br>
<br>
Regards,<br>
Hemanth Makkapati<br>
</span></font></div>
</body>
</html>