GitLab API

GitlabTool

Actions1095

Projects → postApiV4ProjectsIdRepositoryFilesFilePath

AI-generated

Summary

Create or update a file in a GitLab project's repository by specifying the project ID and the URL-encoded file path, along with the file content and other parameters in the request body.

Inputs

  • id (required) — The project ID to identify which GitLab project contains the repository.
  • file_path (required) — The URL-encoded path to the file in the repository to create or update.
  • postApiV4ProjectsIdRepositoryFilesFilePath (required) — The request body schema containing file content, branch name, commit message, and other parameters required to create or update the file.
  • skipAuthentication — Optional boolean to skip authentication, default is false.
  • baseUrl — The base URL of the GitLab instance, defaulting to https://gitlab.com.

Output shape

a JSON response object as returned by the GitLab API for creating or updating repository files.

The response shape follows the GitLab API v4 specification for repository files create/update endpoints. The operation requires authentication unless 'Skip Authentication' is set to true. The 'id' and 'file_path' path parameters must be URL-encoded as needed.

Links

Discussion