Page Moves - Create
Creates a page move operation that updates the path and order of the page as provided in the parameters.
POST https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis/{wikiIdentifier}/pagemoves?api-version=7.1
POST https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis/{wikiIdentifier}/pagemoves?comment={comment}&versionDescriptor.version={versionDescriptor.version}&versionDescriptor.versionOptions={versionDescriptor.versionOptions}&versionDescriptor.versionType={versionDescriptor.versionType}&api-version=7.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.1' to use this version of the api. |
comment
|
query |
string |
Comment that is to be associated with this page move. |
|
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 |
Request Body
Name | Type | Description |
---|---|---|
newOrder |
integer (int32) |
New order of the wiki page. |
newPath |
string |
New path of the wiki page. |
path |
string |
Current path of the wiki page. |
Responses
Name | Type | Description |
---|---|---|
201 Created |
Page move created. Moved page's version is populated in the ETag response header. 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_write | Grants the ability to read, create and updates wikis, wiki pages and wiki attachments. |
Examples
Reorder page |
Reparent page |
Reorder page
Sample request
POST https://dev.azure.com/fabrikam/{project}/_apis/wiki/wikis/{wikiIdentifier}/pagemoves?api-version=7.1
{
"path": "SamplePage730",
"newPath": "SamplePage730",
"newOrder": 0
}
Sample response
eTag: "4c6adda4736aae086c7ae1956da1d91aba09d6fb"
{
"page": {
"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",
"content": ""
},
"path": "SamplePage730",
"newPath": "SamplePage730",
"newOrder": 0
}
Reparent page
Sample request
POST https://dev.azure.com/fabrikam/{project}/_apis/wiki/wikis/{wikiIdentifier}/pagemoves?api-version=7.1
{
"path": "SamplePage417",
"newPath": "SamplePage418/SamplePage417",
"newOrder": 0
}
Sample response
eTag: "4c6adda4736aae086c7ae1956da1d91aba09d6fb"
{
"page": {
"path": "/SamplePage418/SamplePage417",
"order": 0,
"gitItemPath": "/SamplePage418/SamplePage417.md",
"subPages": [],
"url": "https://dev.azure.com/fabrikam/15cbba90-8ac5-450e-934c-16f43021546b/_apis/wiki/wikis/0ede3074-ce9f-4e0e-b9d6-20c23b774e05/pages/SamplePage418%2FSamplePage417",
"remoteUrl": "https://dev.azure.com/fabrikam/15cbba90-8ac5-450e-934c-16f43021546b/_wiki/wikis/0ede3074-ce9f-4e0e-b9d6-20c23b774e05?pagePath=%2FSamplePage418%2FSamplePage417",
"content": ""
},
"path": "SamplePage417",
"newPath": "SamplePage418/SamplePage417",
"newOrder": 0
}
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 |
Wiki |
Defines a page in a wiki. |
Wiki |
Request contract for Wiki Page Move. |
Wiki |
Contract encapsulating parameters for the page move operation. |
GitVersionOptions
Version options - Specify additional modifiers to version (e.g Previous)
Value | Description |
---|---|
firstParent |
First parent of commit (HEAD^) |
none |
Not specified |
previousChange |
Commit that changed item prior to the current version |
GitVersionType
Version type (branch, tag, or commit). Determines how Id is interpreted
Value | Description |
---|---|
branch |
Interpret the version as a branch name |
commit |
Interpret the version as a commit ID (SHA1) |
tag |
Interpret the version as a tag name |
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 (int32) |
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 (int32) |
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. |
WikiPageMove
Request contract for Wiki Page Move.
Name | Type | Description |
---|---|---|
newOrder |
integer (int32) |
New order of the wiki page. |
newPath |
string |
New path of the wiki page. |
page |
Resultant page of this page move operation. |
|
path |
string |
Current path of the wiki page. |
WikiPageMoveParameters
Contract encapsulating parameters for the page move operation.
Name | Type | Description |
---|---|---|
newOrder |
integer (int32) |
New order of the wiki page. |
newPath |
string |
New path of the wiki page. |
path |
string |
Current path of the wiki page. |