Codeberg icon

Codeberg

Interact with the Codeberg API

File → Get

AI-generated

Summary

Retrieve the content and metadata of a specific file from a Codeberg repository.

Inputs

  • Authentication — Choose the authentication method, either Access Token or OAuth2.
  • Repository Owner (required) — Owner of the repository from which to get the file.
  • Repository Name (required) — Name of the repository from which to get the file.
  • File Path (required) — Path of the file to retrieve within the repository.
  • Additional Fields — Optional fields including 'Ref' to specify the branch, tag, or commit SHA to get the file from.

Output shape

a single record

Returns the file content and metadata as JSON, including base64 encoded content and related file information.

Links

Discussion