如何通过使用 python脚本来编写内容并从 azure wiki 中获取内容?
我使用Azure Wiki API进行连接,但我不知道如何从那里获取内容。
API是: 获取
How to write content and fetch that content from Azure Wiki by using Python Script?
I used Azure wiki API for making connections but I don't know how to fetch the content from there.
And API is: GET https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis/{wikiIdentifier}?api-version=6.0
根据您的要求,您需要使用REST API从Wiki获取内容。
我建议您可以使用REST API: pages-get
例如:
GET https://dev.azure.com/fabrikam/{project}/_apis/wiki/wikis/{wikiIdentifier}/pages?path=/SamplePage129&includeContent=True&api-version=5.0
使用Python运行REST API:
import requests import base64 pat = 'PAT' authorization = str(base64.b64encode(bytes(':'+pat, 'ascii')), 'ascii') headers = { 'Accept': 'application/json', 'Authorization': 'Basic '+authorization } response = requests.get( url="https://dev.azure.com/fabrikam/{project}/_apis/wiki/wikis/{wikiIdentifier}/pages?path=/SamplePage129&includeContent=True&api-version=5.0", headers=headers) print(response)
Based on your requirement, you need to use Rest API to get the content from Wiki.
I suggest that you can use Rest API: Pages - Get
For example:
Use Python to run the Rest API:
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(1)
根据您的要求,您需要使用REST API从Wiki获取内容。
我建议您可以使用REST API: pages-get
例如:
使用Python运行REST API:
Based on your requirement, you need to use Rest API to get the content from Wiki.
I suggest that you can use Rest API: Pages - Get
For example:
Use Python to run the Rest API: