Use this API to manage protected tags.
List all protected tags
GET /api/v4/projects/{id}/protected_tags
Lists all protected tags for a specified project.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | The ID or URL- |
pageQuery | Integer | Current page number Default: 1Example: 1 |
per_Query | Integer | Number of items per page Default: 20Example: 20 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
403 | Unauthenticated | — |
404 | Not found | — |
Protect a repository tag
POST /api/v4/projects/{id}/protected_tags
Protects a specified repository tag using a wildcard protected tag.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | The ID or URL- |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
allowed_ | Array of objects | Array of deploy keys allowed to create protected tags |
create_ | Integer | Access levels allowed to create (defaults:40,Allowed values: 30,40,60,0 |
nameRequired | String | The name of the protected tag Example: release- |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
403 | Unauthenticated | — |
404 | Not found | — |
422 | Unprocessable entity | — |
Retrieve a protected tag or wildcard protected tag
GET /api/v4/projects/{id}/protected_tags/{name}
Retrieves a specified protected tag or wildcard protected tag.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | The ID or URL- |
namePath, | String | The name of the tag or wildcard Example: release* |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
403 | Unauthenticated | — |
404 | Not found | — |
Unprotect repository tags
DELETE /api/v4/projects/{id}/protected_tags/{name}
Unprotects a specified protected tag or wildcard protected tag.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | The ID or URL- |
namePath, | String | The name of the protected tag Example: release- |
Responses
| Code | Description | Schema |
|---|---|---|
204 | No Content | — |
400 | Bad Request | — |
403 | Unauthenticated | — |
404 | Not found | — |
412 | Precondition Failed | — |
Schemas
Objects returned by the operations above and objects nested in their request bodies.
APIEntitiesProtectedRefAccess
| Property | Type | Description |
|---|---|---|
access_ | Integer | Example:40 |
access_ | String | Example:Maintainers |
deploy_ | Integer (int64) | Example:1 |
group_ | Integer | Example:1 |
id | Integer (int64) | Example:1 |
user_ | Integer | Example:1 |
APIEntitiesProtectedTag
| Property | Type | Description |
|---|---|---|
create_ | Array of APIEntities | — |
name | String | Example:release- |