【发布时间】:2020-02-28 02:51:30
【问题描述】:
我在 AzureDevops 中遇到了 Wiki API 的问题... 基本上,我需要更新那里的一些可用页面,我收到错误 404。
我的 Wiki 链接类似于:
https://dev.azure.com/{company}/{project}/_wiki/wikis/{MY_REPO_NAME}.wiki/1234/My_page
当我尝试通过 Postman 检索此页面的内容时,我使用地址:
https://dev.azure.com/{company}/{project}/_apis/wiki/wikis/{MY_REPO_NAME}.wiki/pages?path=/1234/My_page&includeContent=True&api-version=5.0
但我收到一条带有 404 的消息:
{
"$id": "1",
"innerException": null,
"message": "Wiki page ‘/1234/My_page’ could not be found. Ensure that the path of the page is correct and the page exists.",
"typeName": "Microsoft.TeamFoundation.Wiki.Server.WikiPageNotFoundException, Microsoft.TeamFoundation.Wiki.Server",
"typeKey": "WikiPageNotFoundException",
"errorCode": 0,
"eventId": 3000
}
我想我错过了此处提供的 {WikiIdentifier} 部分 https://docs.microsoft.com/pt-br/rest/api/azure/devops/wiki/pages/get?view=azure-devops-rest-5.0#get-page-as-json-with-content 但我不确定...
无论如何,这里有什么想法吗?
非常感谢你们!
【问题讨论】:
-
我已回滚您的编辑。此处不适合在标题中添加 [SOLVED] 或将解决方案编辑到问题中。如果您找到了想要分享的解决方案,请在下方为此目的提供的空白处写下答案。请参阅Can I answer my own question? 了解更多信息。
-
您好,很高兴您自己找到了解决方案!正如@Ken White 所说,您介意将您的解决方案转换为以下答案,然后在 2 天后接受吗?我认为其他面临同样难题的 SO 用户会非常感谢您的努力:-)
-
大家好,抱歉!现在完成! :D