Pages - Get Page
Gets metadata or content of the wiki page for the provided path. Content negotiation is done based on the Accept
header sent in the request.
GET https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis/{wikiIdentifier}/pages?api-version=7.2-preview.1
GET https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis/{wikiIdentifier}/pages?path={path}&recursionLevel={recursionLevel}&versionDescriptor.version={versionDescriptor.version}&versionDescriptor.versionOptions={versionDescriptor.versionOptions}&versionDescriptor.versionType={versionDescriptor.versionType}&includeContent={includeContent}&api-version=7.2-preview.1
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
organization
|
path | True |
string |
The name of the Azure DevOps organization. |
project
|
path | True |
string |
Project ID or project name |
wiki
|
path | True |
string |
Wiki ID or wiki name. |
api-version
|
query | True |
string |
Version of the API to use. This should be set to '7.2-preview.1' to use this version of the api. |
include
|
query |
boolean |
True to include the content of the page in the response for Json content type. Defaults to false (Optional) |
|
path
|
query |
string |
Wiki page path. |
|
recursion
|
query |
Recursion level for subpages retrieval. Defaults to |
||
version
|
query |
string |
Version string identifier (name of tag/branch, SHA1 of commit) |
|
version
|
query |
Version options - Specify additional modifiers to version (e.g Previous) |
||
version
|
query |
Version type (branch, tag, or commit). Determines how Id is interpreted |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Returns the wiki page in requested format. Media Types: "application/zip", "text/plain", "application/json" Headers ETag: string |
|
404 Not Found |
Wiki repository is disabled, deleted or user does not have access to it Media Types: "application/zip", "text/plain", "application/json" Headers ETag: string |
Security
oauth2
Type:
oauth2
Flow:
accessCode
Authorization URL:
https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL:
https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
Scopes
Name | Description |
---|---|
vso.wiki | Grants the ability to read wikis, wiki pages and wiki attachments. Also grants the ability to search wiki pages. |
Examples
Get page as JSON |
Get page as JSON with content |
Get page as JSON with recursion level |
Get page as text |
Get page as JSON
Sample Request
GET https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis/{wikiIdentifier}/pages?path=/SamplePage973&api-version=7.2-preview.1
Sample Response
eTag: "4c6adda4736aae086c7ae1956da1d91aba09d6fb"
{
"path": "/SamplePage973",
"order": 1,
"gitItemPath": "/SamplePage973.md",
"subPages": [],
"url": "https://dev.azure.com/fabrikam/e5e9e01e-801a-47eb-80bb-0ad24f448abe/_apis/wiki/wikis/ffa4628c-8f6d-45c0-b61b-52c16d06c925/pages/%2FSamplePage973",
"remoteUrl": "https://dev.azure.com/fabrikam/e5e9e01e-801a-47eb-80bb-0ad24f448abe/_wiki/wikis/ffa4628c-8f6d-45c0-b61b-52c16d06c925?pagePath=%2FSamplePage973",
"id": 51,
"content": ""
}
Get page as JSON with content
Sample Request
GET https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis/{wikiIdentifier}/pages?path=/SamplePage973&includeContent=True&api-version=7.2-preview.1
Sample Response
eTag: "4c6adda4736aae086c7ae1956da1d91aba09d6fb"
{
"path": "/SamplePage973",
"order": 1,
"gitItemPath": "/SamplePage973.md",
"subPages": [],
"url": "https://dev.azure.com/fabrikam/e5e9e01e-801a-47eb-80bb-0ad24f448abe/_apis/wiki/wikis/ffa4628c-8f6d-45c0-b61b-52c16d06c925/pages/%2FSamplePage973",
"remoteUrl": "https://dev.azure.com/fabrikam/e5e9e01e-801a-47eb-80bb-0ad24f448abe/_wiki/wikis/ffa4628c-8f6d-45c0-b61b-52c16d06c925?pagePath=%2FSamplePage973",
"id": 51,
"content": "Wiki page content"
}
Get page as JSON with recursion level
Sample Request
GET https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis/{wikiIdentifier}/pages?path=/&recursionLevel=OneLevel&api-version=7.2-preview.1
Sample Response
eTag: "566070412a9a28ded41d443a39b3addf76b27453"
{
"path": "/",
"order": 0,
"isParentPage": true,
"gitItemPath": "/",
"subPages": [
{
"path": "/SamplePage973",
"order": 1,
"gitItemPath": "/SamplePage973.md",
"subPages": [],
"url": "https://dev.azure.com/fabrikam/e5e9e01e-801a-47eb-80bb-0ad24f448abe/_apis/wiki/wikis/ffa4628c-8f6d-45c0-b61b-52c16d06c925/pages/%2FSamplePage973",
"remoteUrl": "https://dev.azure.com/fabrikam/e5e9e01e-801a-47eb-80bb-0ad24f448abe/_wiki/wikis/ffa4628c-8f6d-45c0-b61b-52c16d06c925?pagePath=%2FSamplePage973"
},
{
"path": "/SamplePage99",
"order": 4,
"gitItemPath": "/SamplePage99.md",
"subPages": [],
"url": "https://dev.azure.com/fabrikam/e5e9e01e-801a-47eb-80bb-0ad24f448abe/_apis/wiki/wikis/ffa4628c-8f6d-45c0-b61b-52c16d06c925/pages/%2FSamplePage99",
"remoteUrl": "https://dev.azure.com/fabrikam/e5e9e01e-801a-47eb-80bb-0ad24f448abe/_wiki/wikis/ffa4628c-8f6d-45c0-b61b-52c16d06c925?pagePath=%2FSamplePage99"
},
{
"path": "/nhhm mjmj",
"order": 3,
"gitItemPath": "/nhhm-mjmj.md",
"subPages": [],
"url": "https://dev.azure.com/fabrikam/e5e9e01e-801a-47eb-80bb-0ad24f448abe/_apis/wiki/wikis/ffa4628c-8f6d-45c0-b61b-52c16d06c925/pages/%2Fnhhm%20mjmj",
"remoteUrl": "https://dev.azure.com/fabrikam/e5e9e01e-801a-47eb-80bb-0ad24f448abe/_wiki/wikis/ffa4628c-8f6d-45c0-b61b-52c16d06c925?pagePath=%2Fnhhm%20mjmj"
},
{
"path": "/test test test",
"order": 0,
"gitItemPath": "/test-test-test.md",
"subPages": [],
"url": "https://dev.azure.com/fabrikam/e5e9e01e-801a-47eb-80bb-0ad24f448abe/_apis/wiki/wikis/ffa4628c-8f6d-45c0-b61b-52c16d06c925/pages/%2Ftest%20test%20test",
"remoteUrl": "https://dev.azure.com/fabrikam/e5e9e01e-801a-47eb-80bb-0ad24f448abe/_wiki/wikis/ffa4628c-8f6d-45c0-b61b-52c16d06c925?pagePath=%2Ftest%20test%20test"
},
{
"path": "/test test",
"order": 2,
"gitItemPath": "/test-test.md",
"subPages": [],
"url": "https://dev.azure.com/fabrikam/e5e9e01e-801a-47eb-80bb-0ad24f448abe/_apis/wiki/wikis/ffa4628c-8f6d-45c0-b61b-52c16d06c925/pages/%2Ftest%20test",
"remoteUrl": "https://dev.azure.com/fabrikam/e5e9e01e-801a-47eb-80bb-0ad24f448abe/_wiki/wikis/ffa4628c-8f6d-45c0-b61b-52c16d06c925?pagePath=%2Ftest%20test"
}
],
"url": "https://dev.azure.com/fabrikam/e5e9e01e-801a-47eb-80bb-0ad24f448abe/_apis/wiki/wikis/ffa4628c-8f6d-45c0-b61b-52c16d06c925/pages/%2F",
"remoteUrl": "https://dev.azure.com/fabrikam/e5e9e01e-801a-47eb-80bb-0ad24f448abe/_wiki/wikis/ffa4628c-8f6d-45c0-b61b-52c16d06c925?pagePath=%2F",
"content": ""
}
Get page as text
Sample Request
GET https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis/{wikiIdentifier}/pages?path=/SamplePage973&api-version=7.2-preview.1
Sample Response
transfer-Encoding: chunked
eTag: "4c6adda4736aae086c7ae1956da1d91aba09d6fb"
Definitions
Name | Description |
---|---|
Git |
Version options - Specify additional modifiers to version (e.g Previous) |
Git |
Version type (branch, tag, or commit). Determines how Id is interpreted |
Version |
Recursion level for subpages retrieval. Defaults to |
Wiki |
Defines a page in a wiki. |
GitVersionOptions
Version options - Specify additional modifiers to version (e.g Previous)
Name | Type | Description |
---|---|---|
firstParent |
string |
First parent of commit (HEAD^) |
none |
string |
Not specified |
previousChange |
string |
Commit that changed item prior to the current version |
GitVersionType
Version type (branch, tag, or commit). Determines how Id is interpreted
Name | Type | Description |
---|---|---|
branch |
string |
Interpret the version as a branch name |
commit |
string |
Interpret the version as a commit ID (SHA1) |
tag |
string |
Interpret the version as a tag name |
VersionControlRecursionType
Recursion level for subpages retrieval. Defaults to None
(Optional).
Name | Type | Description |
---|---|---|
full |
string |
Return specified item and all descendants |
none |
string |
Only return the specified item. |
oneLevel |
string |
Return the specified item and its direct children. |
oneLevelPlusNestedEmptyFolders |
string |
Return the specified item and its direct children, as well as recursive chains of nested child folders that only contain a single folder. |
WikiPage
Defines a page in a wiki.
Name | Type | Description |
---|---|---|
content |
string |
Content of the wiki page. |
gitItemPath |
string |
Path of the git item corresponding to the wiki page stored in the backing Git repository. |
id |
integer |
When present, permanent identifier for the wiki page |
isNonConformant |
boolean |
True if a page is non-conforming, i.e. 1) if the name doesn't match page naming standards. 2) if the page does not have a valid entry in the appropriate order file. |
isParentPage |
boolean |
True if this page has subpages under its path. |
order |
integer |
Order of the wiki page, relative to other pages in the same hierarchy level. |
path |
string |
Path of the wiki page. |
remoteUrl |
string |
Remote web url to the wiki page. |
subPages |
Wiki |
List of subpages of the current page. |
url |
string |
REST url for this wiki page. |
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for