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/622ae289-3f80-4238-8449-690c9c059954/instances/0/files/path_to_file

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMyOSIsImVtYWlsIjoiZW1haWwtMjMxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjE5NTg0MDh9.-UOeVaOCFrotePX7BRMoOEW_UFganJT5j0nn9w31j2I
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/622ae289-3f80-4238-8449-690c9c059954/instances/0/files/path_to_file" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMyOSIsImVtYWlsIjoiZW1haWwtMjMxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjE5NTg0MDh9.-UOeVaOCFrotePX7BRMoOEW_UFganJT5j0nn9w31j2I" \
	-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: f6a510f9-c1b2-427a-a821-8d4002bc80ea
Content-Length: 0
X-Content-Type-Options: nosniff