AzureDevOps - Wiki REST 问题 API
AzureDevOps - Issue with Wiki REST API
我遇到了 AzureDevops 中 Wiki API 的问题...
基本上,我需要更新那里的一些可用页面,但我收到错误 404。
我的 Wiki link 是这样的:
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 但我不确定...
总之,有什么想法吗?
非常感谢你们!
我刚刚找到解决这个问题的方法...只是为了确保没有人会遇到这个问题,我能够使用编码代码 %2F 执行该端点的 GET 和其他动词。例如:
https://dev.azure.com/{company}/{project}/_apis/wiki/wikis/{MY_REPO_NAME}.wiki/pages?path=%2F1234/My_page&includeContent=True&api-version=5.0
另一项,如果您在 wiki 页面的标题中使用了 space,请记住将 space 替换为 %20。
我遇到了 AzureDevops 中 Wiki API 的问题... 基本上,我需要更新那里的一些可用页面,但我收到错误 404。
我的 Wiki link 是这样的:
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 但我不确定...
总之,有什么想法吗?
非常感谢你们!
我刚刚找到解决这个问题的方法...只是为了确保没有人会遇到这个问题,我能够使用编码代码 %2F 执行该端点的 GET 和其他动词。例如:
https://dev.azure.com/{company}/{project}/_apis/wiki/wikis/{MY_REPO_NAME}.wiki/pages?path=%2F1234/My_page&includeContent=True&api-version=5.0
另一项,如果您在 wiki 页面的标题中使用了 space,请记住将 space 替换为 %20。