I want to change the tags from my docker images in Artifactory using the REST API. The only possible way to make this work I could find out is to promote the image to an other repository and promote it back while changing the tag.
I really don't want to create an other repository only to move my image there and afterwards back.
When I tried to promote the image to the source repository I get this error message:
{\n "errors" : [ {\n "status" : 400,\n "message" : "Skipping promote since destination and source are the same"\n } ]\n}'
I have found a workaround. They way you do it is to use Copy Item and delete it afterwards.
POST /api/copy/{srcRepoKey}/{srcFilePath}?to=/{targetRepoKey}/{targetFilePath}[&dry=1][&suppressLayouts=0/1(default)][&failFast=0/1]
I don't understand why they don't list this information next to the documentation of promoting an image. In general the new Artifactory documentation is really bad. I don't like it and hope they revert it.