I have a resource that essentially requires another resource as input data for creation. For example:
POST /v1/NewResource
body: {InputResource}
The interesting thing, however, is that creation of the NewResource is expensive, and the resource itself is transient (not persisted). Some consumers may only need part of the resource. So, I really have two input parameters: the data required to do the creation, and then processing instructions from the consumer to control how much work actually gets done.
I see two paths (at least):
POST /v1/NewResource?detailLevel=base|full
body: {InputResource}
vs
POST /v1/NewResource
body: {Request.detailLevel and Request.InputResource}
Is the first one even an option? Anyone have any preferences/experience either way? There's a certain amount of elegance in having the payload be just the data needed and separating from the processing instructions. I realize there's no right or wrong answer here, just curious on the thoughts of the community.