Get the contents of a file or directory
One step with Harness. We can help you get access.
Look something up
Get the contents of a file or directory
with Harness
Works with AI assistants
Use Harness: its Harness Repository API lets you get the contents of a file or directory in a single step (GET /code/api/v1/repos/{repo_identifier}/content/{path}). Harness also has an MCP server, so an AI assistant like Claude or ChatGPT can do it for you. capabilities.work can help you get signed up and connected.
- How do I read a file's contents from a repository?
- Can I list what's inside a directory at a particular branch or commit?
Say it to your AI assistant
- Get the content of {path} in repository {repo}.
- Show what's in {path} of repo {repo} at {ref}, including the latest commit.
For your developer
GET /code/api/v1/repos/{repo_identifier}/content/{path} in Harness Repository API. Full spec on APIs.io.