Pages - Get
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=5.0
GET https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis/{wikiIdentifier}/pages?path={path}&recursionLevel={recursionLevel}&versionDescriptor.versionOptions={versionDescriptor.versionOptions}&versionDescriptor.version={versionDescriptor.version}&versionDescriptor.versionType={versionDescriptor.versionType}&includeContent={includeContent}&api-version=5.0
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 name. |
api-version
|
query | True |
string |
Version of the API to use. This should be set to '5.0' 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 |
successful operation 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/fabrikam/{project}/_apis/wiki/wikis/{wikiIdentifier}/pages?path=/SamplePage129&api-version=5.0
Sample response
eTag: "4c6adda4736aae086c7ae1956da1d91aba09d6fb"
{
"path": "/SamplePage129",
"order": 9,
"gitItemPath": "/SamplePage129.md",
"subPages": [],
"url": "https://dev.azure.com/fabrikam/15cbba90-8ac5-450e-934c-16f43021546b/_apis/wiki/wikis/0ede3074-ce9f-4e0e-b9d6-20c23b774e05/pages/SamplePage129",
"remoteUrl": "https://dev.azure.com/fabrikam/15cbba90-8ac5-450e-934c-16f43021546b/_wiki/wikis/0ede3074-ce9f-4e0e-b9d6-20c23b774e05?pagePath=%2FSamplePage129",
"content": ""
}
Get page as JSON with content
Sample request
GET https://dev.azure.com/fabrikam/{project}/_apis/wiki/wikis/{wikiIdentifier}/pages?path=/SamplePage129&includeContent=True&api-version=5.0
Sample response
eTag: "4c6adda4736aae086c7ae1956da1d91aba09d6fb"
{
"path": "/SamplePage129",
"order": 9,
"gitItemPath": "/SamplePage129.md",
"subPages": [],
"url": "https://dev.azure.com/fabrikam/15cbba90-8ac5-450e-934c-16f43021546b/_apis/wiki/wikis/0ede3074-ce9f-4e0e-b9d6-20c23b774e05/pages/SamplePage129",
"remoteUrl": "https://dev.azure.com/fabrikam/15cbba90-8ac5-450e-934c-16f43021546b/_wiki/wikis/0ede3074-ce9f-4e0e-b9d6-20c23b774e05?pagePath=%2FSamplePage129",
"content": "Wiki page content"
}
Get page as JSON with recursion level
Sample request
GET https://dev.azure.com/fabrikam/{project}/_apis/wiki/wikis/{wikiIdentifier}/pages?path=/&recursionLevel=OneLevel&api-version=5.0
Sample response
eTag: "719402e193cea0fff2403a46db3a8be7353afa08"
{
"path": "/",
"order": 0,
"isParentPage": true,
"gitItemPath": "/",
"subPages": [
{
"path": "/SamplePage256",
"order": 5,
"gitItemPath": "/SamplePage256.md",
"subPages": [],
"url": "https://dev.azure.com/fabrikam/15cbba90-8ac5-450e-934c-16f43021546b/_apis/wiki/wikis/0ede3074-ce9f-4e0e-b9d6-20c23b774e05/pages/SamplePage256",
"remoteUrl": "https://dev.azure.com/fabrikam/15cbba90-8ac5-450e-934c-16f43021546b/_wiki/wikis/0ede3074-ce9f-4e0e-b9d6-20c23b774e05?pagePath=%2FSamplePage256"
},
{
"path": "/SamplePage418",
"order": 4,
"isParentPage": true,
"gitItemPath": "/SamplePage418.md",
"subPages": [],
"url": "https://dev.azure.com/fabrikam/15cbba90-8ac5-450e-934c-16f43021546b/_apis/wiki/wikis/0ede3074-ce9f-4e0e-b9d6-20c23b774e05/pages/SamplePage418",
"remoteUrl": "https://dev.azure.com/fabrikam/15cbba90-8ac5-450e-934c-16f43021546b/_wiki/wikis/0ede3074-ce9f-4e0e-b9d6-20c23b774e05?pagePath=%2FSamplePage418"
},
{
"path": "/SamplePage445",
"order": 3,
"gitItemPath": "/SamplePage445.md",
"subPages": [],
"url": "https://dev.azure.com/fabrikam/15cbba90-8ac5-450e-934c-16f43021546b/_apis/wiki/wikis/0ede3074-ce9f-4e0e-b9d6-20c23b774e05/pages/SamplePage445",
"remoteUrl": "https://dev.azure.com/fabrikam/15cbba90-8ac5-450e-934c-16f43021546b/_wiki/wikis/0ede3074-ce9f-4e0e-b9d6-20c23b774e05?pagePath=%2FSamplePage445"
},
{
"path": "/SamplePage617",
"order": 2,
"gitItemPath": "/SamplePage617.md",
"subPages": [],
"url": "https://dev.azure.com/fabrikam/15cbba90-8ac5-450e-934c-16f43021546b/_apis/wiki/wikis/0ede3074-ce9f-4e0e-b9d6-20c23b774e05/pages/SamplePage617",
"remoteUrl": "https://dev.azure.com/fabrikam/15cbba90-8ac5-450e-934c-16f43021546b/_wiki/wikis/0ede3074-ce9f-4e0e-b9d6-20c23b774e05?pagePath=%2FSamplePage617"
},
{
"path": "/SamplePage730",
"order": 0,
"gitItemPath": "/SamplePage730.md",
"subPages": [],
"url": "https://dev.azure.com/fabrikam/15cbba90-8ac5-450e-934c-16f43021546b/_apis/wiki/wikis/0ede3074-ce9f-4e0e-b9d6-20c23b774e05/pages/SamplePage730",
"remoteUrl": "https://dev.azure.com/fabrikam/15cbba90-8ac5-450e-934c-16f43021546b/_wiki/wikis/0ede3074-ce9f-4e0e-b9d6-20c23b774e05?pagePath=%2FSamplePage730"
},
{
"path": "/SamplePage731",
"order": 1,
"gitItemPath": "/SamplePage731.md",
"subPages": [],
"url": "https://dev.azure.com/fabrikam/15cbba90-8ac5-450e-934c-16f43021546b/_apis/wiki/wikis/0ede3074-ce9f-4e0e-b9d6-20c23b774e05/pages/SamplePage731",
"remoteUrl": "https://dev.azure.com/fabrikam/15cbba90-8ac5-450e-934c-16f43021546b/_wiki/wikis/0ede3074-ce9f-4e0e-b9d6-20c23b774e05?pagePath=%2FSamplePage731"
}
],
"url": "https://dev.azure.com/fabrikam/15cbba90-8ac5-450e-934c-16f43021546b/_apis/wiki/wikis/0ede3074-ce9f-4e0e-b9d6-20c23b774e05/pages",
"remoteUrl": "https://dev.azure.com/fabrikam/15cbba90-8ac5-450e-934c-16f43021546b/_wiki/wikis/0ede3074-ce9f-4e0e-b9d6-20c23b774e05?pagePath=%2F",
"content": ""
}
Get page as text
Sample request
GET https://dev.azure.com/fabrikam/{project}/_apis/wiki/wikis/{wikiIdentifier}/pages?path=/SamplePage129&api-version=5.0
Sample response
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. |
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. |