<div dir="ltr">How would REST API users discover the possible values for ‘operation’? I guess we could put it in the help text for the field.<div><br></div><div>I’m unsure of the value of having an operation param. I think I prefer the idea of just having users supply importer or add/remove_content (but not both) or having two separate endpoints.</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br></div><div>David<br></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Mon, Jan 8, 2018 at 1:45 PM, Dennis Kliban <span dir="ltr"><<a href="mailto:dkliban@redhat.com" target="_blank">dkliban@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Enable users to POST to /api/v3/repositories/<wbr>123abc456/versions/ with one required parameter 'operation'. This parameter would be an identifier for a task Pulp would run to create a new version. Any additional parameters passed in by the API user would be passed along to the task. <br><br>pulpcore would provide the 'sync' task and the 'add_remove' task. 'sync' would accept an 'importer'. 'add_remove' would accept 'remove_content' and 'add_content'. <br><br>Each 
plugin could provide any number of tasks for creating a repository 
version. <br><br></div>pulpcore would always create the new repository version, hand it to the plugin code, and then mark it as complete after plugin code runs successfully. Alleviating the plugin writer of these concern. <br></div><div><br></div><div>REST API users would always use the same end point to create a repository version. Plugin writers wouldn't have to worry about creating repository versions and managing the 'complete' state. <br></div><div><br></div>What do you all think?<br><br></div>
<br>______________________________<wbr>_________________<br>
Pulp-dev mailing list<br>
<a href="mailto:Pulp-dev@redhat.com">Pulp-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-dev" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/pulp-dev</a><br>
<br></blockquote></div><br></div>