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

Create a wiki page

POST
/repos/{owner}/{repo}/wiki/new
curl --request POST \
--url https://gitea.com/api/v1/repos/example/example/wiki/new \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "content_base64": "example", "message": "example", "title": "example" }'
owner
required
string

Owner of the repo

repo
required
string

Name of the repo

Media typeapplication/json

CreateWikiPageOptions form for creating wiki

object
content_base64

Content must be base64 encoded

string
message

Optional commit message summarizing the change

string
title

Page title. leave empty to keep unchanged

string
Examplegenerated
{
"content_base64": "example",
"message": "example",
"title": "example"
}

WikiPage

Media typeapplication/json

WikiPage a wiki page

object
commit_count

The number of commits that modified this page

integer format: int64
content_base64

Page content, base64 encoded

string
footer

The footer content for the wiki page

string
html_url

The HTML URL to view the wiki page

string
last_commit

WikiCommit page commit/revision

object
author
CommitUser contains information of a user in the context of a commit.
object
date

Date is the commit date in string format

string
email
string format: email
name

Name is the person’s name

string
commiter
CommitUser contains information of a user in the context of a commit.
object
date

Date is the commit date in string format

string
email
string format: email
name

Name is the person’s name

string
message

The commit message

string
sha

The commit SHA hash

string
sidebar

The sidebar content for the wiki page

string
sub_url

The sub URL path for the wiki page

string
title

The title of the wiki page

string
Examplegenerated
{
"commit_count": 1,
"content_base64": "example",
"footer": "example",
"html_url": "example",
"last_commit": {
"author": {
"date": "example",
"email": "hello@example.com",
"name": "example"
},
"commiter": {
"date": "example",
"email": "hello@example.com",
"name": "example"
},
"message": "example",
"sha": "example"
},
"sidebar": "example",
"sub_url": "example",
"title": "example"
}

APIError is error format response

Media typeapplication/json
message
string
url
string

APIForbiddenError is a forbidden error response

Media typeapplication/json
message
string
url
string

APINotFound is a not found empty response

Media typeapplication/json

APIRepoArchivedError is an error that is raised when an archived repo should be modified

Media typeapplication/json
message
string
url
string