Closed zamir-devops closed 1 year ago
Hi @zamir-devops I've had a flick through the our logs and I can see you've attempted calling this endpoint with the GET
HTTP method. Please note that you must use the POST
http method (hence the 405 response).
I can see you've tried using POST
in some requests but the endpoint was slightly wrong:
//v2/namespaces/dockercoign/delete-images
.
That double //
at the start would break the routing unfortunately.
Please could you try again using POST /v2/namespaces/dockercoign/delete-images
and see if that works.
You can also try doing this via the Docker Hub interface under Advanced Image Management. That uses the same API underneath that you are consuming here.
Thank you and if you have any issues please get back to us here
@zappy-shu You are totally right, both // and HTTP method were the cause. Thank you so much for the help!
No problem @zamir-devops . Glad I could help.
Problem description
Hi, I'm trying to use the endpoint documented here
That is: https://hub.docker.com/v2/namespaces/{namespace}/delete-images
However when I send the authenticated request, it returns:
I am using different JSON payloads for the request, however it doesn't work with any of them, for example this one
or this one:
Also I tested with a recent generated mfa token.
Testing the following endpoint /v2/namespaces/dockercoign/repositories/coign-core/images?status=inactive works, it means it's not related with authentication since I am using the same token (it's not a PAT, login is done via 2FA)
Debug Information
Browser name and version: Postman for Windows Version 9.31.23 UI Version 9.31.23-ui-221108-1820 Desktop Platform Version 9.31.0 Architecture x64 OS Platform win32 10.0.19044
URL: /v2/namespaces/dockercoign/delete-images
Timetamp or time range: UTC -5 CO
Public IP: 186.30.147.142
Hub Username:
dockercoign (org) 6779737178 <- Hub user doing the API calls
Error messages (on screen or in browser console)
{ "message": "405: Method Not Allowed" }
Thanks in advance!