Create a wiki page
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 of the repo
Name of the repo
Request Body
Section titled “Request Body”CreateWikiPageOptions form for creating wiki
object
Content must be base64 encoded
Optional commit message summarizing the change
Page title. leave empty to keep unchanged
Examplegenerated
{ "content_base64": "example", "message": "example", "title": "example"}Responses
Section titled “Responses”WikiPage
WikiPage a wiki page
object
The number of commits that modified this page
Page content, base64 encoded
The footer content for the wiki page
The HTML URL to view the wiki page
WikiCommit page commit/revision
object
object
Date is the commit date in string format
Name is the person’s name
object
Date is the commit date in string format
Name is the person’s name
The commit message
The commit SHA hash
The sidebar content for the wiki page
The sub URL path for the wiki page
The title of the wiki page
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
Headers
Section titled “Headers”APIForbiddenError is a forbidden error response
Headers
Section titled “Headers”APINotFound is a not found empty response
APIRepoArchivedError is an error that is raised when an archived repo should be modified