When I tried running that file I wasn't able to access anything.
These are the commands I was originally testing with and the responses using my file:
$ curl -X PUT -d @t.json -u test2:test2 "localhost:8080/api/providers/rest"
404 page not found
$ curl localhost:8080 -u test2:test2
<a href="/dashboard/">Found</a>.
When I was running your file:
$ curl localhost:8080 -u test2:test2
curl: (7) Failed to connect to localhost port 8080: Connection refused
$ curl -X PUT -d @t.json -u test2:test2 "localhost:8080/api/providers/rest"
curl: (7) Failed to connect to localhost port 8080: Connection refused
# Using your commands
$ curl api.localhost/api/providers/docker
curl: (6) Could not resolve host: api.localhost
$ curl -v -d "{}" -X PUT rest.localhost/api/providers/rest
* Could not resolve host: rest.localhost
* Closing connection 0
curl: (6) Could not resolve host: rest.localhost