GitLab API

GitlabTool

Actions1095

Projects → putApiV4ProjectsIdRepositorySubmodulesSubmodule

AI-generated

Summary

Update a repository submodule in a specified GitLab project by sending a PUT request with updated submodule details.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project where the submodule exists.
  • submodule (required) — URL-encoded full path to the submodule to update within the project's repository.
  • putApiV4ProjectsIdRepositorySubmodulesSubmodule (required) — Request body containing the details to update the submodule, conforming to the defined schema.
  • Skip Authentication — Option to skip authentication (by default, authentication via GitLab API credentials is used).
  • baseUrl — Base URL of the GitLab instance; defaults to https://gitlab.com if not set.

Output shape

a single updated submodule record as returned by the GitLab API

The response will conform to the GitLab API's update submodule endpoint schema. Authentication data is required unless explicitly skipped. Requires valid project ID and submodule path parameters.

Examples

Example 1: Update the URL or branch of an existing submodule in a GitLab project repository

Set 'id' to the project identifier (e.g., 'gitlab-org/gitlab'), specify the submodule path, provide updated submodule definitions in the request body, and execute the operation with authentication enabled.

Links

Discussion