<div dir="ltr">Current implementation of <a href="https://github.com/pulp/pulpcore/blob/master/pulpcore/app/viewsets/content.py#L98-L102">ContentViewset</a> includes mixins for create (POST) and retrieve/list (GET). <div>In case a plugin doesn't need to support POST for a content endpoint, a plugin writer compiles a viewset from the mixins they need, e.g. <a href="https://github.com/pulp/pulp_rpm/blob/master/pulp_rpm/app/viewsets.py#L233-L258">distribution trees and custom metadata</a> (same use case is expected for modularity endpoints)<div>This leads to the inconsistent REST API.</div><div><br></div><div># ContentViewset is used</div><div>/pulp/api/v3/content/rpm/advisories/   </div><div><br></div><div># custom plugin content viewset</div><div>/pulp/api/v3/distribution_trees/rpm/distribution_trees/<br></div><div><br></div><div>Possible solutions:</div><div>1. Make ContentViewset more generic (no mixins, or only GET ones?) and let plugins include any mixins they need.</div><div>This option might be painful to switch to for plugin writers, because every plugin will be affected and will need to make this change. </div><div>At the same time probably not many plugins support upload for every content type, so in many cases the POST is broken/not used anyway.</div><div><br></div><div>2. Disable POST at the plugin level in some other way.</div><div>I'm not sure if there is any native option to disable it.</div><div>Hacky way is to override `create` method which will return appropriate HTTP error that POST is not supported.</div><div><br></div><div>3. Make plugin writers manually define a proper endpoint name.</div><div>Apart from not being reliable, I'm not sure how to do it because of how we tweak endpoint generation.</div><div>Notice the distribution trees example ^, "distribution_trees" is used twice in the endpoint.</div><div><br></div><div>4. Any other solutions? Easy ones which I missed?</div><div><br></div><div>Thank you,</div><div>Tanya</div><div><br></div><div><br></div><div><br></div></div></div>