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/931d27c4-e6dd-4791-b773-e6e4fc58c52d/instances/0/files/path_to_file

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTk5IiwiZW1haWwiOiJlbWFpbC02M0Bzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDYxMzc0NjI2fQ.drzKEsCg3OsaFA6GaLBffkjceaavtFxROLlyk_nER5g
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/931d27c4-e6dd-4791-b773-e6e4fc58c52d/instances/0/files/path_to_file" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTk5IiwiZW1haWwiOiJlbWFpbC02M0Bzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDYxMzc0NjI2fQ.drzKEsCg3OsaFA6GaLBffkjceaavtFxROLlyk_nER5g" \
	-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: 3544e261-26c2-414b-94f7-d215eb11c374
Content-Length: 0
X-Content-Type-Options: nosniff