<div dir="ltr"><div>As part of my project to add a second implementation of the OpenStack API, I'm implementing Barbican, and I'm struggling to understand the motivations behind the API spec.</div><div><br></div>The API supports storing multiple secrets under a given key, the canonical example for that being SSL keys which comprise a certificate/public key and a private key.  That makes sense.<div>
<br></div><div><div>But, to set or retrieve the "sub-secrets", the MIME type of the request is used.  'application/json' is special and retrieves the metadata.</div><div><br></div><div>Wouldn't it be much easier just to use a path ( i.e. .../secrets/{id}/{name} ), rather than using MIME types?  Using MIME types seems very un-RESTy, but I'll leave that argument to the REST police :-)</div>
<div><br></div><div>It seems much more complicated to use MIME types, so I'm betting there's a good reason.  Can someone from the Barbican team share what those are?<br><div><br></div><div>(The API ref I'm looking at is here: <a href="https://github.com/cloudkeep/barbican/wiki/Blueprint%3A-MIME-Type-Revamp">https://github.com/cloudkeep/barbican/wiki/Blueprint%3A-MIME-Type-Revamp</a> )</div>
<div><br></div><div><div>Justin<br><br>---<br><br>Justin Santa Barbara<br>Founder, FathomDB<br></div>
</div></div></div></div>