Python 将文件上载到confluence Powershell的新页面
我需要通过Powershell将文件上载到confluence的新页面 我在internet上找到了执行此操作的命令:Python 将文件上载到confluence Powershell的新页面,python,powershell,confluence,confluence-rest-api,Python,Powershell,Confluence,Confluence Rest Api,我需要通过Powershell将文件上载到confluence的新页面 我在internet上找到了执行此操作的命令: curl -v -S -u admin:admin -X POST -H "X-Atlassian-Token: no-check" -F "file=C:\Users\srvc_mdw_dev\Desktop\conf.txt" -F "comment=this is my file" "http://localhost:8080/confluence/rest/api/co
curl -v -S -u admin:admin -X POST -H "X-Atlassian-Token: no-check" -F "file=C:\Users\srvc_mdw_dev\Desktop\conf.txt" -F "comment=this is my file" "http://localhost:8080/confluence/rest/api/content/3604482/child/attachment" | python -mjson.tool
问题是我不知道替换脚本的REST资源(URL),并且还得到错误:
python:术语“python”不能识别为cmdlet、函数、脚本文件或可操作程序的名称。
请检查名称的拼写,或者如果包含路径,请验证路径是否正确,然后重试
可能重复:谢谢,但是我怎么能有我的X-Api-Key?如果你没有,那么你不需要给甚至。除了给出其他参数的那一部分,脚本看起来是:$json=@“{”alert_policy:“[{”enabled:“true”}]”“@$headers=@{}Invoke WebRequest-Uri”C:\Users\srvc_mdw_dev\Desktop\conf.txt”-Body$json-ContentType“application/json”-headers$headers-Method Post?我们在哪里定义对confluence的访问?命名页面?