As a REST API user, I can determine which publication is associated with a publish task
#2 Updated by email@example.com over 3 years ago
Let's consider adding a natural key to the publication. A name for example that the user can optionally specify. I imagine the user would name the publication based on version of build#. This gives the user something meaningful to use when selecting a publication to be associated to a distribution or to be deleted.
We could default the Publication._name_ to the task ID when not specified by the user.
Should be unique by (publisher_id, name)
We'd need to update the /Publisher/publish endpoint and add an optional "publication_name" parameter which would need to be passed to Publisher.publish().
#3 Updated by firstname.lastname@example.org over 3 years ago
This problem could be avoided if we treated publications the same way we treat other resources in Pulp's REST API.
The user currently performs a
POST to http://localhost:8000/api/v3/repositories/foo/publishers/example/bar/publish/
to create a publication. The user receives a 202 response with a reference to a task.
If instead the user performed a
POST to http://localhost:8000/api/v3/repositories/foo/publishers/example/bar/publications/
to create a publication and received a 201 with the created publication that references a task, the user would know which publication to associate with a distribution. The user would also know which task to monitor.
Please register to edit this issue