Implement backend support for pulling APIs from public Git repositories
@thivindu is already working on this.
Since Nov 12, 2025.
- Dominant language
- Go
- Stars
- 71
- Forks
- 111
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 110
Description
Description
This sub-issue focuses on implementing the backend REST API required to fetch the contents of a public Git repository as part of enabling API import from remote repositories.
Currently, only public repositories will be supported.
Support for private repositories (with authentication) will be added later.
Scope
POST /git/repo/fetch-branches
Purpose:
Fetch the branches of a given public GitHub repository to verify accessibility and display its branches and their status (isDefault) in the API Platform UI.
Request Payload:
{
"repoUrl": "https://github.com/example-org/sample-api",
"provider": "github"
}
POST /git/repo/branch/fetch-content
Purpose:
Fetch the contents (directories and files) of a given public GitHub repository to verify accessibility and display its structure in the API Platform UI.
Request Payload:
{
"repoUrl": "https://github.com/example-org/sample-api",
"provider": "github",
"branch": "main"
}
Behavior:
Fetches and returns the directory and file structure of the specified repository and branch.
Fails gracefully if:
- The repository is private or inaccessible.
- The repository URL is invalid or not a valid Git URL.
Error Handling
Return a descriptive error if the repository cannot be accessed (e.g., private or invalid URL).
Handle network or Git fetch errors cleanly with appropriate status codes.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.