v13

latestOpenAPI 3.0.0zlibraw.githubusercontent.com2026-08-01265409652.5 KB
gitops

preview the content of target file in the git repository

Retrieve the compose file content based on git repository configuration Access policy: authenticated

post/gitops/repo/file/preview

Request body

passwordstring

Password for git authentication. Deprecated: use SourceID instead

referencestring
repositorystring

URL of a Git repository to preview. Deprecated: use SourceID instead

sourceIDinteger

SourceID resolves URL and auth from the stored Source record. When set, the inline Repository/Username/Password/TLSSkipVerify fields are ignored.

targetFilestring

Path to file whose content will be read

tlsSkipVerifyboolean

TLSSkipVerify skips SSL verification when cloning the Git repository. Deprecated: use SourceID instead

usernamestring

Username for git authentication. Deprecated: use SourceID instead

Example request

{
  "password": "myGitPassword",
  "reference": "refs/heads/master",
  "repository": "https://github.com/openfaas/faas",
  "sourceID": 1,
  "targetFile": "docker-compose.yml",
  "username": "myGitUsername"
}

Response

Success

FileContentstring