On Samstag, 18. September 2021, 13:50:48 CEST Kai Liu wrote:
On 2021/09/16 Thu 17:16, Adrian Schröter wrote:
On Donnerstag, 16. September 2021, 17:15:47 CEST Kai Liu wrote:
Hi,
I looked around in the web UI and man osc, can't find a way to create a distribution from either place. So is POSTing /distributions the only way to do so?
yes
I tried to create a distribution:
osc api -X POST -T test.xml /distributions/
easiest is osc api -e /distributions
But it returned an error:
Server returned an error: HTTP Error 422: Unprocessable Entity
I first thought I put something wrong in my test.xml, so I get the data from boo/distributions, copied the openSUSE 15.3 part out to test.xml, like below:
<distribution vendor="openSUSE" version="15.3" id="19032"> <name>openSUSE Leap 15.3</name> <project>openSUSE:Leap:15.3</project> <reponame>15.3</reponame> <repository>standard</repository> <link>http://www.opensuse.org/</link> <icon url="https://static.opensuse.org/distributions/logos/opensuse.png" width="8" height="8"/> <icon url="https://static.opensuse.org/distributions/logos/opensuse.png" width="16" height="16"/> <architecture>x86_64</architecture> </distribution>
And tried again. It gave me the same error. Am I missing anything?
I believe the outer
<distributions>
...
</distributions>
(plural) are missing here
--
Adrian Schroeter