Use this API to update Git submodules.
Update a submodule reference
PUT /api/v4/projects/{id}/repository/submodules/{submodule}
Updates a reference for a specified submodule.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID or URL- Example: gitlab- |
submodulePath, | String | URL- Example: gitlab- |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
branchRequired | String | Name of the branch to commit into Example: main |
commit_ | String | Commit message. Example: Commit message |
commit_Required | String | Commit sha to update the submodule to Example: ed899a2f4b50b4370fee |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | The repository is empty | — |
401 | 401 Unauthorized | — |
404 | 404 Project Not Found | — |
Schemas
Objects returned by the operations above and objects nested in their request bodies.
APIEntitiesCommitDetail
| Property | Type | Description |
|---|---|---|
author_ | String | Example:john@example. |
author_ | String | Example:John Smith |
authored_ | String (date- | Example:2012- |
committed_ | String (date- | Example:2012- |
committer_ | String | Example:jack@example. |
committer_ | String | Example:Jack Smith |
created_ | String (date- | Example:2017- |
extended_ | Object | Example:{"Signed- |
id | String | Example:2695effb5807a22ff3d1 |
last_ | Object | — |
message | String | Example:Initial commit |
parent_ | Array of strings | Example:["2a4b78934375d7f53875 |
project_ | Integer (int64) | Example:1 |
short_ | String | Example:2695effb |
stats | APIEntities | — |
status | String | Example:success |
title | String | Example:Initial commit |
trailers | Object | Example:{"Merged- |
web_ | String | Example:https: |
APIEntitiesCommitStats
| Property | Type | Description |
|---|---|---|
additions | Integer | Example:1 |
deletions | Integer | Example:0 |
total | Integer | Example:1 |