title: How to structure a microservice management layer calls
body: <p>I am building a microservice that will have a management layer, and another corresponding microservice for a public api. The management layer's client will be imported into the api service as well as a few other apps. What I am wondering is what the proper way to structure the mgmt layer's calls would be. I'm using rpc.</p>
  <p>For example, let's say the service contains Human, Dog, Food. Food has to be owned by a Human OR Dog, not both and not neither.</p>
  <p>Now since the mgmt service will only be accessed by client and not url, would it be better to define the specs like:</p>
  <pre><code>POST: /humans/id/food     Client call: mgmtService.createFoodForHuman(humanId, Food)
  POST: /dogs/id/food       Client call: mgmtService.createFoodForDog(dogId, Food)
  </code></pre>
  <p>or</p>
  <pre><code>POST: /food               Client call: mgmtService.createFood(Food)
  </code></pre>
  <p>where the second instance of Food will require the user to pass in one of human id or dog id.</p>
  <p>To me, the first example seems more straightforward from a code-client perspective since the methods are more defined and the second example doesn't give any info of what kind of id is needed, but I am interested if there is any thoughts on which one is best practice. Thanks!</p>