Create a wiki page
POST
/repos/{owner}/{repo}/wiki/new
const url = 'https://gitea.com/api/v1/repos/example/example/wiki/new';const options = { method: 'POST', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"content_base64":"example","message":"example","title":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”owner
required
string
Owner of the repo
repo
required
string
Name of the repo
Request Body
Section titled “Request Body”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"}Responses
Section titled “ Responses ”WikiPage
WikiPage a wiki page
object
commit_count
integer format: int64
content_base64
Page content, base64 encoded
string
footer
string
html_url
string
last_commit
WikiCommit page commit/revision
object
author
CommitUser contains information of a user in the context of a commit.
object
date
string
email
string format: email
name
string
commiter
CommitUser contains information of a user in the context of a commit.
object
date
string
email
string format: email
name
string
message
string
sha
string
sidebar
string
sub_url
string
title
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"}WikiPage a wiki page
object
commit_count
integer format: int64
content_base64
Page content, base64 encoded
string
footer
string
html_url
string
last_commit
WikiCommit page commit/revision
object
author
CommitUser contains information of a user in the context of a commit.
object
date
string
email
string format: email
name
string
commiter
CommitUser contains information of a user in the context of a commit.
object
date
string
email
string format: email
name
string
message
string
sha
string
sidebar
string
sub_url
string
title
string
APIError is error format response
Headers
Section titled “Headers”message
string
url
string
APIForbiddenError is a forbidden error response
Headers
Section titled “Headers”message
string
url
string
APINotFound is a not found empty response
APIRepoArchivedError is an error that is raised when an archived repo should be modified
Headers
Section titled “Headers”message
string
url
string