|
|
POST:archive/pages/restore/{title}From $1目次
Overviewpublic. Restore all revisions of a given title Uri Parameters
Query ParametersNone Return Codes
Message FormatOutput: <restored>
<page.archive id="{int}">
<title>{text}</title>
<path>{text}</path>
<user.deleted id="{int}" href="{uri}">
<nick>{text]</nick>
<username>{text}</username>
<email>{text}</email>
</user.deleted>
<date.deleted>{date}</date.deleted>
<comment>{text}</comment>
</page.archive>
...
</restored>
Implementation NotesUse GET:archive/pages to retrieve a list of pages currently in the archive. When a page is restored, it is moved from the page archive to its original location. If a new page already exists at the original location, the restore will fail until this page has been removed or renamed. Note that this feature does not restore files and subpages of the specified page. Code SamplesThe following code example restores the page in the archive called "Page Title": Plug p = Plug.New("http://deki-hayes/@api/deki");
p.At("users", "authenticate").WithCredentials("admin", "password").Get();
p.At("archive", "pages", "restore", "=Page_Title").Post();
Sample response indicating that the page was restored and that it had two revisions: <restored>
<page.archive id="3">
<title>Page Title</title>
<path>Page_Title</path>
<user.deleted id="1" href="http://deki-hayes/@api/deki/users/1">
<nick>Admin</nick>
<username>Admin</username>
<email>admin@mindtouch.com</email>
</user.deleted>
<date.deleted>2007-08-21T22:04:33Z</date.deleted>
<comment>page created, 14 words added</comment>
</page.archive>
<page.archive id="4">
<title>Page Title</title>
<path>Page_Title</path>
<user.deleted id="1" href="http://deki-hayes/@api/deki/users/1">
<nick>Admin</nick>
<username>Admin</username>
<email>admin@mindtouch.com</email>
</user.deleted>
<date.deleted>2007-08-21T22:04:56Z</date.deleted>
<comment>2 words added</comment>
</page.archive>
</restored>
タグ:
|
||||||||||||||||||