openapi: 3.1.0 info: title: Azure DevOps Artifacts Attachments Wikis API description: 'REST API for managing packages, feeds, and artifact dependencies in Azure Artifacts. Supports NuGet, npm, Maven, Python, and Universal package formats in private or public feeds. Enables programmatic management of package feeds, discovery of packages and their versions, and lifecycle operations such as deprecating or deleting package versions. ' version: '7.1' contact: name: Microsoft Azure DevOps url: https://learn.microsoft.com/en-us/rest/api/azure/devops/artifacts/ license: name: MIT url: https://opensource.org/licenses/MIT servers: - url: https://feeds.dev.azure.com/{organization}/{project}/_apis description: Azure DevOps Artifacts API (project-scoped) variables: organization: description: Azure DevOps organization name or ID default: myorganization project: description: Azure DevOps project name or ID default: myproject security: - bearerAuth: [] - basicAuth: [] tags: - name: Wikis description: Operations for managing wiki instances paths: /wiki/wikis: get: operationId: wikis_list summary: Azure DevOps List wikis description: 'Returns a list of all wikis in the project. A project typically has one project wiki and may have additional code wikis that are backed by specific Git repository folders. ' tags: - Wikis parameters: - $ref: '#/components/parameters/ApiVersion' responses: '200': description: List of wikis returned successfully content: application/json: schema: type: object properties: count: type: integer description: Number of wikis returned value: type: array items: $ref: '#/components/schemas/WikiV2' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' post: operationId: wikis_create summary: Azure DevOps Create a wiki description: 'Creates a new wiki for a project. You can create a project wiki (backed by a dedicated wiki repository) or a code wiki (backed by an existing Git repository and folder path). Only one project wiki can exist per project. ' tags: - Wikis parameters: - $ref: '#/components/parameters/ApiVersion' requestBody: required: true description: Wiki creation parameters content: application/json: schema: $ref: '#/components/schemas/WikiCreateParametersV2' example: name: Project Wiki type: projectWiki projectId: a1b2c3d4-e5f6-a1b2-c3d4-e5f6a1b2c3d4 responses: '200': description: Wiki created successfully content: application/json: schema: $ref: '#/components/schemas/WikiV2' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' /wiki/wikis/{wikiIdentifier}: get: operationId: wikis_get summary: Azure DevOps Get a wiki description: 'Returns detailed information about a specific wiki, including its backing Git repository ID, mapped path (for code wikis), and current version. The wikiIdentifier can be either the wiki GUID or its name. ' tags: - Wikis parameters: - $ref: '#/components/parameters/ApiVersion' - $ref: '#/components/parameters/WikiIdentifier' - name: versionDescriptor in: query required: false description: Version descriptor for the wiki (branch or tag) schema: type: string responses: '200': description: Wiki returned successfully content: application/json: schema: $ref: '#/components/schemas/WikiV2' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' patch: operationId: wikis_update summary: Azure DevOps Update a wiki description: 'Updates the wiki by changing the default branch for a code wiki''s backed repository. This is useful when the main branch of the backing repository has been renamed. ' tags: - Wikis parameters: - $ref: '#/components/parameters/ApiVersion' - $ref: '#/components/parameters/WikiIdentifier' requestBody: required: true description: Wiki update parameters content: application/json: schema: $ref: '#/components/schemas/WikiUpdateParameters' example: versions: - version: main responses: '200': description: Wiki updated successfully content: application/json: schema: $ref: '#/components/schemas/WikiV2' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' delete: operationId: wikis_delete summary: Azure DevOps Delete a wiki description: 'Deletes a wiki. For a project wiki, this deletes the wiki and the backing Git repository. For a code wiki, this removes the wiki but leaves the backing repository intact. This operation cannot be undone. ' tags: - Wikis parameters: - $ref: '#/components/parameters/ApiVersion' - $ref: '#/components/parameters/WikiIdentifier' responses: '200': description: Wiki deleted successfully, returns the deleted wiki content: application/json: schema: $ref: '#/components/schemas/WikiV2' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' components: responses: Forbidden: description: Forbidden - insufficient permissions to perform this operation content: application/json: schema: $ref: '#/components/schemas/ApiError' Unauthorized: description: Unauthorized - missing or invalid authentication credentials content: application/json: schema: $ref: '#/components/schemas/ApiError' BadRequest: description: Bad request - invalid parameters or request body content: application/json: schema: $ref: '#/components/schemas/ApiError' NotFound: description: Not found - the requested resource does not exist content: application/json: schema: $ref: '#/components/schemas/ApiError' parameters: ApiVersion: name: api-version in: query required: true description: Azure DevOps REST API version. Use 7.1 for the latest stable version. schema: type: string default: '7.1' enum: - '7.1' - '7.0' - '6.0' WikiIdentifier: name: wikiIdentifier in: path required: true description: Wiki GUID or wiki name schema: type: string schemas: WikiCreateParametersV2: type: object description: Parameters for creating a new wiki required: - name - type - projectId properties: name: type: string description: Name of the wiki example: Project Wiki type: type: string description: Type of wiki to create enum: - projectWiki - codeWiki projectId: type: string format: uuid description: ID of the project to create the wiki in repositoryId: type: string format: uuid description: ID of the repository to back the wiki (required for codeWiki) mappedPath: type: string description: Root folder in the repository to use as wiki content (for codeWiki) example: /docs version: type: object description: Branch to use for the wiki properties: version: type: string description: Branch name example: main WikiV2: type: object description: An Azure DevOps wiki properties: id: type: string format: uuid description: Unique GUID identifier of the wiki name: type: string description: Display name of the wiki example: Project Wiki type: type: string description: Type of wiki enum: - projectWiki - codeWiki projectId: type: string format: uuid description: ID of the project this wiki belongs to repositoryId: type: string format: uuid description: ID of the backing Git repository mappedPath: type: string description: Root folder path in the repository (for code wikis) example: /wiki versions: type: array description: Branches or versions available for this wiki items: type: object properties: version: type: string description: Branch name example: main url: type: string format: uri description: URL to access this wiki via the REST API remoteUrl: type: string format: uri description: Clone URL for the backing repository _links: type: object additionalProperties: type: object properties: href: type: string format: uri WikiUpdateParameters: type: object description: Parameters for updating a wiki properties: versions: type: array description: Updated branch list for this wiki items: type: object properties: version: type: string description: Branch name ApiError: type: object description: Error response from the Azure DevOps API properties: id: type: string format: uuid message: type: string typeName: type: string typeKey: type: string errorCode: type: integer eventId: type: integer securitySchemes: bearerAuth: type: http scheme: bearer description: Azure AD OAuth 2.0 bearer token basicAuth: type: http scheme: basic description: Basic authentication using a Personal Access Token (PAT). Use any string as the username and the PAT as the password, then base64-encode the result.