Home
Version 3
Files API

Files API

Retrieve File

GET /v2/apps/:app_guid/instances/:instance_index/files/:file_path

The endpoint does not function with Diego apps. Please use CF CLI command `cf ssh` for Diego apps.

Request

Route

GET /v2/apps/1c857ae9-d435-41cd-8641-8f986498a562/instances/0/files/path_to_file

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEyMiIsImVtYWlsIjoiZW1haWwtOTFAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ2MzYxODcxMH0.kS2N3pqEsj-sduiuIFy-HjKG581OLfDpVIGLNtzZOQc
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/1c857ae9-d435-41cd-8641-8f986498a562/instances/0/files/path_to_file" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEyMiIsImVtYWlsIjoiZW1haWwtOTFAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ2MzYxODcxMH0.kS2N3pqEsj-sduiuIFy-HjKG581OLfDpVIGLNtzZOQc" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

302 Found

Headers

Content-Type: application/json;charset=utf-8
Location: dea.example.com/encoded_path_to_file
X-VCAP-Request-ID: a9681e42-f993-432a-937d-0b138bab60d7
Content-Length: 0
X-Content-Type-Options: nosniff