Open jabrena opened 9 years ago
Check the feature in CF platforms with Diego enabled.
For Diego, the unique way to download files is using ssh:
Host: uaa.run.pivotal.io
User-Agent: Go-http-client/1.1
Referer: https://uaa.run.pivotal.io/oauth/authorize?client_id=ssh-proxy&grant_ty
pe=authorization_code&response_type=code
Accept-Encoding: gzip
cf ssh appX
https://github.com/cloudfoundry-incubator/diego-ssh#cloud-foundry-via-cloud-controller-and-uaa
$ curl -k -v -H "Authorization: $(cf oauth-token | tail -1)" \
https://uaa.bosh-lite.com/oauth/authorize \
--data-urlencode "client_id=$(cf curl /v2/info | jq -r .app_ssh_oauth_client)" \
--data-urlencode 'response_type=code' 2>&1 | \
grep Location: | \
cut -f2 -d'?' | \
cut -f2 -d'=' | \
pbcopy # paste authoriztion code when prompted for password
GET /v2/apps/d2c6634d-b9da-462c-b420-54ac155e6327/instances/0/files/path_to_file
http://apidocs.cloudfoundry.org/217/files/retrieve_file.html