wikis

Upload an attachment to a project wiki

Uploads a file to the uploads directory in a specified project wiki.

post/api/v4/projects/{id}/wikis/attachments

Request

  • Base URL
    https://gitlab.com
  • Auth
    none declared

Path parameters

idstring required

The ID or URL-encoded path of the group or project

Request body

filestring binary required

The attachment file to be uploaded

branchstring

The name of the branch

Response

Upload an attachment to a project wiki

file_namestring required
file_pathstring required
branchstring required

Example response

{
  "file_name": "dk.png",
  "file_path": "uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png",
  "branch": "main",
  "link": {
    "url": "uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png",
    "markdown": "![dk](uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png)"
  }
}

Changes

No recorded changes to this operation across all 5 revisions of this API.