Get file

  • GET
  • /workspaces
  • /:workspace
  • /projects
  • /:project_name
  • /pipelines
  • /:pipeline_id
  • /files
  • /contents
  • /:path

Returns details and content of a file from the pipeline filesystem

Request

REQUIRED SCOPES
EXECUTION_MANAGE
URL PARAMETERS
workspacerequiredstring
The human-readable ID of the workspace

Example: "my-company"

project_namerequiredstring
The human-readable ID of the project

Example: "my-project"

pipeline_idrequiredinteger
The ID of the pipeline

Example: 123

pathrequiredstring
The path of the file in the pipeline filesystem

Constraints: Pattern: .+

Example: "app/docs/report.pdf"

Response

RESPONSE BODY
urlread-onlystring
API endpoint to GET this object
html_urlread-onlystring
Web URL to view this object in Buddy.works
content_typestring enum
The type of the filesystem entry
Allowed enum:
FILE,
DIR,
SYMLINK,
SUB_MODULE
encodingstring
The encoding of the returned content: base64, or none when the file is too large
sizeinteger
The size of the file in bytes
namestring
The name of the file
pathstring
The path of the file in the pipeline filesystem
contentstring
The Base64-encoded content of the file
targetstring
The target path of the symlink

Last modified on Aug 11, 2026

Request example

CURL
curl -X GET "https://api.buddy.works/workspaces/:workspace/projects/:project_name/pipelines/:pipeline_id/files/contents/:path" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "Content-Type: application/json"
EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/my-workspace/projects/my-project/pipelines/123/files/contents/app/docs/report.txt", "html_url": "https://app.buddy.works/my-workspace/my-project/pipelines/pipeline/123/browse/content/app%2Fdocs%2Freport.txt", "content_type": "FILE", "encoding": "base64", "size": 40, "name": "report.txt", "path": "app/docs/report.txt", "content": "Zmlyc3QgbGluZQpsaW5lIHdpdGggcGF0dGVybiBZCmxhc3QgbGluZQ==" }
STATUS
200 OK