Get
- GET
- /workspaces
- /:domain
- /projects
- /:project_name
- /repository
- /contents
- /:path
Returns the contents of the repository for the specified revision or HEAD.
content_type
can be either FILE
, DIR
, SYMLINK
, or SUB_MODULE
. encoding
always set to base64
Example:
CURLcurl -X GET "https://api.buddy.works/workspaces/:domain/projects/:project_name/repository/contents/:path" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "Content-Type: application/json" \
EXAMPLE RESPONSE{ "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/repository/contents/?revision=development", "html_url": "https://app.buddy.works/buddy/company-website/repository/content/branch/development", "contents": [ { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/repository/contents/scss?revision=development", "html_url": "https://app.buddy.works/buddy/company-website/repository/content/branch/development/%2Fscss", "content_type": "DIR", "name": "scss", "path": "/scss" }, { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/repository/contents/.gitignore?revision=development", "html_url": "https://app.buddy.works/buddy/company-website/repository/content/branch/development/.gitignore", "content_type": "FILE", "encoding": "base64", "size": 22, "name": ".gitignore", "path": ".gitignore", "content": "LmlkZWEvCi5EU19TdG9yZQpjc3MvCg==" }, { "url": "https://api.buddy.works/workspaces/buddy/projects/company-website/repository/contents/public?revision=development", "html_url": "https://app.buddy.works/buddy/company-website/repository/content/branch/development/%2Fpublic", "content_type": "SUB_MODULE", "name": "public", "path": "/public" } ] }
STATUS200 OK
LIMITSX-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999