Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/292.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 将文件上载到confluence Powershell的新页面_Python_Powershell_Confluence_Confluence Rest Api - Fatal编程技术网

Python 将文件上载到confluence Powershell的新页面

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

我需要通过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/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的访问?命名页面?