跳转到内容
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!

Edit a release attachment

PATCH
/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}
curl --request PATCH \
--url https://gitea.com/api/v1/repos/example/example/releases/1/assets/1 \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example" }'
owner
required
string

Owner of the repo

repo
required
string

Name of the repo

id
required
integer format: int64

Id of the release

attachment_id
required
integer format: int64

Id of the attachment to edit

Media typeapplication/json

EditAttachmentOptions options for editing attachments

object
name

Name is the new filename for the attachment

string
Examplegenerated
{
"name": "example"
}

Attachment

Media typeapplication/json

Attachment a generic attachment

object
browser_download_url

DownloadURL is the URL to download the attachment

string
created_at
string format: date-time
download_count

DownloadCount is the number of times the attachment has been downloaded

integer format: int64
id

ID is the unique identifier for the attachment

integer format: int64
name

Name is the filename of the attachment

string
size

Size is the file size in bytes

integer format: int64
uuid

UUID is the unique identifier for the attachment file

string
Examplegenerated
{
"browser_download_url": "example",
"created_at": "2026-04-15T12:00:00Z",
"download_count": 1,
"id": 1,
"name": "example",
"size": 1,
"uuid": "example"
}

APINotFound is a not found empty response

Media typeapplication/json

APIValidationError is error format response related to input validation

Media typeapplication/json
message
string
url
string